Display_ili9341

bps

Active member
Hi,
I'm trying to understand the ins and out of this board. I note that the web page that describes the board says that it is not recommended that the SD card reader be used. However, the page doesn't say why. So, I'm asking: why? The page also mentions that the board uses 3.3v and should not be used with an Uno. Even the 3.3v pin on the Uno? Is there a way to reduce the Uno's 5v to 3.3v for this board?
 
The problem with UNO it's not the 3V3 supply but the Voltage Level of any other pin! You need to feed data at 3V3 volt and connect UNO will result 3V3 on supply and 5V on DATA so you have to use a level converter or your display can be damaged.
About SD, I don't know the display you are actually using, there's tons of display that use ILI9341 driver, for example mine it's chinese and has the SD (and I'm using it), maybe better you provide your display datasheet.
 
I have the ili9341 (from the store) connected to a Teensy 3.1. I am using the optimized library. The sketches run successfully except for spitftbitmap. I have connected the CS pin on the SD reader (yes, I soldered four pins to the vias) to pin 20 on the Teensy and modified the sketch from #define SD_CS 4 to #define SD_CS 20. Otherwise, I have made no modifications to the sketch. I made a purple.bmp file with a color depth of 24 as the sketch requires. When I upload and run the sketch, I get a blue screen and a green screen (over and over via the loop function) but nothing else. In the Serial Monitor, it saves that the file purple.bmp is not found.

The other lines for the SD card reader are connected to the recommended standard lines on the web site. I can run other sketches from the examples. In fact, graphictest seems to run faster with the SD reader connected than without it. I haven't analyzed the numbers so this just might be my perception.

Can someone help me successfully get the SD card reader to actually read a file? BTW, yesterday, I connected just the SD reader (not through the screen but by itself) and ran the cardInfo example from the standard Arduino SD library. I got an error message saying that it could not find the FAT16/FAT32 partition and that I should reformat the card. I tried several cards (it identified their types correctly) and even reformatted one with no better success.
 
First, can you run File > Examples > SD > listfiles?

Is it able to successfully print a list of all the files on your card?
 
Last edited:
If the display is still connected, try adding a pinMode and digitialWrite at the beginning of setup(), so its chip select pin is driven high. That should eliminate any possibility that the display may be interfering with the SD card.

If that still doesn't make listfiles work, then something probably isn't connected properly. Maybe post some photos of your connections? Perhaps we'll be able to see what's hooked up wrong with some good pictures....
 
Paul suggested that I add a pinMode statement to check if there was any conflict with the CS line from the screen. I added one. It didn't help. He also suggested that I send a picture of my wiring. I attach one which I hope is useful. sypniewski051315.jpg
 
I see the display page currently only says "We do not recommend using the SD card socket on this display".

I'll add a more strongly worded statement.
 
I've modified my ili9341 display a little bit.
  • The resistors R1, R2 and R3 are replaced with 0R resistors,
  • ~10k pull-up resistors for SD_CS, TFT_CS and TFT_D/C
  • the solder jumper J1 is closed.
The display is now 3.3V only - max voltage for VCC is 3.3V!

The spitftbitmap example runs without problems (Arduino 1.6.4 & Teensyduino 1.23beta2). Same with SD/CardInfo and ILI9341_t3/graphicstest.
xxy.jpg
 
Thanks for this HWGuy. I'll try this tomorrow. There were no resistors mentioned on the web page. What are R1, R2, and R3 (what is 0R resistors?) and where do they go? It looks like one goes to the LED, one to Vcc, and one to 3.3v; is this correct? I can't make out where the pullups go (in the picture). J1, I take it, is on the Teensy. Your help is appreciated, oh Swami.
 
R1, R2 and R3 are smd resistors on the rear side of the display. 0R is a zero-ohm resistor. J1 is this tiny solder jumper near the voltage regulator.

9341a.PNG
 
Great to see the SD can work. Are the 10K pullups only needed when there are multiple devices online? None are shown on the PJRC product drawing and 'display only' worked as pictured there.
 
The pullups are here to give the CS lines a defined value while they are not configured during startup. It's a good practice to add them.
 
