Sets the X and Y axis maximum coordinates. For example, a screen can be configured for depending on these values.
system. The map is generally divided into three primary functional areas: Orient Display Real-Time Commands (0x8040):
First, perform a dummy write of the 16-bit address you want to read from. Then, issue a restart condition and read the data. Auto-Increment:
during startup to verify you are talking to the correct hardware before applying configurations. ESD Protection: Regularly write and check the value at register if your device operates in high-interference environments. 3. Register Map
If you’ve worked with capacitive touch screens on Raspberry Pi, ESP32, or STM32 projects, you’ve likely encountered the . This popular touch controller from Goodix is everywhere—from cheap 7-inch LCD displays to industrial HMI panels. gt911 register map
To reconstruct the actual X pixel position in your code, combine the high and low bytes using a bitwise shift:
For any command value greater than 0x07 , it's a requirement to first write that command to register 0x8046 . This two-step process is designed to enhance the chip's robustness against electrostatic discharge, preventing spurious commands from triggering unintended mode changes.
if(touch_count > 0) touch_data[1]; uint16_t y = ((uint16_t)touch_data[4] << 8)
When implementing a bare-metal C/C++ driver for the GT911, your main execution loop or ISR (Interrupt Service Routine) should implement the following steps: Sets the X and Y axis maximum coordinates
The GT911 maps all its functions—configuration, real-time control, status reporting, and coordinate data—into a unified 16-bit memory address space. Because the register addresses are 16-bit, any I2C write or read operation must transmit the high byte of the register address first, followed by the low byte. The memory map is broadly divided into three main zones: Address Range Register Zone Description Access Type Configuration Registers Visual size, touch thresholds, interrupt modes Read / Write 0x8140 – 0x814E Control Registers Command registers, software reset, power modes Read / Write 0x814F – 0x8177 Coordinate Information Touch status, point counts, X/Y track coordinates 1. Configuration Registers (0x8047 – 0x8100)
What or development board (e.g., ESP32, STM32, Arduino) are you pairing with the display?
Adjusts the sensitivity of the touch panel. Lower values increase sensitivity but make the screen more susceptible to electrical noise. The Configuration Update Protocol
. Its memory space is logically divided into four primary functional blocks: Register Range Description Access Type 0x8040 – 0x8046 Command and Status Read/Write (R/W) 0x8047 – 0x80FF Device Configuration Read/Write (R/W) 0x8100 – 0x813F Coordinate Data (Touch Points) Read-Only (R) 0x8140 – 0x814E Product ID and Hardware Info Read-Only (R) 2. Core Functional Blocks Command & Status (0x8040 – 0x8046) The map is generally divided into three primary
To retrieve touch coordinates reliably, you should follow this sequence according to the GT911 Programming Guide :
if (!(status & 0x80)) return 0; // No new data
Understanding the GT911 Register Map: A Complete Programming Guide
A 16-bit value specifying the vertical resolution of the LCD screen (Low Byte at 0x804A , High Byte at 0x804B ). Number of Touch Keys ( 0x804C ): Maximum allowed simultaneous touch points. The supports up to 5 points.
| Register Address | Register Name | Description | | --- | --- | --- | | 0x00 | Chip ID Register | Stores the GT911 chip ID | | 0x01 | Configuration Register 1 | Stores configuration data for the touch controller | | 0x02 | Control Register 1 | Controls the chip's functions, including enabling or disabling the touch controller | | 0x10 | Touch Point Data Register | Stores touch point data, including x and y coordinates, touch pressure, and other relevant information | | 0x20 | Interrupt Status Register | Provides interrupt status information, including touch point detection, error flags, and other interrupt sources |