M5Stack U120

Contents

M5Stack Official LCD Unit 1.14in 135 X 240 Pixels Display User Manual

Model: U120

1. Introduction

The M5Stack Official LCD Unit is a compact 1.14-inch color LCD expansion screen designed for various embedded applications. It features an ST7789V2 drive scheme and a resolution of 135x240 pixels, supporting RGB666 display (262,144 colors). The internal integration of an ESP32-PICO control core (with built-in firmware) facilitates convenient display development. Communication and firmware upgrades are handled via the I2C interface (address: 0x3E). Its magnetic back design allows for easy attachment to metal surfaces. The LCD screen extension is suitable for embedding in various instruments or control devices that need to display simple content as a display panel.

Product Features:

  • 1.14-inch color LCD display panel
  • ST7789V2 drive scheme
  • I2C communication interface
  • 135x240 resolution
  • Full viewing angle
  • Magnetic back design
  • Support for I2C firmware upgrade

Applications:

  • Information display in various instruments or control devices

2. Package Contents

Ensure all items are present upon unboxing:

  • 1x M5Stack Official LCD Unit (Model: U120)
  • 1x HY2.0-4P Cable
M5Stack LCD Unit and HY2.0-4P Cable
Image: M5Stack LCD Unit and included HY2.0-4P Cable.

3. Specifications

SpecificationParameter
Screen driver ICST7789V2
Working current45.7mA
Communication protocolI2C, Address 0x3E
Display size1.14 inches
Pixel pitch0.1170(H) x 0.1170(V) mm
Resolution135 x 240 pixels
ViewableFull view
Operating Temperature0°C to 60°C
Net Weight8.5g
Gross Weight20g
Product size48 x 24 x 8mm
Packing size67 x 52 x 12.5mm
Case materialPlastic (PC)

PinMap:

M5Core (PORT A)Unit LCDGPIO22GPIO215VGND
SCLSCL
SDASDA
5V5V
GNDGND

Schematic:

M5Stack LCD Unit Schematic Diagram
Image: Schematic diagram for the M5Stack LCD Unit.

4. Setup and Connection

The M5Stack LCD Unit communicates via I2C. Connect the HY2.0-4P cable to the unit and your M5Stack Core or compatible development board's Port A (I2C) interface. Ensure correct pin alignment for SCL, SDA, 5V, and GND as indicated on the unit.

M5Stack LCD Unit with connected cable
Image: M5Stack LCD Unit with HY2.0-4P cable connected.

The unit features a bottom magnet for easy mounting on metallic surfaces.

M5Stack LCD Unit showing bottom magnet
Image: The bottom magnet on the M5Stack LCD Unit.

5. Operating Instructions

The Unit LCD is controlled via I2C commands. The internal ESP32-PICO core handles the display logic, making it easier to integrate into your projects.

Displaying Content:

The unit supports various display modes, including text, graphics, and images. The 135x240 pixel resolution allows for clear visual feedback.

M5Stack LCD Unit displaying various content
Image: Examples of multiple color display modes on the LCD unit, including text, patterns, and graphical representations.

Communication with Unit LCD:

You can send commands and receive data to the Unit LCD using I2C communication. The I2C address for the Unit LCD is 0x3E. The Unit LCD uses a command-based protocol. You send commands to the Unit LCD, and it executes them. The Unit LCD has a built-in frame buffer, which is memory based on the standard syntax. The ESP32-PICO (4M) microcontroller inside the unit handles the display operations. The display supports RGB666 (262,144 colors).

There are two main types of commands:

  • Drawing commands: These commands are used to draw various shapes, text, or images on the LCD.
  • Configuration commands: These commands are used to configure the LCD's settings, such as brightness, contrast, or display orientation.

After sending a command, you can send another command to perform further operations. You should use the I2C write function to send commands to the Unit LCD. You should use the I2C read function to read data from the Unit LCD. You should check the return value of the I2C functions to ensure that the communication is successful.

Command List:

