Wandering about this colour problem I wrote a sketch to test every single bit of colour, using all power of 2.
But the results was not as espected.
For every colour I see only one bar instead of many. Maybe there are errors?
/*
* A sketch to test all bits in register colour
* 320*240
*
* 2015 09 16
*/
#include <Adafruit_TFTLCD_mcu.h> //Change this with your library
#include <Adafruit_GFX.h>
#define LCD_CS A3 // Chip Select goes to Analog 3
#define LCD_CD A2 // Command/Data goes to Analog 2
#define LCD_WR A1 // LCD Write goes to Analog 1
#define LCD_RD A0 // LCD Read goes to Analog 0
#define LCD_RESET A4 // Can alternately just connect to Arduino's reset pin
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
void setup() {
Serial.begin(9600);
Serial.println(F("TFT Green Test"));
uint16_t identifier = tft.readID();
tft.begin(identifier);
tft.fillScreen(0);
tft.fillRect(0, 0, 219, 53, 32);
tft.fillRect(0, 54, 219, 53, 64);
tft.fillRect(0, 107, 219, 53, 128);
tft.fillRect(0, 160, 219, 53, 512);
tft.fillRect(0, 213, 219, 53, 1024);
tft.fillRect(0, 266, 219, 53, 2048);
delay(2000);
tft.fillRect(0, 0, 219, 53, 1);
tft.fillRect(0, 54, 219, 53, 2);
tft.fillRect(0, 107, 219, 53, 4);
tft.fillRect(0, 160, 219, 53, 8);
tft.fillRect(0, 213, 219, 53, 16);
tft.fillRect(0, 266, 219, 53, 32);
delay(2000);
tft.fillRect(0, 0, 219, 53, 4096);
tft.fillRect(0, 54, 219, 53, 8192);
tft.fillRect(0, 107, 219, 53, 16384);
tft.fillRect(0, 160, 219, 53, 32768);
tft.fillRect(0, 213, 219, 53, 0xF800);
tft.fillRect(0, 266, 219, 53, 0x07E0);
}
void loop() {
}