#include <reg52.h>
char num [8] = {0x66,0x0fe,0x0fe,0x0da,0X0b6,0x0be,0x0fe,0x0fe};
int ii=0;
int count=0;
void int0() interrupt 0{
}
void main()
{
TMOD = 0x01;
TH0 = 0x3C;
TL0 = 0x0B0;
EA = 1;
ET0 = 1;
TR0 = 1;
EX0 = 1;
IT0 = 0;
while(1){
}
}
void Timer0Interrupt() interrupt 1
{
TH0 = 0x3C;
TL0 = 0x0B0;
count++;
if(count==10){
count=0;
P2=num[ii];
ii++;
if (ii==9){
ii=0;
}
}
}
|