void ResetIC(void) { RES=1; delayms(100); RES=0; delayms(100); RES=1; delayms(100); } void initLCDM(void) { SdCmd(0x3c); //display off SdCmd(0xb1); //ct 对比度 SdCmd(0x6F); //0x50 1/8B ,6D 1/10B SdCmd(0x30); //Bias SdCmd(0x14); // 00 1/8B,0A 1/9B,14 1/10B SdCmd(0x31); //vck select SdCmd(0x11); // 11 SdCmd(0xfd); //0xfd *3 SdCmd(0x33); //Power control SdCmd(0x2f); //0 0 VDON1-0 VSON VCON VFON1 VFON0 delayms(20); SdCmd(0x90); //duty SdCmd(0x80); // SdCmd(0x64); //display control 0 1 1 0 SHL ADC EON REV SdCmd(0xb2); //FR SdCmd(0x10); //OSC=128kHz 0x19=40Hz(FR) SdCmd(0x00); //0x14 SdCmd(0x3d); //display on } void MainADD(void) { SdCmd(0x74); // SET windowns AY Com=128 SdCmd(0x00); SdCmd(0x0f); // SdCmd(0x75); // SET windowns AX Seg = 128 SdCmd(0x00); //Start SdCmd(0x7f); //End */ SdCmd(0xc0); // SET AX Add SdCmd(0x00); //0x10 SdCmd(0x01); // SET AY Add SdCmd(0x00); // Start 0000H }