基于X5045的看門狗電路及51讀寫x5045存儲器的程序
void send_char_com(unsigned char ch)
{ //向串口發(fā)送一個(gè)字符
SBUF=ch;
while(!TI);
TI=0;
}本文引用地址:http://m.butianyuan.cn/article/171073.htm
void main(void)
{
unsigned char Temp,tdat;
init_serialcomm();
while(1)
{
//這里演示讀出和寫入 EEPROM
for (Temp=0; Temp250; Temp++) byte_write(Temp,Temp);
delay(200);
for (Temp=0; Temp250; Temp++)
{ tdat= byte_read(Temp); send_char_com(tdat);}
}
DIY機(jī)械鍵盤相關(guān)社區(qū):機(jī)械鍵盤DIY
評論