#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar code S[16]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
sbit P21=P2^1;
uint i=0;
void delay(uint t)
{
uchar j;
while(t--)
{
for(j=0;j<115;j++);
}
}
SHUMA()
{
P21=0;
}
void shuma0() interrupt 0
{
P0=S[i++];
delay(500);
if(i>=16)
i=0;
}
wzd0()
{
EA=1;
EX0=1;
IT0=1;
}
void main()
{
wzd0();
SHUMA();
while(1);
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>