#include<reg51.h>
#define uchar unsigned char
#define uint unsigned int
uchar code tab[]={0xf6,0xf9,0xb8,0xb8,0xbf};
uchar T_count=0;
uchar i=1;
void t0Proc() interrupt 1
{
TH0=0x3c;
TL0=0xb0;
if(++T_count==10)
{
P0=tab[i];
i=(i+1)%5;
T_count=0;
}
}
void main()
评论0
最新资源