Seeed-Studio / Seeed_Arduino_RoundDisplay

An Arduino graphics library based on LVGL, specifically designed for Round Display for XIAO
MIT License
24 stars 4 forks source link

Capacitive touch datasheet #3

Closed nicogou closed 6 months ago

nicogou commented 9 months ago

Hi, I can't seem to find a proper datasheet giving a clear indication on the registers/commands to send to the capacitive touch sensor, nor how it is wired. According to the following post: https://forum.seeedstudio.com/t/getting-started-with-seeed-studio-round-display-for-xiao-seeed-studio-wiki/270288/15 the CST816S is used, but the datasheet linked does not contain any register info, so it's hard to decipher anything. Moreover, in this library it's named CHCS6X, so I am a little bit confused. Thanks in advance for your help

Maxwelltoo commented 6 months ago

You are right, the touch chip is chsc6x. As you see in lv_xiao_round_screen.h , Its data is read directly through I2C. The 5 bytes of data are the touch point ID, the high 8 bits of the touch point X coordinate, the low 8 bits of the touch point X coordinate, the high 8 bits of the touch point Y coordinate, and the low 8 bits of the touch point Y coordinate. Hardward only supports a single point and the coordinates do not exceed 240, so only the third and fifth bytes are useful.