资源预览内容
第1页 / 共3页
第2页 / 共3页
第3页 / 共3页
亲,该文档总共3页全部预览完了,如果喜欢就下载吧!
资源描述
#includechar code tab10=0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f;sbit a1=P20;sbit a2=P21;sbit b1=P17;sbit b2=P16;sbit ar=P22;sbit ag=P23; sbit ay=P24;sbit br=P25;sbit bg=P26; sbit by=P27;bit mark=1;int aa;void delay(char i)char j;for(;i0;i-)for(j=120;j0;j-);void init() TMOD=0x00;TH0=(8192-5000)/32; TL0=(8192-5000)%32;EA=1;ET0=1;TR0=1;void main()char i=0;init(); while(1)P2=0xff;if(aa=200)i+;aa=0;if(i30) i=0;mark=mark;if(mark)if(i5)br=0;ay=0;elseag=0;br=0;a1=a2=1;P0=tabi/10; a1=0;delay(120);a1=a2=1; P0=tabi%10;a2=0;delay(120);a1=a2=1;elseif(i5)ar=0;by=0;elsear=0;bg=0;b1=b2=1;P3=tabi/10; b1=0;delay(120);b1=b2=1; P3=tabi%10;b2=0;delay(120);b1=b2=1;void timer0() interrupt 1 TH0=(8192-5000)/32; TL0=(8192-5000)%32;aa+;
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号