I have Ssd1963 7 inch lcd and I am using it with tft shield on Arduino mega and using utft library from rinkydinkelectronics for coding. Static screen is working fine but as soon as I am printing any value and updating it in void loop ..the lcd display is turned off (but code is still running) ... back light of lcd is on but nothing is displayed. HELP PLEASE. Also with each frame and updation the pixels are getting distorted. Also one more thing My lcd is asking for 3 power supplies. One 3.3V and two 5v. 3.3 v and one 5 v is already provided through board but one extra 5v is not being provided so I have to attach that pin with other 5v pin for back light to work.
Here is My code:
#include <UTFT.h>
#define SD_CHIP_SELECT 53
extern uint8_t SevenSegNumFontPlus[];
extern uint8_t BigFont[];
extern uint8_t GroteskBold32x64[];
extern uint8_t SixteenSegment16x24[];
extern uint8_t OtherFont[];
extern uint8_t bt_ct[];
int i=0;
UTFT myGLCD(ITDB50,38,39,40,41); //souf_nucl
void setup()
{
randomSeed(analogRead(0));
// Setup the LCD
Serial.begin(115200);
myGLCD.InitLCD();
cbi(myGLCD.P_CS, myGLCD.B_CS); // CS Active++
myGLCD.LCD_Write_COM(0x36);
myGLCD.LCD_Write_DATA(0x48 ^ 0xC0);
sbi(myGLCD.P_CS, myGLCD.B_CS); // CS Idle
myGLCD.clrScr();
myGLCD.fillScr(0,0,0);
myGLCD.setColor(0,0,255);
myGLCD.setBackColor(0,0,0);
splashScreen();
myGLCD.setColor(255,255,255);
myGLCD.drawLine(0, 60, 650, 60);
myGLCD.drawLine(0, 270, 650, 270);
myGLCD.drawLine(200, 60, 200, 480);
myGLCD.drawLine(400, 480, 400, 60);
myGLCD.drawLine(0, 479, 800, 479);
myGLCD.drawLine(1, 0, 1, 479);
myGLCD.drawLine(0, 1, 800, 1);
myGLCD.drawLine(799, 1, 799, 480);
myGLCD.drawLine(7s00, 0, 700, 480);
myGLCD.drawLine(650, 0, 650, 480);
myGLCD.setFont(BigFont);
myGLCD.print("Battery Lvl",10,70);
myGLCD.print("Battery Tmp",10,280);
myGLCD.print("Car Temp",230,70);
myGLCD.print("Parking",240,280);
myFiles.load(0, 0, 800, 480, "creen.RAW", 1, 0);
}
void splashScreen() {
myGLCD.setFont(GroteskBold32x64);
myGLCD.print("H", 100, 240);
delay(100);
myGLCD.print("E", 150, 240);
delay(100);
myGLCD.print("L", 200, 240);
delay(100);
myGLCD.print("L", 250, 240);
delay(100);
myGLCD.print("O", 300, 240);
delay(100);
myGLCD.print(" ", 350, 240);
delay(100);
myGLCD.print("D", 400, 240);
delay(100);
myGLCD.print("R", 450, 240);
delay(100);
myGLCD.print("I", 500, 240);
delay(100);
myGLCD.print("V", 550, 240);
delay(100);
myGLCD.print("E", 600, 240);
delay(100);
myGLCD.print("R", 650, 240);
delay(1000);
myGLCD.clrScr();
}
void loop(){
Serial.println(i);
myGLCD.setColor(255,0,0);
myGLCD.setFont(bt_ct);
myGLCD.printNumI(0,60,100);
myGLCD.printNumI(7,260,100);
myGLCD.setFont(OtherFont);
myGLCD.printNumI(2,60,310);
myGLCD.printNumI(4,220,335);
myGLCD.setColor(255,255,255);
myGLCD.setFont(SevenSegNumFontPlus);
myGLCD.printNumI(i,50,190);
myGLCD.printNumI(i,50,417);
myGLCD.printNumI(i,255,190);
myGLCD.setFont(SixteenSegment16x24);
myGLCD.printNumI(i,320,347);
myGLCD.printNumI(i,320,417);
int x=random(5,475);
myGLCD.setColor(0,0,255);
myGLCD.fillRect(705,x,795,475);
myGLCD.setColor(0,0,0);
myGLCD.fillRect(705,5,795,x);
i++;
}
TFT Shield Link: 3.3V TFT LCD Adjustable Shield Expansion Board Mega 2560 R3 3.2 Sale - Banggood Mobile-arrival notice