grounding issues with ILI9341 and teensy 4.1

mskl99

Member
I have used the ILI9341 touchscreen several times in past with Teensy 3.2, Teensy 3.5. With Teensy 4.1 I have a problem. Everything works fine as long as my ground wire from display to Teensy is less than 5 inches. Anything longer and the display doesn't work. I designed the PCB board and I crammed way too much stuff on it, so the ground plane is a little sketchy. However, I hardwired the ground input to the teensy ground. The picture shows the display working fine with the very short orange ground wire directly wired into the Teensy ground pin. When I lengthen it with the little piece shown, it doesn't work.
I need to be able to use a longer ground wire. Any ideas?
Thanks,
-Mike
IMG_6819.jpg
 
@mskl99 (Mike): Do you have access to an o-scope ?? You might take a look at the clock & data signals between the display & the Teensy to see if you see any signal bounce/ringing. If so, you could try putting a 100-ohm resistor in series with the MOSI & SCK signals, which has been shown to help dampen the signal ringing with other types of displays, etc.

Hope that helps . . .

Mark J Culross
KD5RXT
 
Thanks for the quick reply. I do have an oscilloscope. How would I detect the signal ringing? And which lines are the data and clock signals?
Unfortunately, this device really is a black box to me, lol.
Thanks.
 
@mskl99 (Mike): If you have wired things in the typical fashion, the signals mentioned above (MOSI, pin 11 on the Teensy & SCK, pin 13 on the Teensy) will be the ones most likely to be ringing (ringing: you'll see where the base-level square wave has extra high & low transitions instead of a sharp low-to-high or high-to-low, clean transitions). The extra transitions from this ringing can be misinterpreted as either extra clocks (on SCK) or wrong bits (on MOSI). Make sure that you have a very good ground connection to your o-scope probe when measuring (as short as possible, and as close to the signal that you are measuring as possible). Measure the signals both at the Teensy end of the wire & at the display end of the wire. I forgot to mention that the inline resistors, if you choose to try that fix, should be placed as close to the Teensy as possible (even better if you are able to cut a trace on your PCB & put them right next to the Teensy).

Mark J Culross
KD5RXT
 
Thanks for the help. With the longer ground wire (display doesn't work), I measured the signals at MOSI and SCK pins on both the teensy and the display. Images are attached. They aren't great quality tracings, but I don't really see any ringing. Should I go ahead and wire in the 100R resistors on the PCB?
BTW, the signals basically looked the same with the short ground wire and the display working properly.
Thanks again for your help,
-Mike
 

Attachments

  • MOSI_Display.jpg
    MOSI_Display.jpg
    200.4 KB · Views: 19
  • MOSI_Teensy.jpg
    MOSI_Teensy.jpg
    208.2 KB · Views: 22
  • SCK_display.jpg
    SCK_display.jpg
    193.3 KB · Views: 18
  • SCK_Teensy.jpg
    SCK_Teensy.jpg
    203.1 KB · Views: 18
It's an old Tektronix 2445 150MHz scope. Noise rejection is off. There is a 20MHz BW limit button which is not pushed. I agree that the square waves look like the high frequencies are attenuated.
I reduced the clock speed to 24MHz and was able to add 3 inches of length to my ground wire. I will install the 100R resistors and see what happens.
I'm not sure why I'm having this weird problem. I've put several of these in amps (with 3.1, 3.2 and 3.5 Teensies) and everything was smooth. I still love my Teensies, though.
-Mike
 
I installed the 100R resistors and all seems well. I tried a 9 inch ground wire and ran it at 600MHz and it worked perfectly. Thanks so much for your help.
-Mike
 
The picture shows the display working fine with the very short orange ground wire directly wired into the Teensy ground pin. When I lengthen it with the little piece shown, it doesn't work.
I need to be able to use a longer ground wire. Any ideas?
The pciture shows the ground wire is not running alongside the other wires, so there's a whole heap of loop inductance that you don't want there. Every signal line should run alongside a ground return wire, ideally a return ground wire per signal wire. Keeping the ground apart from the signal wires means they have to impose return currents on each other, leading to signal corruption.
 
Thanks for that. I had no idea. I guess I've been lucky with previous displays, The display is working fine in the amp now, but I am going to
reroute the ground wire with the signal wires and hopefully I'll see an improvement (i.e. longer ground wire that I don't have to solder directly to the teensy ground pin.
-Mike
 
Back
Top