ST7735 Occasional White Screen with Teensy 3.2

Status
Not open for further replies.

RonanCJ

New member
Hello all! I've run into a strange problem with my Teensy 3.2 and Adafruit ST7735 display shield, and after fruitlessly trying to identify a root cause or pattern I thought that maybe someone here would be able to help. Apologies if this has already been answered elsewhere, I didn't find a similar problem when I searched on these forums or on Google.

Essentially, when I modified the graphicstest_highspeed sketch that comes with Teensyduino to loop infinitely and uploaded it to my Teensy 3.2, I found out that the Adafruit display shield would occasionally turn completely white while the rest of the sketch continued to run normally on the Teensy (as evidenced by LED activity). After the display turned white, it would stop updating until the Teensy was reset. There doesn't seem to be any pattern for when this occurs, although when it does happen it's usually after several minutes of looping through the sketch. I'm wondering if this could be a display issue caused by the high speed of the Teensy 3.2 compared to an Arduino Uno, since it doesn't seem to occur when the display shield is plugged into an Uno.

I wired the Teensy based on the Adafruit tutorial, with the DC and RESET pins being swapped since the graphicstest_highspeed example had DC on pin 9 instead of the Adafruit tutorial's pin 8. The setup is powered via a USB 3.0 port on a laptop. I coded everything in the Arduino 1.8.5 IDE and used Teensyduino 1.40 to upload it to my Teensy 3.2. I thought I was using the Teensy-optimized ST7735 library that is installed with Teensyduino, but messages from the Arduino IDE compiler seem to suggest otherwise:

HTML:
Multiple libraries were found for "Adafruit_GFX.h"
 Used: D:\Libraries\Documents\Arduino\libraries\Adafruit_GFX
 Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Adafruit_GFX
Multiple libraries were found for "Adafruit_ST7735.h"
 Used: D:\Libraries\Documents\Arduino\libraries\Adafruit_ST7735
 Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Adafruit_ST7735
Using library Adafruit_GFX at version 1.2.2 in folder: D:\Libraries\Documents\Arduino\libraries\Adafruit_GFX 
Using library Adafruit_ST7735 at version 1.0.8 in folder: D:\Libraries\Documents\Arduino\libraries\Adafruit_ST7735 
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI 
Sketch uses 29788 bytes (11%) of program storage space. Maximum is 262144 bytes.
Global variables use 4688 bytes (7%) of dynamic memory, leaving 60848 bytes for local variables. Maximum is 65536 bytes.

I have attached a wiring diagram and a photo of the circuit, along with a text file with messages from the compiler and my .ino file itself. Any help or ideas on what may be causing this behaviour would be greatly appreciated! :)

teensyst7735 diagram lowres.jpgIMG_20171102_teensydisplay.jpg
 

Attachments

  • teensyduino compiler output ST7735 Nov 3.txt
    56.9 KB · Views: 97
  • graphicstest_highspeed_loop.ino
    8.8 KB · Views: 92
Last edited:
You might see if it clears up by removing these two files:
Using library Adafruit_GFX at version 1.2.2 in folder: D:\Libraries\Documents\Arduino\libraries\Adafruit_GFX
Using library Adafruit_ST7735 at version 1.0.8 in folder: D:\Libraries\Documents\Arduino\libraries\Adafruit_ST7735

I had a similar sounding issue on an ILI9341 - it was an electrical issue and it got worse over time. Did not repeat on other or replacement display. It seemed to be the onboard voltage regulator that had a bypass jumper for Teensy only 3.3V usage that then made it work properly. That may not apply to this display which I have not seen or used.
 
Thanks for the reply defragster! Removing those two files is definitely an option, but I would prefer to not do so since I do some Uno development and would like the regular libraries to still be available (assuming that the Teensy-optimized libraries are incompatible with an Uno). If other steps don't work though, I'm open to doing this.

I had a similar sounding issue on an ILI9341 - it was an electrical issue and it got worse over time. Did not repeat on other or replacement display. It seemed to be the onboard voltage regulator that had a bypass jumper for Teensy only 3.3V usage that then made it work properly. That may not apply to this display which I have not seen or used.

Good to know that this issue isn't totally unheard of. I shall try powering the ST7735 off the 3.3V pin on the Teensy and see if that makes a difference.
 
I suggest taking out those two files as a first step test - you can then restore them for UNO usage. If the problem is software based with Teensy operation that will show it to work. If it has no effect that points toward something in the display.

This is the item I was referring too - that display is powered from VIN at 5V as shown - but interface connections are all 3.3V levels - I'm not sure what the directions and specifications are for the ST7735 display. The change I did was from the forum link shown on that page: "this hardware modification ", and it may have no application to your hardware - but for the ILI9341 when I did that the display returned to normal operation after it seemed the controller stopped driving the LED grid leaving only the backlight to show.
 
That's a fair point, and it would indeed be pretty easy to restore the files when I need them. As a matter of fact, I ended up running the sketch again 10 times to see if I could determine a pattern to the failures, and each run (which lasted for 8 minutes 20 seconds) completed without issue. Since I had made no modifications to the circuit or any code/libraries at this point, I'm not sure what caused the shield to work properly this time. However, if the problem occurs again I'll check if removing the non-Teensy libraries makes a difference and carry on from there. Thank you for your help!
 
It is very easy to move and restore - beside my sketchbook\libraries is sketchbook\notlibraries - I just uniformly move things there to hold.

Disturbing that the error is a bit nebulous . . .
 
Yes, it is indeed. It wouldn't make sense to treat the error as "solved" at this point, but you're right though: it wouldn't hurt to move the potentially offending libraries into a different folder just to see if that makes a difference in the future. If the white screen issue happens again, then at least I will know for sure that it is a problem with the display.
 
Status
Not open for further replies.
Back
Top