Display Sometimes INOP

jerryk

Active member
Hello!

I'm working on an open-source ham radio project ( T41 ), which has a Teensy 4.1 connected to a 5 inch Buydisplay LCD via SPI. Not sure which version of TeensyDuino I have, but it's a recent one.

The problem in a nutshell: Sometimes the display comes up, and sometimes it doesn't.

More specific: If I start the prototype up cold - power's been disconnected for a while - the display does NOT come up.
If OTOH I do a quick power cycle - pull the power plug and reinsert - the display will come up fine.

ALSO: when the display does NOT come up, the loop() function is not executed. However, setup() *is* executed. I verified this
with a scope hooked to an unused pin, I have it toggle the pin at the top of loop(). When the display does come up, I see pulses
at that pin. Display didn't come up? No pulses. So loop() is not being executed. I had it light a LED at various points inside setup() -
that worked, and verified that setup() is being executed, and proceeding to its end, regardless of whether the display came up or not.

I thought that setup() was getting at the video too fast, and I stuck a delay at the beginning. Tried various delays, up to THIRTY SECONDS - no difference.

The LCD has an RA8875 controller.
Pulling out my few remaining hairs on this one :). Thinking that the RA8875 library is doing video stuff when the video object
gets instantiated.

Nah....I found the library, stuck a five second delay at the beginning of the startup code - no difference.
 
Jerry:

I have a project that is very similar to the T41 in that it makes use of the Teensy4.1 + 7" RA8875 touchscreen display. I first built my TeensyMIDIPolySynth on a perfboard/wire-wrap, and everything worked like a champ. Feeling pretty good about the hardware design, I attempted to convert the design to a PCB. Unfortunately, I had lots of trouble: the *exact same physical display* that worked on the perfboard wire-wrap version refused to work on the PCB version. This is actually a signal quality problem, not a software problem !! The final solution (which I credit to finding in a post elsewhere on this forum) was to place a 100 ohm resistors in series with each of the MOSI & SCK signals (actually, I am using SPI1 for my display, so to be completely correct, my resistors are in series with the MOSI1 (pin 26) & SCK1 (pin 27) signals). These series resistors need to be located as close to the Teensy4.1 as possible. Adding these resistors has the desired effect of reducing the "ringing" on these two very fast signals. Hopefully, this mod will work equally well for you . . .

Mark J Culross
KD5RXT
 
I doubt that this particular problem is due to SPI issues. Because of the times. I did some tests - if the power is off
for 10 seconds, the rig comes up normally. If it's off for 15 seconds, the rig comes up normally. If the power is off for 17 seconds, the display comes up INOP.

And that's invariant. 15 seconds power off, normal video. 17 seconds or more power off - comes up video INOP.
Not only is it INOP, but the display card doesn't draw any current! Or less current than normal.
I am hard pressed to imagine something different for SPI depending on how long the power was off.

Other T41 builders have seen artifacts like horizontal lines through the display. I think those are more likely to be SPI
issues. I did shorten the ribbon cable from 6 inches to 3 inches...no difference.
 
OK, but aren't two resistors and just a few seconds of your time, with which you may very well have the solution you are looking for at hand, at least worth a try ??

Mark J Culross
KD5RXT
 
Jerry:

Bill (K9HZ) has confirmed to me via email that the additional resistors suggested in my earlier post are, in fact, needed for your display. Do you have them in your setup already ??

Mark J Culross
KD5RXT

"Sorry im now at my farm in Illinois for at least a week. From the schematic, you can see places for those resistors now… and we found that 220 ohm worked best for this display. Anyone can easily change those… located on the bottom of the Main board by the “display” connection… "
 
If Bill put them in the board, they're there. I basically stuffed the whole board from the BOM. I discovered that loop() is executed regardless of whether the video works or not; but it gets stuck if the video is INOP. I removed all video activity from loop() and stuck a scope on an unused pin. Patched the software with instructions to toggle that unused pin on every swing. Got nice 500uS pulses out.

I just built a breakout card for the video cable. Plan to scope everything on it, find out the difference between the
two startup regimes. Maybe tomorrow.
 
I found a fix. The T41 V12 card has a power up coprocessor. It's an attiny85, and it turns the radio on & off. Before it turns the radio off, it
asks permission so the Teensy ( main processor ) has the opportunity to tidy up & save stuff. I modified it to "hiccup" the power. It turns the Teensy on, waits a moment, turns it off again, waits a moment, and then turns it on for good.
 
Any kludge such as that may work...at least until it doesn't 🤣. Hopefully, someone will be able to find the actual problem and a corresponding true, reliable fix.

Mark J Culross
KD5RXT
 
Back
Top