-
为什么按下S5后定时器没有打开去掉nowshidu=dat_rd1*20就可以了
#include#include"ds1302.h"#include"iic.h"sbitS7=P3^0;sbitS6=P3^1;sbitS5=P3^2;sbitS4=P3^3;unsignedchardat_rd2;unsignedcharkaiguan=0;unsignedcharshidu=50;//初始湿度unsignedcharnowshidu;//当前湿度unsignedcharcodetable[]={0xc0,0xf9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0x88,0x83,0xA7,0xA1,0x86,0x8E,0xbf,0x7f};unsignedcharwrite[]={0x80,0x82,0x84,0x86,0x88,0x8a,0x8c};unsignedcharread[]={0x81,0x83,0x85,0x87,0x89,0x8b,0x8d};unsignedcharTime[]={0x16,0x30,0x08,0x02,0x16,0x02,0x21};voiddelayms(unsignedcharx){unsignedchari;while(x--){for(i=0;i
2021-02-16 1