TFT Shield + SPI device

Hi all,

I’m facing a problem with a shield TFT_MEGA_V2 and a Display ILI9341_16 3.2’’
I’ve attached an RTC DS3234 SPI device to a Mega 2560, it work fine with Henning Karlsen library.
The RTC is connected on pins 49,50,51,52 ( CS,DO,DI,SCKL).
When I connect the TFT_MEGA_V2 shield it stop to transmit data ( also with LCD screen disconnected )
The shield use also the SPI connection to use the SD card on board of the display (see the attachments ).
It looks that the SPI SD card use as CS the pin 53, so I’ve tried to force the pin HIGH to disable the communication with the device but still the RTC doesn’t send data :o Can anyone help?
Just to clarify, the display work fine, and the touch screen as well, so I think there’s no hardware problem on the TFT_MEGA_V2.

I know the argument is more related to SPI communication than display itself, but I choosed this section of the forum for my post because I hope some other " TFT display player" faced similar problems and can find a solution for this case.

Thanks in advance,
Abraxas

TFT_MEGA_V2.0.pdf (41.6 KB)

First off. Does your pcb actually match the schematic?

It looks as if U4 has /OE0 and /OE1 hard-wired to GND. So the MISO line from the SD Card will b*gger up the SPI bus for everything else.

If you were to connect SDOUT directly to MISO, it would 3-state just as Nature intended. If you put a 1k0 series resistor in the MISO line, it would prevent your 5V Mega harming a 3.3V Slave.

David.

Thanks David,

great hint! I decided to manage in a different way in order to be able to use RTC and SD card as well. I've disconnect the MISO direct connection to U4 and I've put in between an optocoupler manageable by a Mega2560 digital output, so that I can use both if needed.

Thanks, Abraxas

You really do not want optocouplers with data signals. A resistor should be fine. Or you could use a level shifter with its /OE controlled by /CS.

I am a little surprised that your TFT Adapter shield works in this way.

Life is much simpler with 3.3V Arduinos. No need for any level shifting.

David.