unsigned char LCD_DATA[16]; void CLR_LCD(unsigned char DAT); void INIT_LCD(void) { _segcr0=0x00; // _segcr1=0x00; // _segcr2=0x0C; // _lcdc0=0b11100011; // _lcdc1=0b10101000; // _fsubc= 0x55;// 快速启动模式,LXT CLR_LCD(0x00); } void FILL_All_LCD() { unsigned char i; _mp1h = 1;//Sector 1 区域指针开关 for (i=0x80; i<=0x93; i++) //LCD RAM地址 { _mp1l = i; switch (i) { case 0x80: _iar1 = LCD_DATA[0]; break; case 0x81: _iar1 = LCD_DATA[1]; break; case 0x82: _iar1 =LCD_DATA[2]; break; case 0x83: _iar1 = LCD_DATA[3]; break; case 0x84: _iar1 =LCD_DATA[4]; break; case 0x85: _iar1 = LCD_DATA[5]; break; case 0x86: _iar1 = LCD_DATA[6]; break; case 0x87: _iar1 =LCD_DATA[7]; break; case 0x88: _iar1 =LCD_DATA[8]; break; case 0x89: _iar1 = LCD_DATA[9]; break; case 0x8A: _iar1 =LCD_DATA[10]; break; case 0x8B: _iar1 =LCD_DATA[11]; break; case 0x8C: _iar1 = LCD_DATA[12]; break; case 0x8D: _iar1 = LCD_DATA[13]; break; case 0x8E: _iar1 = LCD_DATA[14]; break; case 0x8F: _iar1 = LCD_DATA[15]; break; default:break; } } _mp1h = 0; } void CLR_LCD(unsigned char DAT) { unsigned char i; for(i=0;i<16;i++) //LCD RAM地址 { LCD_DATA[i] = DAT; } }