I'm working with the 1.8" TFT Display Breakout w/microSD and I'm having trouble getting it to display anything. I have it running in it's software SPI mode as I'm working with the Mega and it seemed easier to just be able to plug it directly into the Mega itself (as show below). However even after it is set up it still will only display a blank white screen. I'm trying to run the graphicstest example that comes with the library. I've modified it slightly to match the way I've wired it and the set up is listed below.
Image of Set up:
Fritzing diagram:
Code:
Code: Select all
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
// TFT pins
#define TFT_GND 22
#define TFT_POWER 24
#define TFT_RST 0
#define TFT_DC 28
#define TFT_CS 32
#define TFT_MOSI 34
#define TFT_SCLK 36
#define TFT_MISO 38
#define TFT_LITE 40
// Option 2: use any pins but a little slower!
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
float p = 3.1415926;
void setup(void) {
Serial.begin(9600);
Serial.print("Hello! ST7735 TFT Test");
pinMode(TFT_GND,OUTPUT);
pinMode(TFT_POWER,OUTPUT);
pinMode(TFT_LITE,OUTPUT);
digitalWrite(TFT_GND,LOW);
digitalWrite(TFT_POWER,HIGH);
digitalWrite(TFT_LITE,HIGH);
// Use this initializer if you're using a 1.8" TFT
tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab
...
Any help would be greatly appreciated! Thanks