Question
LCD shows wrong colors
Posted on July 20, 2014 at 19:52
I'm using a 7'' 800x480 LCD, + SSD1963 driver.
The combination is connected to an STM32F103ZET6, via FSMC.I have modified a header file to initialize ssd1963, things seem to work as expected, texts and fonts are OK, but there's a problem:Some colors are shown incorrectly, blue is OK, red is OK, green is something else, black is green, yellow is somehow white.The worst thing is white, it causes the LCD to hang and mess things up. also, functions like ''GUI_CURSOR_Show()'' cause a hang in LCD as well.Here's the ssd1963 init routine:static void _InitController(void) { U16 driverCode; LCD_X_Init();// ------------------------------------ wr_reg(0x00E2, 0x0023); wr_dat(0x0002); wr_dat(0x0004); wr_reg(0x00E0, 0x0001); delay(1); wr_reg(0x00E0, 0x0003); delay(5); wr_cmd(0x0001);//wr_reg(0x001, 0x0000); delay(5); wr_reg(0x00E6, 0x0004); wr_dat(0x0093); wr_dat(0x00E0); wr_reg(0x00B0, 0x0020); wr_dat(0x0000); wr_dat((HDP>>8)&0x00FF); wr_dat(HDP&0x00FF); wr_dat((VDP>>8)&0x00FF); wr_dat(VDP&0x00FF); wr_dat(0x0000); wr_reg(0x00B4, (HT>>8)&0X00FF); wr_dat(HT&0X00FF); wr_dat((HPS>>8)&0X00FF); wr_dat(HPS&0X00FF); wr_dat(HPW); wr_dat((LPS>>8)&0X00FF); wr_dat(LPS&0X00FF); wr_dat(0x0000); wr_reg(0x00B6, (VT>>8)&0X00FF); wr_dat(VT&0X00FF); wr_dat((VPS>>8)&0X00FF); wr_dat(VPS&0X00FF); wr_dat(VPW); wr_dat((FPS>>8)&0X00FF); wr_dat(FPS&0X00FF); wr_reg(0x00F0, 0x0003); delay(5); wr_cmd(0x0021);//wr_reg(0x0021, 0x0000); wr_reg(0x00BC, 0x0080); wr_dat(0x0080); wr_dat(0x0080); wr_dat(0x0001); wr_reg(0x00B8, 0x000F); wr_dat(0x0001); wr_reg(0x00BA, 0x000F); delay(5); wr_cmd(0x0029);//wr_reg(0x0029,0x0000);// -------------------------------------}Any ideas? I guess the wiring is correct because texts and some colors like blue are shown correctly.Thanks,AliP.S.: I use emWin.