The touch part works fine, so the I2C communications must be alright. The screen is powered (full white screen on turn on) but I cant get the screen to fill with any other colors with the tft.fillScreen function. If I pull "Lite" Low the backlight turns off and the screen is black.
Can anyone give me some clue what is wrong?
Code and hardware follow
Hardware:
The Feather is connected a EYESPI breakout board via breadboard /jumpers. The breakout then goes to the display with the EYESPI cable.
https://www.adafruit.com/product/2090
A photo of the setup is attached
Code:
Code: Select all
#include <Arduino.h>
#include <Streaming.h>
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ILI9341.h> // Hardware-specific library for ILI9341
#include <Adafruit_FT6206.h> // Touch screen support
// #define TFT_DC 33
// #define TFT_CS 15
// think this is for touchscreen on another model
#define STMPE_CS 32
#define TFT_CS 15
#define TFT_DC 33
#define SD_CS 14
Adafruit_FT6206 ts = Adafruit_FT6206();
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
const int colorDelay_ms = 250;
unsigned long testFillScreen();
void setup_tft();
void setup() {
Serial.begin(115200);
ts.begin();
setup_tft();
tft.fillScreen(ILI9341_BLACK);
}
void loop() {
// put your main code here, to run repeatedly:
if (ts.touched())
{
TS_Point p = ts.getPoint();
Serial << p.x << " " << p.y << endl;
}
}
void setup_tft()
{
// ADDED BY AVS: no diff
pinMode(TFT_CS, OUTPUT);
pinMode(TFT_DC, OUTPUT);
// original
tft.begin();
Serial << "---------TFT SELF TEST BEGIN---------" << endl;
// read diagnostics (optional but can help debug problems)
uint8_t x = tft.readcommand8(ILI9341_RDMODE);
Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDMADCTL);
Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDPIXFMT);
Serial.print("Pixel Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDIMGFMT);
Serial.print("Image Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDSELFDIAG);
Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX);
Serial << "---------TFT SELF TEST END---------" << endl;
}
I have good contact between:
Feather IO33 -> Display D/C
Feather IO15 -> display CS
Feather MOSI -> display MOSI
Feather SCK -> Display CLK