文件名称:61505w 资料61505w61505w
文件大小:2.53MB
文件格式:PDF
更新时间:2013-12-09 03:56:47
61505w
61505w #include "Delay.c" #include "Trans_Com_16.c" #include "Trans_Dat_16.c" void init_LCD(void) { Reset=1; Delay(10); Reset=0; Delay(20); Reset=1; Delay(40);//40ms Trans_Com_16(0x0000); // osc start Trans_Dat_16(0x0001); // osc start Trans_Com_16(0x00A4); // osc start Trans_Dat_16(0x0001); // osc start Delay(20);//20ms Trans_Com_16(0x0008); //0001 Trans_Dat_16(0x1A1A); //0001 Trans_Com_16(0x0030); // 4140; osc start Trans_Dat_16(0x0150); // 4140; osc start //Delay(1); Trans_Com_16(0x0031); //0001 Trans_Dat_16(0x6C13); //0001 //Delay(1); Trans_Com_16(0x0032); //0015 Trans_Dat_16(0x0C04); //0015 //Delay(1); Trans_Com_16(0x0033); //341e ;2e1b for other cf Trans_Dat_16(0x0817); //341e ;2e1b for other cf //Delay(1); Trans_Com_16(0x0034); //osc start Trans_Dat_16(0x2222); Trans_Com_16(0x0035); //Driver output control Trans_Dat_16(0x1708); //SM=SG=0 SS=1 dots:528*220 Trans_Com_16(0x0036); //lcd drive AC control Trans_Dat_16(0x640C); //1 field Trans_Com_16(0x0037); //entry mode Trans_Dat_16(0x130c); //#7030H ;BGR=1 Trans_Com_16(0x0038); //compare register Trans_Dat_16(0x0C15); //compare register Trans_Com_16(0x0039); //compare register Trans_Dat_16(0x2222); //compare register Trans_Com_16(0x0060); //RAM address set Trans_Dat_16(0x2700); Trans_Com_16(0x0061); Trans_Dat_16(0x0001); //0100H ;r control(1) display off Trans_Com_16(0x006A); //r control(3) Trans_Dat_16(0x0000); //r control(3) Trans_Com_16(0x0090); //0300H ;r control(4) Trans_Dat_16(0x0011); //0300H ;r control(4) Trans_Com_16(0x0093); //0300H ;r control(4) Trans_Dat_16(0x0701); //0300H ;r control(4) Trans_Com_16(0x0007); //TCL Trans_Dat_16(0x0000); //TCL Trans_Com_16(0x0010); Trans_Dat_16(0x0710); //0300H ;r control(4) Trans_Com_16(0x0011); Trans_Dat_16(0x0237); Trans_Com_16(0x0012); Trans_Dat_16(0x018A); Trans_Com_16(0x0013); Trans_Dat_16(0x0F00); Trans_Com_16(0x0029); Trans_Dat_16(0x002C); Delay(120); Trans_Com_16(0x0001); Trans_Dat_16(0x0100); Trans_Com_16(0x0002); Trans_Dat_16(0x0200); Trans_Com_16(0x0003); Trans_Dat_16(0x1030); Delay(1); Trans_Com_16(0x000E); Trans_Dat_16(0x0030); Delay(1); Trans_Com_16(0x0012); Trans_Dat_16(0x11BA); Delay(1); Trans_Com_16(0x0020); Trans_Dat_16(0x0000); Trans_Com_16(0x0021); Trans_Dat_16(0x0000); Delay(1); Trans_Com_16(0x0007); Trans_Dat_16(0x0100); Delay(50); } void into standby mode(void) { Trans_Com_16(0x0007); Trans_Dat_16(0x0100); Delay(10); Trans_Com_16(0x0012); Trans_Dat_16(0x0180); Delay(80);//80ms } void exit standby mode(void) { Trans_Com_16(0x0012); Trans_Dat_16(0x11ba); Delay(120);//120ms Trans_Com_16(0x0007); Trans_Dat_16(0x0100); Delay(40);//40ms }