Hi,
I want to drive 20 OLED displays (SSD1306 type) with a teensy 4.1 from a single SPI port (in total I have 40, using the two available SPI ports). The desired SPI speed is 20 Mhz.
The initial design had two chains of 10 displays connected to the teensy 4.1. This has caused the SPI.transfer(...) function to hang. The cable length of each chain was 40 cm. Interestingly, with a teensy 3.6 this does not happen.
I then connected all 20 displays in one chain, which eliminated the SPI.transfer(...) hang issue. However, the communication still is not perfect. The two displays that are closest to the teensy don't work properly or not at all.
It seems that I am having termination issues/reflections etc.
I am now considering options:
1) Adding a series resistor in the clock and MOSI line at the teensy source. Is 20 Mhz possible with a series resistor? Which values should I check? 30R, 100R?
2) Adding two resistors, one to ground, one to 3.3V at the end of the chain. I tried a value of 100R, which improved the situation a lot, it is basically working, but sometimes still has occasional glitches. I wonder if a smaller resistor value would improve things even more. The reason for me not trying it is that here https://www.pjrc.com/store/teensy41.html it says "The recommended maximum output current is 4mA." Here https://www.pjrc.com/teensy/techspecs.html it says 10 mA. Which one is correct? With the 100R resistors, I am already outside of the 10 mA.
3) Doing both 1 and 2.
4) Any other ideas?
The SPI lines for the most part go over a nice large ground plane.
Further question: Why is the single chain better than the two, smaller chains?
I want to drive 20 OLED displays (SSD1306 type) with a teensy 4.1 from a single SPI port (in total I have 40, using the two available SPI ports). The desired SPI speed is 20 Mhz.
The initial design had two chains of 10 displays connected to the teensy 4.1. This has caused the SPI.transfer(...) function to hang. The cable length of each chain was 40 cm. Interestingly, with a teensy 3.6 this does not happen.
I then connected all 20 displays in one chain, which eliminated the SPI.transfer(...) hang issue. However, the communication still is not perfect. The two displays that are closest to the teensy don't work properly or not at all.
It seems that I am having termination issues/reflections etc.
I am now considering options:
1) Adding a series resistor in the clock and MOSI line at the teensy source. Is 20 Mhz possible with a series resistor? Which values should I check? 30R, 100R?
2) Adding two resistors, one to ground, one to 3.3V at the end of the chain. I tried a value of 100R, which improved the situation a lot, it is basically working, but sometimes still has occasional glitches. I wonder if a smaller resistor value would improve things even more. The reason for me not trying it is that here https://www.pjrc.com/store/teensy41.html it says "The recommended maximum output current is 4mA." Here https://www.pjrc.com/teensy/techspecs.html it says 10 mA. Which one is correct? With the 100R resistors, I am already outside of the 10 mA.
3) Doing both 1 and 2.
4) Any other ideas?
The SPI lines for the most part go over a nice large ground plane.
Further question: Why is the single chain better than the two, smaller chains?