ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..
-
@nca78 said in ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..:
XPT2046
I don't use the XPT2046 or any external ICs , the ESP32 handles it. This approach "costs" 4 pins, but I wanted to keep the BOM smaller. Also, I had concerns about sharing the HSPI with XPT2046, as I use DMA and double video buffer in my projects, I wasn't sure that would work well. The VSPI is dedicated for RFM69, maybe it can be shared with XPT2046 without issues. I guess this is something to experiment with in the following PCB revision
-
@nca78 said in ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..:
XPT2046
I don't use the XPT2046 or any external ICs , the ESP32 handles it. This approach "costs" 4 pins, but I wanted to keep the BOM smaller. Also, I had concerns about sharing the HSPI with XPT2046, as I use DMA and double video buffer in my projects, I wasn't sure that would work well. The VSPI is dedicated for RFM69, maybe it can be shared with XPT2046 without issues. I guess this is something to experiment with in the following PCB revision
@martin-harizanov I had no problem with shared HSPI for both lcd and touch sensor. I use Bodmer TFT eSPI (it manages both lcd and xpt2046 for touch) and it's impressively fast. I have shared with SD card too, and still no problem.
https://github.com/Bodmer/TFT_eSPI
But you will not save 4 i/o as you need at least a chip select for touch, and maybe interrupt pin. -
@nca78 said in ESP32 based IoT gateway/control hub with TFT, touch, RFM69 and more..:
Bodmer TFT eSPI
Bodmer TFT eSPI is just a normal SPI driver, well maybe optimized a bit. The key to speed (IMHO) is to use double frame buffer and DMA for the SPI, that leaves the CPU free to process the next frame while the hardware does the SPI transfer. I am not aware of such TFT library for Arduino.