Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 3 1 2 3 LastLast
Results 1 to 25 of 65

Thread: Display_ili9341

  1. #1
    Junior Member
    Join Date
    Jan 2015
    Location
    Woodbine NJ USA
    Posts
    16

    Display_ili9341

    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?

  2. #2
    Senior Member sumotoy's Avatar
    Join Date
    Nov 2012
    Location
    Venezia, Italia
    Posts
    421
    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.

  3. #3
    Moderator KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,072
    I am pretty sure he is talking about the one PJRC sells: http://www.pjrc.com/store/display_ili9341.html

    From the html above:
    We do not recommend using the SD card socket on this display.

  4. #4
    Junior Member
    Join Date
    Jan 2015
    Location
    Woodbine NJ USA
    Posts
    16
    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.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,711
    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 by PaulStoffregen; 05-13-2015 at 04:15 PM.

  6. #6
    Junior Member
    Join Date
    Jan 2015
    Location
    Woodbine NJ USA
    Posts
    16
    No. The card failed to initialize.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,711
    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....

  8. #8
    Junior Member
    Join Date
    Jan 2015
    Location
    Woodbine NJ USA
    Posts
    16
    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.Click image for larger version. 

Name:	sypniewski051315.jpg 
Views:	285 
Size:	111.1 KB 
ID:	4272

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,711
    Oh, I see you're trying to use the SD card slot actually on the display.

    It doesn't work. I've never really investigated why, but I can confirm it does not work.

    The SD adaptor and SD+Wiz820 apaptor work, but the SD on that display does not.

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,711
    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.

  11. #11
    Senior Member HWGuy's Avatar
    Join Date
    Nov 2012
    Posts
    261
    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.
    Click image for larger version. 

Name:	xxy.jpg 
Views:	733 
Size:	127.0 KB 
ID:	4273

  12. #12
    Junior Member
    Join Date
    Jan 2015
    Location
    Woodbine NJ USA
    Posts
    16
    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.

  13. #13
    Senior Member HWGuy's Avatar
    Join Date
    Nov 2012
    Posts
    261
    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.

    Click image for larger version. 

Name:	9341a.PNG 
Views:	2093 
Size:	299.7 KB 
ID:	4274

  14. #14
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,711
    Thanks for posting such a great writeup and diagram! I've added a link to this thread.

  15. #15
    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.

  16. #16
    Senior Member HWGuy's Avatar
    Join Date
    Nov 2012
    Posts
    261
    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 by HWGuy; 05-15-2015 at 12:22 PM.

  17. #17
    Junior Member
    Join Date
    Jan 2015
    Location
    Woodbine NJ USA
    Posts
    16
    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?

  18. #18
    Junior Member
    Join Date
    May 2015
    Posts
    4
    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-detai...ZCT-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-detai...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 by araasch; 05-14-2015 at 03:36 PM.

  19. #19
    Junior Member
    Join Date
    Jan 2015
    Location
    Woodbine NJ USA
    Posts
    16
    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.

  20. #20
    Senior Member HWGuy's Avatar
    Join Date
    Nov 2012
    Posts
    261
    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

    Click image for larger version. 

Name:	sdc2.jpg 
Views:	775 
Size:	98.8 KB 
ID:	4299

    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.

  21. #21
    Junior Member
    Join Date
    Jan 2015
    Location
    Woodbine NJ USA
    Posts
    16
    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?

  22. #22
    Senior Member HWGuy's Avatar
    Join Date
    Nov 2012
    Posts
    261
    Quote Originally Posted by bps View Post
    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)

  23. #23
    Junior Member
    Join Date
    Jan 2015
    Location
    Woodbine NJ USA
    Posts
    16
    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.

  24. #24
    Junior Member
    Join Date
    May 2015
    Posts
    4

    Mine are 0603.

    Quote Originally Posted by HWGuy View Post
    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
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Resistors.jpg 
Views:	233 
Size:	106.0 KB 
ID:	4300  

  25. #25
    Senior Member HWGuy's Avatar
    Join Date
    Nov 2012
    Posts
    261
    oh ok. on my display they are 0805 . 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •