tft glitches

Status
Not open for further replies.

grahamguitarman

Well-known member
Hi I'm looking more for confirmation than advice.

I've recently been having difficulties with a tft touch displsy (not the pjrc one but identical - it costs way too much to ship pjrc ones to the uk).
just recently the TFT display has been corrupted after a few minutes running, colours going wrong, bits missing, lines across the screen.
I've been racking my brains for a few days trying to figure out why, then I think i figured it out.
after having to reinstall arduino and teensyduino, I could not remember what setting I had been on previously so set Arduino to teensy 3.5 & optimisation fastest + pure code.
I've just changed that to optimisation fast, and the display has been running fine for the last few hours with no glitches.

Am I right in thinking it was the optimisation settings that caused the problem?
or am i barking up the wrong tree?
 
Depending on the display, it might also be the SPI bus speed. I've seen OLED displays that can't receive data fast enough when the Teensy 3.5/3.6 are running at full speed. Now, the small TFT displays I've used don't seem to have a problem, but perhaps the display you are using can't receive data fast enough, or perhaps it is because the TFT display has a larger screen which shows up the problem.

If you look in the code (probably the library), there should be a constructor or call to SPISettings. The first argument is the SPI bus speed. You might want to use a lower value.

It could also be your code (or the library code) uses code that has undefined behavior, and increased optimization means the compiler might optimize it a different way.
 
just for reference, the TFT Display is identical to the Teensy TFT display. but I will look at the spi speed when i gewt the time.
 
just for reference, the TFT Display is identical to the Teensy TFT display. but I will look at the spi speed when i gewt the time.

Yes, but the maker may have used different, slower components that limits the speed of the display. For example, I noticed this with the SSD1351 OLED displays (128x128). The Adafruit OLED display can only be driven at a SPI bus speed of 8Mhz without glitching, while the Wavelan OLED display can be driven with a SPI bus speed to 11Mhz. Now, the SSD7735 TFT displays that I have can be driven at 24Mhz.

Also check your wires, and make them as short as possible. You might also need to use shielded wire.
 
Status
Not open for further replies.
Back
Top