Mon Jan 14, 2013 6:01 pm
so... right off the bat, I noticed that this screen in the video is not a sainsmart device. That will change things a bit from the vid. Also, in looking at the Pi pins in use in the video, you will notice that he is using I2C, not SPI, so your hookup and code will be completely different. (if you based your hookups on the video, that's your main problem)
I looked up the sainsmart for its pinouts, and here is what I found:
1. GND : Power Ground
2. VCC : 5V power input
3. CS : Chipselect for LCD,
4. SDA : LCD Data for SPI
5. SCL : SCLK for TFT Clock
6. RS/DC : Command/Data Selection
7. RESET : LCD controller reset, active low
8. CS (SD-CS) : Chipselect for TF Card,
9. CLK (SD-Clock): SPI Clock
10. MOSI (SD-DI) : SPI Master out Slave in
11. MISO (SD-DO) : SPI Master in Slave out
Note that pins 8 - 11 are for the SD card slot on the back of screen module and aren't discussed here.
To get SPI video, I think your GPIO hookups will work as follows: (if someone has more experience, please feel free to correct me)
Sainsmart........................RPi GPIO
1. GND..............................6. GND
2. VCC..............................2. +5 VDC
3. CS................................24. SPI CS 0
4. SDA.............................19. SPI MISO
5. SCL..............................23. SPI SCLK
6. RS/DC..........................22. GPIO 25
7. RESET.........................18. GPIO 24
As far as programming goes, I'll be honest, I'm clueless. No experience in that arena yet.
I'm only wearing black until they find something darker.