就是用按键控制写入数据,如果按s1键则向地址0x01写入数据,按s2键则向地址0x02写入数据。
if(s1==0){
delay10();
if(s1==0){
tem_top++;
write_eeprom(0x00,tem_top);
while(s1==0);
}
}
if(s2==0){
delay10();
if(s2==0){
tem_top--;
write_eeprom(0x00,tem_top);
while(s2==0);
}
}
if(s3==0){
delay10();
if(s3==0){
tem_low++;
write_eeprom(0x08,tem_low);
while(s3==0);
}
}
if(s4==0){
delay10();
if(s4==0){
tem_low--;
write_eeprom(0x08,tem_low);
while(s4==0);
}
}
这样写还要再加应答吗?
就是用按键控制写入数据,如果按s1键则向地址0x01写入数据,按s2键则向地址0x02写入数据。
if(s1==0){
delay10();
if(s1==0){
tem_top++;
write_eeprom(0x00,tem_top);
while(s1==0);
}
}
if(s2==0){
delay10();
if(s2==0){
tem_top--;
write_eeprom(0x00,tem_top);
while(s2==0);
}
}
if(s3==0){
delay10();
if(s3==0){
tem_low++;
write_eeprom(0x08,tem_low);
while(s3==0);
}
}
if(s4==0){
delay10();
if(s4==0){
tem_low--;
write_eeprom(0x08,tem_low);
while(s4==0);
}
}
这样写还要再加应答吗?
举报