#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit P20=P2^0;
sbit P21=P2^1;
unsigned char code dis[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x40};
uint disnum;
uchar count;
void delay();
void display(uchar ,uchar );
void main()
{
TMOD=0x01;
TR0=1;
ET0=1;
EA=1;
TH0=0X10;
TL0=0X00;
P2=0xff;
while(1)
{
if(count==15)
{
count=0;
disnum++;
if(disnum==100)
{disnum=0;
}
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载