Hey Guys
I bought this LCD from eBay and it arrived yesterday: http://www.ebay.com/itm/171032035075?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649. The board that arrived did not say "HY 1.8" as I expected but "KMR 1.8". See photo:
http://i.imgur.com/lcURzp8.jpg
I hooked up the LCD (Sorry, I left the board at home, so I can't give the exact connections between the board and arduino, but I think it must be right, because there are some images and lines being printed. Read further).
I downloaded the latest Adafruit 7735 and GFX library files from Github and tried running the example. I could see faint images being printed but the display was mostly just a bright white. Looking at the LCD from a very low angle (70 degrees or so, I could cleary see the text and lines being shown looked OK, but it was as if the contrast was extremely low. Everything is just bright white.
When I press the Arduino's reset button, the display shows the image with proper black bakground and contrast for a few seconds, but as soon as the Arduino boot and runs the code again, the display again turns the strange low constrast white.
I tried initializing with initR and BLACKTAB, REDTAB, GREENTAB and also initB. initB displayed nothing. initR displayed text and lines, all of them still very faint.
Something obviously happens while the arduino resets that makes the LCD show properly. I narrowed it down to pin13 on the arduino. With the adafruit example running, I uploaded another sketch which simply sets pin13 to an output and digitalWrites it to LOW. Doing this, the LCD obviously freezes with the last image it displayed, but it displays it correctly with black background.
I tried another arduino uno - still same problem. I tried the following sketch found here: SOLVED - unable to make it work 1.8 SPI TFT 128x160 - #28 by system - Displays - Arduino Forum
#define cs_lcd 10
#define cs_sd 7
#define dc 9
#define rst 8
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
Adafruit_ST7735 tft = Adafruit_ST7735(cs_lcd, dc, rst);
void setup()
{
tft.initR(INITR_REDTAB);
tft.fillScreen(ST7735_BLACK);
tft.setTextWrap(false);
}
void loop()
{
tft.setTextSize(5);
tft.setTextColor(ST7735_WHITE, ST7735_BLACK);
for ( int i = 0; i < 100; i++ )
{
tft.setCursor(40, 50);
tft.print( i );
delay( 100 );
}
}
Here is a video of the problem: - YouTube Everytime the screen displays properly is after I press the arduino's reset button.
Can anyone tell me what might be wrong?
I read another forum post today that said that even though the LCD borad can be powered by 5V (JP1 on board left open circuit), the SPI must be at 3.3V logic level? Could this be a problem?