CommandLenDescriptionInput params
0x001WRITE_REG_8BIT[0] 8-bit register address
[1] 8-bit register value
0x011READ_REG_8BIT[0] 8-bit register address
0x021SET_BRIGHTNESS[0] Brightness value (0-255)
0x031SET_ROTATION[0] Rotation value (0-3)
0x041SET_COLOR_DEPTH[0] Color depth (1-16)
0x051SET_FONT[0] Font index (0-N)
0x061SET_TEXT_WRAP[0] Text wrap (0=off, 1=on)
0x071SET_TEXT_SIZE[0] Text size (1-N)
0x081SET_TEXT_COLOR[0] Red (0-255)
[1] Green (0-255)
[2] Blue (0-255)
0x091SET_BACKGROUND_COLOR[0] Red (0-255)
[1] Green (0-255)
[2] Blue (0-255)
0x0A1CLEAR_SCREENNo parameters
0x0B1DRAW_PIXEL[0] X coordinate
[1] Y coordinate
[2] Red (0-255)
[3] Green (0-255)
[4] Blue (0-255)
0x0C1DRAW_LINE[0] X1
[1] Y1
[2] X2
[3] Y2
[4] Red (0-255)
[5] Green (0-255)
[6] Blue (0-255)
0x0D1DRAW_RECTANGLE[0] X
[1] Y
[2] Width
[3] Height
[4] Red (0-255)
[5] Green (0-255)
[6] Blue (0-255)
0x0E1FILL_RECTANGLE[0] X
[1] Y
[2] Width
[3] Height
[4] Red (0-255)
[5] Green (0-255)
[6] Blue (0-255)
0x0F1DRAW_CIRCLE[0] X
[1] Y
[2] Radius
[3] Red (0-255)
[4] Green (0-255)
[5] Blue (0-255)
0x101FILL_CIRCLE[0] X
[1] Y
[2] Radius
[3] Red (0-255)
[4] Green (0-255)
[5] Blue (0-255)
0x111DRAW_TRIANGLE[0] X1
[1] Y1
[2] X2
[3] Y2
[4] X3
[5] Y3
[6] Red (0-255)
[7] Green (0-255)
[8] Blue (0-255)
0x121FILL_TRIANGLE[0] X1
[1] Y1
[2] X2
[3] Y2
[4] X3
[5] Y3
[6] Red (0-255)
[7] Green (0-255)
[8] Blue (0-255)
0x131DRAW_STRING[0] X
[1] Y
[2] String length
[3] String data (ASCII)
0x141DRAW_IMAGE[0] X
[1] Y
[2] Width
[3] Height
[4] Image data (RGB565)
0x151DRAW_IMAGE_ALPHA[0] X
[1] Y
[2] Width
[3] Height
[4] Image data (RGB565)
[5] Alpha data (8-bit)
0x161DRAW_IMAGE_RGB888[0] X
[1] Y
[2] Width
[3] Height
[4] Image data (RGB888)
0x171DRAW_IMAGE_RGB888_ALPHA[0] X
[1] Y
[2] Width
[3] Height
[4] Image data (RGB888)
[5] Alpha data (8-bit)
0x181SCROLL[0] X offset
[1] Y offset
0x191SET_CURSOR[0] X coordinate
[1] Y coordinate
0x1A1GET_CURSOR_XNo parameters
0x1B1GET_CURSOR_YNo parameters
0x1C1PUSH_SPRITE[0] X
[1] Y
[2] Width
[3] Height
[4] Sprite data (RGB565)
0x1D1WAIT_DISPLAYNo parameters

Example (Arduino):

#include <M5UnitLCD.h>

M5UnitLCD display;

M5Canvas &canvas(&display);

static constexpr char text[] = "Hello world ! こんにちは世界! this is long long long sample. 有限無限、五劫の擦り切れ、海砂利水魚の、水行末・雲来末・風来末、鳴り響く鎚を打ち、散りゆく塵を払い、バイバイ・バイバイ・バイバイのシューリンガン、シューリンガンのグーリンダイ。グーリンダイのポンポコピーのポンポコナーの、長久命の転回。";
static constexpr size_t text_len = sizeof(text) / sizeof(text[0]);
int textpos = 0;
int scrollstep = 2;