Last edited:
Thanks for the tips. Never having worked with smd components before, how do you substitute resistors? What is a 0R? I see what you said about zero ohm resistors but the idea seems kind of odd to me. Does this mean that, when they are attached, there is no resistance? Where do you get them? By "configured during startup", do you mean pinMode?
 
A 0R resistor is just a conductor shaped like a resistor that is intended to have no resistance. They are available in DigiKey, but if you have some soldering skills you can just solder small wires in parallel with the resistors already present on the board. I would use wire wrap wire, which is 30 AWG. Otherwise these appear to be 0603 smd package resistors, so a DigiKey part number for the zero ohm part would be: MCT0603-0.0-ZZCT-ND. This is a link to that part: http://www.digikey.com/product-detail/en/MCT06030Z0000ZP500/MCT0603-0.0-ZZCT-ND/2607921

To remove the existing resistors, another DigiKey item is recommended, but not absolutely necessary. SMD1-ND is a small kit made by ChipQuik for desoldering smd parts. It is excellent for preventing damage to the printed circuit board. Instructions on how to use it are available on the ChipQuik website at this link: http://www.chipquik.com/datasheets/SMD1.pdf

This is available at DigiKey here: http://www.digikey.com/product-detail/en/SMD1/SMD1-ND/304148

Also, when soldering the new 0R resistors in, start with clean PCB pads, I.E. no solder on them. Place a 0R in position to be soldered and tape one end to hold it in place while you solder the other end. I use masking tape (3M painter's tape works well). If you don't hold the part down it will move as you try to solder it due to the capillary action of the solder as it becomes a liquid. Once one end is soldered properly, you can then remove the tape and solder the other end.

Hope this helps.

-Arlen
 
Last edited:
Once again, your advice is most welcome. I'll give it a try and let you know how I make out. It'll take some time because I'll order that DigiKey removal kit.
 
This youtube video shows another way how to desolder a smd resistor: https://www.youtube.com/watch?v=8JM4oCpWnjU

On my display, I've soldered a short wire instead of the zero-ohm resistors

sdc2.jpg

By R1 I've ripped off one pad and had to connect the sd card socket directly to the other pad on the pcb.

By "configured during startup", do you mean pinMode?
In the spitftbitmap example we start communicating with the tft display before we did set up the sd card properly. The CS (chip select) line of the sd card is floating until this code: if (!SD.begin(SD_CS)). With our breadboard and the long jumper wires which act as little antennas - the odds are good that we catch some interferences, the voltage of the sdcard cs drops (spi devices are active when the cs line is low) and the sd card starts responding to commands from the Teensy - to commands which were meant for the display. To prevent this, we can use the pullup resistors or configure the pin with pinMode/digitalWrite as output/high at the beginning of setup(). To get the spitftbitmap example running without code changes, I've choosed the pullups. But as mentioned in another post, you can try it without the pullup resistors.

btw. the 3 resistors on the display are 0805 package. 0603 size is ok, but smaller and a bit harder to solder.
 
It looks like R2 and R3 have little wires soldered across them. Is this correct or am I misreading things? This does the same thing as the wire connecting the reader and R1, right?
 
It looks like R2 and R3 have little wires soldered across them. Is this correct or am I misreading things? This does the same thing as the wire connecting the reader and R1, right?
yes

on the picture you can see all hardware modifications I did.
1: close the solder jumper J1
2: replace each of the 3 resistors (R1, R2 and R3) with a zero-ohm resistor or a little wire. (the ripped off pad by R1 was an accident and was repaired with the longer wire to the sd card socket)
 
Thank you once again. BTW, I am writing a book (KINDLE) about LCD screens and microcontrollers such as the Teensy. Would you or anyone else on this thread mind my mentioning the material on this post? I'll give you credit using your screen name.
 
Mine are 0603.

btw. the 3 resistors on the display are 0805 package. 0603 size is ok, but smaller and a bit harder to solder.

On my board, the resistors are 0603. I have attached a photo with a 0603 and a 0805 resistor to the right of R3 for size comparison.

-Arlen
 

Attachments

  • Resistors.jpg
    Resistors.jpg
    106 KB · Views: 665
oh ok. on my display they are 0805 :rolleyes:. But I can see that we do not have exactly the same display board. The routing of the traces is a little bit different too.
 
Back
Top