Skip to content

Fix compatibility with other SPI devices

max mc costa edited this page Oct 20, 2015 · 20 revisions

Introduction

Connecting other SPI devices can be problematic when you are using High Speed SPI and chip with hardware bug like RA8875 that also uses SPI mode 3, you will need the help of some simple electronics. I got many headaches with this chip when I've tried to use an SD card in SPI, I've got any type of mulfunctions, from garbage and screen freeze to both devices not working at all. The reasons are many, RA8875 has a bug in MISO pin that doesn't work as tristate as it should be and remain high, the chip works as SPImode3 so the SCLK and MOSI are HIGH, the I/O of the RA8875 are weak so are prone to receive tons of interferences and so on... To be honest I never plan to get images from an SD card but get many frustrated because this is a very good example of the common future problems. The Paul Stoffregen solution for MISO not worked well with the SD card, the SCLK also interfere, so I have to isolated completely the display when CS it's HIGH to leave the SD card free to communicate with MCU. The circuit below help to reach this...

A solution for Teensy 3, Teensy 3.1 and Teensy LC (and probably DUE)
Apart the MISO bug discovered by Paul Stoffregen, this display uses SPImode3 so the SCLK and MOSI are HIGH during work cycle. The RA8875 MISO signal is weak and not tolerate long cables so, to isolate the display from other SPI devices on the same line, a circuit below it's needed. The Condenser it's a polyester and can be between 0.1uF to 0.68uF, any voltage, it's used just for decoupling. The 74HC125 it's a driver/buffer and all the display SPI lines can flow to the RA8875 only when display CS it's LOW, when high all lines goes high impedance but CS remain HIGH so the display input are disabled

SPI fix

Connecting a SD holder...

Please take a look to this: https://github.com/sumotoy/RA8875/wiki/Working-with-a-SD-card-and-troubleshooting

Solution for 8bit arduinos...

Probably you will not need any of those circuits for your UNO but a simple level-converter (like 4050).
UNO and other 8 bit processors works at 5v and SPI it's far slower than 32 bit micro, this in combination with the level converter will probably fix the problem.