|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
#include <reg52.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
uchar code Table_OF_Digits[]=
{
0x44,0x68,0xd0,0x68,0x44,0x38,0x02,0xFF,
};
uchar i=0,Num_Index = 0;
void main()
{
P3 = 0x80;
Num_Index = 0;
TMOD = 0x00;
TH0 = (8192-2000)/32;
TL0 = (8192-2000)%32;
TR0 = 1;
IE = 0x82;
while(1);
}
void LED_Screen_Display() interrupt 1
{
TH0 = (8192-2000)/32;
TL0 = (8192-2000)%32;
P3 = _crol_(P3,1);
P0 = ~Table_OF_Digits[Num_Index * 8 +i];
if(++i == 8) i = 0;
} |
|