Arduino – capacitive touch screen with sd card – pt1

Recently I bought this touchscreen for an upcoming arduino project, when I picked it out, I knew that the documentation would probably be ok at best, as is typical with these brands of unknown reputation, but when I found myself having to piece together how to use the thing based on amazon reviews, I decided that I needed to leave myself some documentation about the dang thing. Especially since our AI ovloards were remarkably unhelpful.

 

Important Specs


  • Working Voltage – 5v, I have tried hooking it up to the 3.3v pin, and it seemed like it was working
  • Touch Screen Driver – FT6336U (up to 2 touches at a time)
  • Screen Driver – ST7796U
  • The product listing claims IPS, the back of the product says TFT
  • Micro SD card slot

When working with a screen like this it is important to understand that the display and touch capabilities are separate. If you live in app land, like iOS/Android, you write code where you put buttons on a screen, and you add events for your touch interactions. Its actually very similar. You can’t just draw a button and expect touches to magically work. And likewise you can make it so touches are triggering buttons without actually drawing them.

With that in mind, you have to hook up to pins to control the various features separately.

And each topic could use its own article as they can be quite in depth.

 

Pinout


As mentioned above, the board has the pinout for the different components on it. Each of the different components can be connected to and controlled independently

 

 

Pin
SD_CS SD chip select, active low
CTP_INT Capacitive Touch Panel Interrupt
This must be wired to an interrupt pin on the arduino if using interrupts instead of polling
CTP_SDA Capacitive Touch Panel IIC bus data signal
CTP_RST Capacitive Touch Panel Reset. low resets (connect to 5v for normal operation)
CTP_SCL Capacitive Touch Panel IIC Bus clock signal
SDO(MISO) SPI bus read data signal
LED Ground to turn off screen backlight. floating leaves it on
SCK SPI bus clock signal
SDI(MOSI) SPI bus write data signal
LCD_RS LCD command/data selection chip select
high data, low command
LCD_RST LCD reset, low reset (connect to 5v for normal operation)
LCD_CS LCD chip select, low active
GND ground
VCC 5v recommended
3.3v works, but with dimmer backlight

SPI bus is shared between the SD and LCD. the SD chip select selects between them

Leave a Comment

Your email address will not be published. Required fields are marked *