void setup() {
  display.init();
  display.setRotation(2);
  canvas.setColorDepth(1); // mono color
  canvas.setFont(&fonts::LgfxJapanMinchoP_32);
  canvas.setTextWrap(false);
  canvas.setTextSize(2);
  canvas.createSprite(display.width() + 64, 72);
}

void loop() {
  int32_t cursor_x = canvas.getCursorX() - scrollstep;
  if (cursor_x <= 0) {
    textpos = 0;
    cursor_x = display.width();
  }

  canvas.setCursor(cursor_x, 0);
  canvas.scroll(-scrollstep, 0);
  while (textpos < text_len && cursor_x < display.width()) {
    canvas.print(text[textpos++]);
    cursor_x = canvas.getCursorX();
  }
  display.waitDisplay();
  display.pushSprite(&display, 0, (display.height() - canvas.height()) >> 1);
}

6. Firmware Upgrade

The Unit LCD supports firmware upgrades via the I2C interface. This allows for updates and improvements to the unit's functionality.

Method 1: Using ESP32 Downloader

Connect the Unit LCD to an ESP32 development board (e.g., M5Stack Core) and use the ESP32 Downloader tool to flash new firmware. This method requires a USB-to-serial converter or a development board with built-in USB-to-serial capabilities.

Firmware upgrade using ESP32 Downloader
Image: Visual guide for firmware upgrade using ESP32 Downloader, showing connections and software interface.

Method 2: Update via I2C (Over-the-Air or via another MCU)

Firmware can also be updated directly via I2C from another microcontroller. This method is suitable for in-system programming or when a dedicated ESP32 Downloader is not available.

Firmware upgrade via I2C
Image: Illustration of firmware update process via I2C, showing the Unit LCD connected to another M5Stack device for the update.
Play video
Watch video online
Video: Demonstrates firmware updating via I2C, showing the progress on both the updating device and the Unit LCD.

7. Maintenance

The M5Stack LCD Unit is designed for durability. To ensure its longevity:

  • Keep the unit clean and free from dust and debris. Use a soft, dry cloth for cleaning.
  • Avoid exposing the unit to extreme temperatures or humidity.
  • Handle with care to prevent physical damage to the screen or connectors.
  • Ensure proper power supply (5V) to prevent damage to the internal components.

8. Troubleshooting

  • Display not turning on:
    • Check power connections (5V and GND).
    • Verify the I2C communication lines (SCL, SDA) are correctly connected.
    • Ensure the host microcontroller is powered on and sending commands.
  • Incorrect display or artifacts:
    • Confirm the I2C address (0x3E) is correctly set in your code.
    • Check for proper initialization of the display driver (ST7789V2).
    • Review your display commands for correct parameters (e.g., coordinates, colors).
    • Try updating the firmware to the latest version.
  • No response via I2C:
    • Verify the I2C bus is not busy or experiencing conflicts with other devices.
    • Check the physical connections of the I2C lines.
    • Ensure the host microcontroller's I2C peripheral is correctly configured.

9. User Tips

  • When using the magnetic back, ensure the surface is clean and free of metallic particles that could scratch the unit.
  • For custom applications, consider using the provided Arduino example code as a starting point for display initialization and basic operations.
  • Regularly check the M5Stack official website or community forums for updated firmware and libraries to enhance functionality and resolve potential issues.

10. Warranty and Support

For warranty information and technical support, please refer to the official M5Stack website or contact their customer service directly. Keep your purchase receipt for any warranty claims.

Documents and downloads

Ask a question about this manual

Ask about setup, troubleshooting, compatibility, parts, safety, or missing instructions. Manuals+ will review the question and use this page’s manual context to help answer it.

After a successful submission, we securely hash the supplied account or form email before sending it to Microsoft Advertising for conversion attribution. Privacy details.

Rate this product if you’ve used it

Was this page helpful?