Bodmer / TFT_eSPI

Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips
Other
3.53k stars 1.02k forks source link

Seeed XIAO RP2040 & ILI9341 Touch not working #2803

Closed dslocum closed 10 months ago

dslocum commented 10 months ago

I have a Seeed XIAO RP2040 with the these connections.

T_DO -> MISO pin (e.g. TFT_MISO) T_DIN -> MOSI pin (e.g. TFT_MOSI) T_CS -> pin of you choice specified in setup file as TOUCH_CS T_CLK -> SCLK pin (e,g, TFT_SCLK) T_IRQ -> not connected

The display works fine with any of the demos I've tried, but I can't get any touch examples to run.

I'm currently using Test_Touch_Controller.ino and the Serial monitor shows all 3 parameters = "0". On a o'scope there are reasonable signals on the pins and I even get outputs on the MISO line that appear to have data changing as I move my finger / stylus. Screenshot 2023-08-19 131823

Anything else I could look for?

_Originally posted by @dslocum in https://github.com/Bodmer/TFT_eSPI/discussions/2230#discussioncomment-6769564_

Bodmer commented 10 months ago

I am guessing you are trying to use the PIO based SPI interface which does not support SPI reads. See here:

https://github.com/Bodmer/TFT_eSPI/blob/master/User_Setups/Setup61_RP2040_ILI9341_PIO_SPI.h#L7-L11

Make sure line 11 is commented out.

Bodmer commented 10 months ago

Asumed resolved.

dslocum commented 10 months ago

Hi, Sorry to be away from this so long - and please understand that I'm new to the RP2040 CPU. Unfortunately, I've been unable to resolve this yet.

I appreciate about the pointer to the PIO config, but I don't believe I'm using PIO so therefore assume this wouldn't apply in my case. I think I'm connecting the XIAO board correctly to use SPI, but unsure which config file to select or modify - as none of them seem to have the RP2040 + ILI9341 + Touch.

Although I can no longer find the reference, I'm pretty sure I saw an article where someone was using a (PICO???) and sharing the SPI with the display and touch using (IIRC) separate chip selects.

What config file would be best to start working with - or is this somehow not possible?

Thanks