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.69k stars 1.06k forks source link

readRect and pushRect don't work! #134

Closed pbecchi closed 6 years ago

pbecchi commented 6 years ago

I am trying to move a screen 20x20 area to another screen point. All what I get is a black square! I am using a 3.5 RPi ili9486 SPi Tft. The code look like this: int16_t data[400]; tft.readRect(100,100,20,20,data); tft.pushRect(150,150,20,20,data);

Bodmer commented 6 years ago

The RPi TFT is write only and does not permit reading of the CGRAM. This is a limitation of the RPi screen design.

The readRect() works OK with ILI9341 SPI and UNO style 8 bit parallel displays.

I hope to find time to write a user manual for the library but I am very busy with paid work at the moment!

pbecchi commented 6 years ago

Thanks...a manual coul be very usefull....does ili9488 allow reading CGRAM?

Bodmer commented 6 years ago

Yes, but the TFT driver can be configured for bidirectional SPI or separate MISO and MOSI signals so it is a bit hit and miss when ordering a display. I have not got it working at all on some displays, possible due to some timing issue or undocumented display configuration made at PCB level.

The only displays I have tested the reading of CGRAM are the ILI9341 SPI and ILI9481 8but parallel displays. Reading the CGRAM on an SPI display is very slow. I recommend using an UNO style ESP32 and UNO style TFT if reading CGRAM is a must have feature for your sketch.

pbecchi commented 6 years ago

Ok thanks again .....I will make some trial and let you know the results. I want to create a pop-up windows, so I need to save and restore the background, I cannot think any 9ther method!

Where a can find how to configure bidirectional SPI? It should not be by default?