题目内容
要求用计数器1,实现显示按键次数的功能#includechar tab[]={0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};char wei[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};int temp=0;void Delay(unsigned int i){ ...}void display(int a,b){...}void main(){_______=0x____;//设置定时器/计数器1工作方式TH1=0x_____;//设定计数器1的高位初始值TL1=_______;//设定计数器1的低位初始值______=1;//打开中断总开关_____=____;//打开计数器1中断允许开关_____=____;//启动计数器1while(1);{}}void T1_int(void) interrupt 3{_____=0;//关闭中断总开关TH1=0x_____;//再次设定计数器1的高位初始值TL1=_______;//再次设定计数器1的低位初始值if(TF1==1) //如果计数器1溢出,则显示当前次数{display (______,0);}______++;//显示的次数自加1_____=1;//再次打开中断总开关}
查看答案
搜索结果不匹配?点我反馈