M5Stack U120

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

Model: U120

1. Introducció

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.

Característiques del producte:

  • 1.14-inch color LCD display panel
  • ST7789V2 drive scheme
  • I2C communication interface
  • 135x240 resolution
  • Complet viewangle de ing
  • Magnetic back design
  • Support for I2C firmware upgrade

Aplicacions:

  • Information display in various instruments or control devices

2. Contingut del paquet

Assegureu-vos que hi hagi tots els articles presents en desempaquetar:

  • 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. Especificacions

EspecificacióParàmetre
Screen driver ICST7789V2
Corrent de treball45.7 mA
Protocol de comunicacióI2C, Address 0x3E
Mida de la pantalla1.14 polzades
Pas de píxels0.1170 (H) x 0.1170 (V) mm
Resolució135 x 240 píxels
ViewcapaçComplet view
Temperatura de funcionament0 °C a 60 °C
Pes net8.5 g
Pes brut20 g
Mida del producte48 x 24 x 8 mm
Mida de l'embalatge67 x 52 x 12.5 mm
Material de la caixaPlàstic (PC)

PinMap:

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

Esquema:

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

4. Configuració i connexió

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. Instruccions de funcionament

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
Imatge: 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.

Llista d'ordres:

ComandamentLenDescripcióInput params
0 x 001WRITE_REG_8BIT[0] 8-bit register address
[1] 8-bit register value
0 x 011READ_REG_8BIT[0] 8-bit register address
0 x 021SET_BRIGHTNESS[0] Brightness value (0-255)
0 x 031SET_ROTATION[0] Rotation value (0-3)
0 x 041SET_COLOR_DEPTH[0] Color depth (1-16)
0 x 051SET_FONT[0] Font index (0-N)
0 x 061SET_TEXT_WRAP[0] Text wrap (0=off, 1=on)
0 x 071SET_TEXT_SIZE[0] Text size (1-N)
0 x 081SET_TEXT_COLOR[0] Red (0-255)
[1] Green (0-255)
[2] Blue (0-255)
0 x 091SET_BACKGROUND_COLOR[0] Red (0-255)
[1] Green (0-255)
[2] Blue (0-255)
0x0A1CLEAR_SCREENSense paràmetres
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)
0 x 101FILL_CIRCLE[0] X
[1] Y
[2] Radius
[3] Red (0-255)
[4] Green (0-255)
[5] Blue (0-255)
0 x 111DRAW_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)
0 x 121FILL_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)
0 x 131DRAW_STRING[0] X
[1] Y
[2] String length
[3] String data (ASCII)
0 x 141DRAW_IMAGE[0] X
[1] Y
[2] Width
[3] Height
[4] Image data (RGB565)
0 x 151DRAW_IMAGE_ALPHA[0] X
[1] Y
[2] Width
[3] Height
[4] Image data (RGB565)
[5] Alpha data (8-bit)
0 x 161DRAW_IMAGE_RGB888[0] X
[1] Y
[2] Width
[3] Height
[4] Image data (RGB888)
0 x 171DRAW_IMAGE_RGB888_ALPHA[0] X
[1] Y
[2] Width
[3] Height
[4] Image data (RGB888)
[5] Alpha data (8-bit)
0 x 181ROLL[0] X offset
[1] Y offset
0 x 191SET_CURSOR[0] X coordinate
[1] Y coordinate
0x1A1GET_CURSOR_XSense paràmetres
0x1B1GET_CURSOR_YSense paràmetres
0x1C1PUSH_SPRITE[0] X
[1] Y
[2] Width
[3] Height
[4] Sprite data (RGB565)
0x1D1WAIT_DISPLAYSense paràmetres

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. Actualització del firmware

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.
Video: Demonstrates firmware updating via I2C, showing the progress on both the updating device and the Unit LCD.

7. Manteniment

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

  • Mantingueu la unitat neta i lliure de pols i deixalles. Feu servir un drap suau i sec per netejar-la.
  • Eviteu exposar la unitat a temperatures o humitat extremes.
  • Manipuleu amb cura per evitar danys físics a la pantalla o als connectors.
  • Ensure proper power supply (5V) to prevent damage to the internal components.

8. Solució De Problemes

  • La pantalla no s'encén:
    • 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. Consells d'usuari

  • 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.
  • Consulteu regularment la pàgina oficial de M5Stack website or community forums for updated firmware and libraries to enhance functionality and resolve potential issues.

10. Garantia i Suport

For warranty information and technical support, please refer to the official M5Stack weblloc web o contacteu directament amb el servei d'atenció al client. Conserveu el rebut de compra per a qualsevol reclamació de garantia.


Mòdul de visualització LCD a color M5Stack UNIT 1.14" ST7789V2 amb interfície I2C

Mòdul de visualització LCD a color M5Stack UNIT 1.14" ST7789V2 amb interfície I2C

0:40 • 720×720 • feature_demo

Documents relacionats - UNIT COLOR LCD

Preview Guia d'operació de l'M5StickC Plus2
Guia completa d'operació per a la placa de desenvolupament IoT M5StickC Plus2. Aquesta guia cobreix escenaris comuns de resolució de problemes, inclosos errors d'arrencada i problemes de bateria, i proporciona instruccions detallades pas a pas per instal·lar el firmware oficial amb l'eina M5Burner, incloent-hi els procediments essencials d'instal·lació del controlador USB i de selecció de ports.
Preview Placa de desenvolupament M5Stack StickC-Plus2: característiques, especificacions i ús
Més detallatview de la M5Stack StickC-Plus2, una placa de desenvolupament ESP32-PICO-V3-02 compacta. Cobreix les característiques, les especificacions tècniques, les opcions de programació com ara UIFlow i Arduino IDE, la gestió d'energia i les comparacions de maquinari.
Preview M5Stack STAMP-PICO: ESP32 IoT Development Board User Manual
Explore the M5Stack STAMP-PICO, a compact ESP32-based IoT development board. This guide covers its specifications, quick start setup with Arduino IDE, Bluetooth serial communication, and Wi-Fi scanning capabilities.
Preview Guia d'operació i configuració de l'M5StickC Plus2
Guia completa de la placa de desenvolupament M5StickC Plus2 de M5Stack, que cobreix la configuració, el flasheig de firmware, les característiques, les especificacions i les aplicacions per a projectes d'IoT.
Preview M5StickC PLUS2: Placa de desenvolupament IoT ESP32-PICO-V3-02
Explora l'M5StickC PLUS2, una placa de desenvolupament IoT avançada basada en ESP32-PICO-V3-02 de M5Stack. Descobreix les seves característiques, especificacions, tutorials i diferències respecte al seu predecessor, ideal per a prototipatge ràpid i projectes creatius.
Preview M5StickC-Plus SE: Development Board Technical Specification and User Guide
Detailed technical specifications, pin descriptions, functional overview, electrical characteristics, and FCC compliance information for the M5StickC-Plus SE development board by M5STACK.