最近学习lcd显示实验 手头有一块ili9486板子 发现颜色显示相反 黑白色也颠倒了。ox36 RGB位也设置为1了。为什么 ,有没有人做过。初始化程序如下:
LCD_WR_REG(0XF9);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x08);
LCD_WR_REG(0xC0);
LCD_WR_DATA(0x19);//VREG1OUT POSITIVE
LCD_WR_DATA(0x1a);//VREG2OUT NEGATIVE
LCD_WR_REG(0xC1);
LCD_WR_DATA(0x45);//VGH,VGL VGH>=14V.
LCD_WR_DATA(0x00);
LCD_WR_REG(0xC2);
LCD_WR_DATA(0x33);
LCD_WR_REG(0XC5);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x28);//VCM_REG[7:0]. <=0X80.
LCD_WR_REG(0xB1);//OSC Freq set.
LCD_WR_DATA(0xA0);//0xA0=62HZ,0XB0 =70HZ, <=0XB0.
LCD_WR_DATA(0x11);
LCD_WR_REG(0xB4);
LCD_WR_DATA(0x02); //2 DOT FRAME MODE,F<=70HZ.
LCD_WR_REG(0xB6);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x42);
LCD_WR_DATA(0x3B);
LCD_WR_REG(0xB7);
LCD_WR_DATA(0x07);
LCD_WR_REG(0xE0);
LCD_WR_DATA(0x1F);
LCD_WR_DATA(0x25);
LCD_WR_DATA(0x22);
LCD_WR_DATA(0x0B);
LCD_WR_DATA(0x06);
LCD_WR_DATA(0x0A);
LCD_WR_DATA(0x4E);
LCD_WR_DATA(0xC6);
LCD_WR_DATA(0x39);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x00);
LCD_WR_REG(0XE1);
LCD_WR_DATA(0x1F);
LCD_WR_DATA(0x3F);
LCD_WR_DATA(0x3F);
LCD_WR_DATA(0x0F);
LCD_WR_DATA(0x1F);
LCD_WR_DATA(0x0F);
LCD_WR_DATA(0x46);
LCD_WR_DATA(0x49);
LCD_WR_DATA(0x31);
LCD_WR_DATA(0x05);
LCD_WR_DATA(0x09);
LCD_WR_DATA(0x03);
LCD_WR_DATA(0x1C);
LCD_WR_DATA(0x1A);
LCD_WR_DATA(0x00);
LCD_WR_REG(0XF1);
LCD_WR_DATA(0x36);
LCD_WR_DATA(0x04);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x3C);
LCD_WR_DATA(0x0F);
LCD_WR_DATA(0x0F);
LCD_WR_DATA(0xA4);
LCD_WR_DATA(0x02);
LCD_WR_REG(0XF2);
LCD_WR_DATA(0x18);
LCD_WR_DATA(0xA3);
LCD_WR_DATA(0x12);
LCD_WR_DATA(0x02);
LCD_WR_DATA(0x32);
LCD_WR_DATA(0x12);
LCD_WR_DATA(0xFF);
LCD_WR_DATA(0x32);
LCD_WR_DATA(0x00);
LCD_WR_REG(0XF4);
LCD_WR_DATA(0x40);
LCD_WR_DATA(0x00);
LCD_WR_DATA(0x08);
LCD_WR_DATA(0x91);
LCD_WR_DATA(0x04);
LCD_WR_REG(0XF8);
LCD_WR_DATA(0x21);
LCD_WR_DATA(0x04);
LCD_WR_REG(0x36);
LCD_WR_DATA(0x48);
LCD_WR_REG(0x3A);
LCD_WR_DATA(0x55);
LCD_WR_REG(0x11);
delay_ms(120);
LCD_WR_REG(0x29);
LCD_Display_Dir(1); //默认为横屏
LCD_LED=1; //点亮背光
// LCD_SSD_BackLightSet(50);
LCD_Clear(WHITE); |