Skip to content
Display Engineer
Touch controller · Hynitron

CST816S: datasheet, pinout & init code

CST816S is a single-touch capacitive touch controller from Hynitron with an I2C interface and built-in gestures, used on small and round displays such as 1.28″ 240×240 modules.

DEDisplay Engineer Applications Team · Display application engineersUpdated Oct 21, 2026
ManufacturerHynitron
TypeTouch controller
InterfacesI2C
Max resolution1 touch point

CST816S at a glance

Item

Value

Source

I2C address (7-bit)

0x15

Espressif esp_lcd_touch_cst816s; Linux device-tree example

Touch points

1 (single finger)

Espressif driver and README

Touch data

Starts at 0x01 (gesture), then 0x02 (fingers), X at 0x03–0x04, Y at 0x05–0x06

Linux hynitron-cst816x driver

Chip ID register

0xA7

Espressif driver

Linux compatible

hynitron,cst816s

Linux device-tree binding

Reading a touch

The Linux driver reads 6 bytes from register 0x01:

Register

Contents

0x01

Gesture code

0x02

Number of fingers (0 or 1)

0x03–0x04

X, big-endian, low 12 bits

0x05–0x06

Y, big-endian, low 12 bits

Gesture codes handled by the Linux driver: 0x01 slide up, 0x02 slide down, 0x03 slide left, 0x04 slide right, 0x0C long press.

The CST816S doesn't answer until you touch it

Espressif's README warns that the chip "only responds to I2C commands after an event, such as a touch detection. Do not expect it to respond on init." That is why an I2C scanner at boot often finds nothing at 0x15, and why ESPHome has a skip_probe option that skips reading the chip ID at startup. Espressif adds that on some chips reading the ID can make initialization fail. Touch the screen while you scan, or skip the ID check.

Reset and interrupt

  • The Linux driver drives reset for 50 ms, releases it and waits 100 ms. Espressif's driver waits 200 ms on each side.
  • INT is optional in Espressif's driver (it can poll). The Linux driver requests an interrupt and fails to probe without one.

Phantom (ghost) touches

One developer has published a test sketch showing the CST816D on the Waveshare ESP32-S3-Touch-LCD-2 reporting touches nobody made, mostly along the vertical centre line, on two boards and with Waveshare's own demo code. No fix has been confirmed. If you see ghost touches, first run the vendor's demo to separate hardware from your code, then check the board's power and grounding before filtering touches in software.

Related controllers

ESPHome's cst816 component lists CST716, CST816D, CST816S, CST816T, CST820, CST826 and CST836. For 4″–7″ multi-touch panels see GT911; for round 1.28″ displays see our GC9A01 + ESP32 guide.

Guides & comparisons

CST816S troubleshooting & FAQ

Why is my CST816S not detected on I2C?

The CST816S only responds to I2C after an event such as a touch, so a scan at boot usually finds nothing at 0x15. Touch the screen while scanning, release reset first, and in ESPHome set skip_probe: true. Espressif notes that on some chips reading the ID can make initialization fail.

Does the CST816S support multi-touch?

No. It reports a single finger; Espressif’s driver caps the point count at 1. It does report gestures: slide up, down, left and right, and long press. For multi-touch use a GT911-class controller.

Why does my CST816 report ghost touches?

One public report shows a CST816D on the Waveshare ESP32-S3-Touch-LCD-2 reporting touches along the vertical centre line with the vendor’s own demo code, and no fix has been confirmed. Run the vendor demo to rule out your code, then check power and grounding before filtering touches in software.

Sources

  1. Espressif ESP-BSP: esp_lcd_touch_cst816s driver
  2. Espressif ESP-BSP: esp_lcd_touch_cst816s README
  3. Linux kernel: drivers/input/touchscreen/hynitron-cst816x.c
  4. Linux kernel: hynitron,cst816x device-tree binding
  5. ESPHome: CST816 touchscreen
  6. seanuleh: ghost-touch test sketch for Waveshare ESP32-S3-Touch-LCD-2 (CST816D)

Not sure which display fits your design?

Send us your size, interface and host processor. A display engineer replies within 12 hours with 2–3 options, datasheets and init code. Samples from 1 pc.