stop();
}
uchar read_add(uchar address) { uchar date;
start();
write_byte(0xa0); respons();
write_byte(address); respons(); start();
write_byte(0xa1); respons();
date=read_byte(); stop();
return date;
}
/**************************************************************************/ /* 液晶 */ /***********************************************************************/
void WriteCommand(unsigned char c) //写命令函数 { DelayMs(5);//操作前短暂延时,保证信号稳定 E=0;
RS=0; _nop_(); E=1; Data=c; E=0;
//写数据函数
}
void WriteData(unsigned char c) {
DelayMs(5); //操作前短暂延时,保证信号稳定 E=0; RS=1; _nop_(); E=1; Data=c; E=0; RS=0;
//写入字节函数
}
void ShowChar(unsigned char pos,unsigned char c) {