567
社区成员




/*------standby_off -------------- */
WriteData(WRCOMM,0x2C);
Delay(20);
/*------set OTP mode off---------*/
WriteData(WRCOMM,0xEA);
Delay(10);
/*------set internal osc on---------*/
WriteData(WRCOMM,0x02);
WriteData(WRCOMM,0x01);
Delay(10);
/*------booster1 on---------------*/
WriteData(WRCOMM,0x20);
WriteData(WRCOMM,0x0A);
Delay(10);
/*------booster1 on---------------*/
WriteData(WRCOMM,0x26);
WriteData(WRCOMM,0x01);
Delay(10);
/*------booster1 on and amp on---------*/
WriteData(WRCOMM,0x26);
WriteData(WRCOMM,0x09);
Delay(10);
/*------booster2 on-------------*/
WriteData(WRCOMM,0x26);
WriteData(WRCOMM,0x0b);
Delay(10);
/*------booster3 on-------------*/
WriteData(WRCOMM,0x26);
WriteData(WRCOMM,0x0f);
Delay(10);
/*------temp compsation ratio -0.05%------*/
WriteData(WRCOMM,0x28);
WriteData(WRCOMM,0x01);
/*------ram skip area set no skip------*/
WriteData(WRCOMM,0x45);
WriteData(WRCOMM,0x00);
/*------normal display---------*/
WriteData(WRCOMM,0x53);
WriteData(WRCOMM,0x00);
/*------set sdir=0,duty=1/162 swap=0-----*/
WriteData(WRCOMM,0x10);
WriteData(WRCOMM,0x21); //RGB//0x23
/*------set clock fpck=fose/32(Normal)/fpck=fose/16(partial1)-------*/
WriteData(WRCOMM,0x24);
WriteData(WRCOMM,0x11);
/*------GSM=00:65K color,DSG=0,SGF=0,SGP=01,SGM=0-----*/
WriteData(WRCOMM,0x30);
WriteData(WRCOMM,0x02);//09
/*------row vector type=Diagonal ,INC=111-----*/
WriteData(WRCOMM,0x32);
WriteData(WRCOMM,0x0E);//0e
/*------entry mode set : x addr increce, read modify write off--*/
WriteData(WRCOMM,0x40);
WriteData(WRCOMM,0x00);
/*------y address set from 00 to 127--------*/
WriteData(WRCOMM,0x43);
WriteData(WRCOMM,0x00);
WriteData(WRCOMM,0x7F);
/*------x address set from 00 to 159--------*/
WriteData(WRCOMM,0x42);
WriteData(WRCOMM,0x00);
WriteData(WRCOMM,0x9F);
/*------frame set FIM=ON,FIP=1FRAME,N-BLOCK=9-----*/
WriteData(WRCOMM,0x34);
WriteData(WRCOMM,0x89);//cd
/*------contrast1 set v1 to 3.757v max=4v----0x2A,CTRL1*/
WriteData(WRCOMM,0x2a);
WriteData(WRCOMM,0xBB); /*partial display mode 0*/
/*------contrast2 set v1 to 3.757v max=4v--------*/
WriteData(WRCOMM,0x2b);
WriteData(WRCOMM,0x20); /*partial display mode 1*/
Delay(10);
/*------bias set to 1/5 --------*/
WriteData(WRCOMM,0x22);
WriteData(WRCOMM,0x11);
/*------partial display mode off-------*/
WriteData(WRCOMM,0x55);
WriteData(WRCOMM,0x00);
/*------Low frequency set off-------*/
WriteData(WRCOMM,0x36);
WriteData(WRCOMM,0x00);
/*-------Scrol lstart line Set-------*/
WriteData(WRCOMM,0x5A);
WriteData(WRCOMM,0x00);
/*------display on set--------*/
Delay(20);
WriteData(WRCOMM,0x51);