Connecting the Breakout

Author Gravatar Image LADY ADA
There are two ways to wire up these displays - one is a more flexible method (you can use any pins on the Arduino) and the other is much faster (4-8x faster, but you are required to use the hardware SPI pins) We will begin by showing how to use the more flexible method.
You can use any 4 or 5 pins for this method. We'll show using pins 4, 5, 6, 7, and 8 and once you have it working, you can change those pins around in the wiring and in the sketch.

Start by wiring the power pins.
Connect the leftmost pin to Ground and the next pin to +5V. Connect the rightmost pin (backlight) to 5V as well. If you plug in the Arduino you should see the backlight turn on.
Next connect the RESET TFT reset pin) and D/C (TFT data/command selection pin).
The RESET pin (3rd from the left) connects to Arduino pin 8. The D/C pin (4th from the left) connectso to pin 7

Finally we'll connect the remaining digital pins, TFT_CS (TFT chip select), MOSI (data sent to TFT) and SCK (clock sent to TFT)
Note that you need to skip a pin on the TFT after D/C - the next wire is from TFT_CS which is 6th from the left. This goes to digital pin 6. MOSI (7th from the left) connects to digital pin 5 and finally SCK (8th from the left) connects to digital pin 4.

That's it! If you want to change the wiring, you can use any pins but don't forget to change the top of the sketch to match!
Copy Code
//You can use any (4 or) 5 pins  
#define sclk 4 
#define mosi 5 
#define cs 6 
#define dc 7 
#define rst 8  // you can also connect this to the Arduino reset
Later on, if you want to not have a dedicated rst pin, just #define rst -1 and then connect the reset wire to the arduino's reset wire
Last updated on 2014-04-18 at 09.50.40 PM Published on 2012-08-29 at 03.34.09 PM