Go Down

Topic: SPI wiring and programming for MCUFRIEND ILI9341 (Read 240 times) previous topic - next topic

kochevnik

Nov 07, 2015, 03:35 am Last Edit: Nov 07, 2015, 03:41 am by kochevnik
Yes our old friend MCU lol

I've got a bunch of these shields for the UNO - looks mostly like the one below
and I got them all to work in 8 bit mode just fine.

Since that mode uses almost all of the pins on the UNO I would really like to use SPI - just spent a few hours tracking down every post on the subject and no joy.

Has anyone successfully wired this version up as SPI and got it to run an example ?

I've tried a dozen different wiring versions and libraries and can't seem to get it to go.

I used the SPI libraries from this youtube and this link - but the shield that guy is using is different than the generic one and I cant figure the wiring out. The code compiles just fine and the serial debug is showing the code is running on the UNO, just get a white screen on the TFT.  And there is NOTHING wrong hardware wise on these, I have three of them UNOs and TFTs and when wired up in 8bit they all work just fine.

I even  tried just breaking out EVERY pin from the shield and using that same wiring for the SPI code but still just a white screen.

Be very nice if we can figure out how to do this as the UNO is mostly useless as anything other than a display in 8bit mode - SPI only uses 5 pins supposedly, so that would make the UNO a lot more useful and still be able to use the display.

Any help appreciated.


Here is the youtube and the code link :

https://www.youtube.com/watch?v=9RIKzXANbOY

post 191 on this thread has the software

http://forum.arduino.cc/index.php?topic=181679.180





david_prentice

You have taken a shield apart.    You have seen how it is a bare 3.3V display module that is soldered to the red mcufriend pcb.   The red pcb contains the level shifter chips and the shield pins.

Most controller chips are capable of different interface modes:   16 / 8 bit parallel,   3-wire SPI,  4-wire SPI, ... that are selected by the IMn pins.

Very few of the bare modules make all the IMn pins available.    Often they just let you swap between 8 and 16 bit parallel.   If your module contains all the IM signals,   you could rewire the shield with a lot of effort.

Otherwise,   just accept that the UNO shields are very cheap and convenient to use with a Uno.    You only have A5 as a spare pin if you are using the microSD.     The SMD clones have A6, A7 available.

Any rewiring of a SMD shield is very difficult and fiddly.   If you want to use SPI for the TFT,  buy an SPI bare module.    Then make your own shield with 3.3V level shifters.

David.

bahman89

You have taken a shield apart.    You have seen how it is a bare 3.3V display module that is soldered to the red mcufriend pcb.   The red pcb contains the level shifter chips and the shield pins.

Most controller chips are capable of different interface modes:   16 / 8 bit parallel,   3-wire SPI,  4-wire SPI, ... that are selected by the IMn pins.

Very few of the bare modules make all the IMn pins available.    Often they just let you swap between 8 and 16 bit parallel.   If your module contains all the IM signals,   you could rewire the shield with a lot of effort.

Otherwise,   just accept that the UNO shields are very cheap and convenient to use with a Uno.    You only have A5 as a spare pin if you are using the microSD.     The SMD clones have A6, A7 available.

Any rewiring of a SMD shield is very difficult and fiddly.   If you want to use SPI for the TFT,  buy an SPI bare module.    Then make your own shield with 3.3V level shifters.

David.
very nice and simple answer.
 
Thanks David

borland

Or use a 3.3V processor such as Arduino Pro Mini 3.3V/8Mhz, or buy a 3.3/5V selectable BUONO UNO R3.  This will allow eliminating the TTL level converter.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy