I got it working great without the SD card implemented (no wiring, no code or library).
I decided to try and add the SD feature. The pins are shared between the display and SD card. First I tried wiring it through the 4050 but it did not work. I tried wiring it directly at the pins and it's working great.
My problem is that if I remove the SD card the display becomes really slow. It takes 10-15 seconds to refresh the screen. If I want to use the display without the SD card I have to remove the things related to the SD feature.
So I want to have the SD card capability but I do not want to always have an SD card plugged in. Is there a way I can trick the Arduino to think that an SD card is always inserted (even if it's not)? Or any other way to fix this problem.
Post your schematic. A pencil drawing is fine. Post a photo.
These Red displays work fine with proper 3.3V GPIO.
e.g. ILI9341, XPT2046, SD all on the same hardware SPI bus.
These Red displays should work with Uno / Mega 5V GPIO providing you use level shifters.
Note that CS, DC, RST, ... control signals must be 3.3V logic.
David.
Edit. You appear to have found the Seeed V2 shield. There are links to V2 library, manual, V2 schematic, ...
Print out the schematic. Follow their scheme regarding TFT and SD. You can use different level-shifter chips but make sure that you compare each datasheet.
Thanks, i will change this.
The most important thing for me is that SD and TFT use the SAME HW SPI.
I use ADAFRUIT_ili9341 Lib with this constructor.
By the way, I ordered 2 4 channel level shifters.
KUCKY:
Thanks, i will change this.
The most important thing for me is that SD and TFT use the SAME HW SPI.
I use ADAFRUIT_ili9341 Lib with this constructor.
By the way, I ordered 2 4 channel level shifters.
[You still have some random text e.g. TFT_MISO 5"0"]
One question. Can i use the standard SD Lib? I just want a bitmap as splash screen. It is a part of my RC project.
The most important thing for me is that SD and TFT use the SAME HW SPI.
Very sensible. I always put TFT, Touch and SD on the same SPI bus.
I use ADAFRUIT_ili9341 Lib with this constructor.
Show us your physical wiring. Show us your constructor.
By the way, I ordered 2 4 channel level shifters.
very wise. However your resistor potential dividers should work 100%.
One question. Can i use the standard SD Lib? I just want a bitmap as splash screen. It is a part of my RC project.
Yes, you can use SD.h because you are using the HW SPI bus i.e. 50-52.
Seriously. You seem to be struggling with your Red ILI9341 SPI board. It should be very easy. Many readers use the 3.3V Red SPI boards with Uno, Mega, ... They must use level shifters of some description e.g. series resistors, potential dividers, integrated circuits, ...
The Red boards have a AMS1117 3.3V regulator. You connect VCC pin to 5V. The regulator ensures that the SD card gets 3.3V power.
Your potential dividers ensure that the SD gets 3.3V logic signals from the Mega's 5V GPIO.
Your schematics are helpful but we really need to see the actual wiring.
Does your TFT work 100% with Adafruit_ILI9341 examples?
Does the SD work 100% with SD.h examples? (make sure that TFT_CS is deselected i.e. logic high)
Assuming your schematic from #4 with my mod from #5.
Does your TFT work 100% with Adafruit_ILI9341 examples?
Does the SD work 100% with SD.h examples? (make sure that TFT_CS is deselected i.e. logic high)
WE are in different countries.
Please describe your w
schematic, wiring, library example, ...
The SD card expects 3.3V power and 3.3V logic signals.
Yes, most SD cards seem to be input voltage tolerant for the logic.
You MUST supply 3.3V to the SD but 5V logic signals "work".
There is no guarantee that all SD cards will be tolerant. It is not wise to use 5V logic.
Your current "wiring" is 100%. There is no reason to wait.
You should be able to run all of Bodmer's TFT_ILI9341 examples.
e.g. display .BMP from SD
e.g. display .JPG from SD
e.g. display .JPG from mega2560 PROGMEM
e.g. different fonts
...
Many of Bodmer's TFT_eSPI examples will compile on your Mega2560.