Hi everyone,
I am trying to use UTFT library to light up a 3.5" LCD with ST7796 driver.
But the image showed up gradually from screen mess after couple loops.(in attachment)
The sketch I use to test is modified from example (UTFT_Bitmap_128x128)
I just wonder if the initial code (in attachment) should be modified for use? such as clk...?
Besides, the original initial code is listed below, it seems to be used for SPI ?
LCD_SPI_REG(0xf0); //Enable command 2
LCD_SPI_DATA(0xc3);
But what I use now is 8080-8-bit interface, is it still work on?
Any suggestion is highly appreciated.
Gary
#include <UTFT.h>
UTFT myGLCD(ST7796, 38, 39, 40, 41); // Remember to change the model parameter to suit your display module!
extern unsigned short tux[0x1000];
int ledPin = 9;
void setup()
{
pinMode(13, OUTPUT);//For RD
digitalWrite(13, HIGH);
analogWrite(ledPin, 200);//For LED
myGLCD.InitLCD();
}
void loop()
{
// Draw a 64x64 icon in double size.
myGLCD.drawBitmap (0, 0, 64, 64, tux, 2);
delay(200);
}
initlcd.h (3.64 KB)