#include <reg52.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
uchar code Table_OF_Digits[]=
{
0x00,0x3e,0x41,0x41,0x41,0x3e,0x00,0x00,
0x00,0x00,0x00,0x21,0x7f,0x01,0x00,0x00,
0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x00,
0x00,0x22,0x49,0x49,0x49,0x36,0x00,0x00,
0x00,0x0c,0x14,0x24,0x7f,0x04,0x00,0x00,
0x00,0x72,0x51,0x51,0x51,0x4e,0x00,0x00,
0x00,0x3e,0x49,0x49,0x49,0x26,0x00,0x00,
0x00,0x40,0x40,0x40,0x4f,0x70,0x00,0x00,
0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x00,
0x00,0x32,0x49,0x49,0x49,0x3e,0x00,0x00,
};
uchar i=0,t=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;
if(++t == 250)
{
t = 0x00;
if(++Num_Index == 10) Num_Index = 0;
}
}
本文来源:https://www.wddqw.com/doc/ce0c0064a76e58fafbb0036b.html
正在阅读:
LED点阵显示数字设计C语言程序01-01
【初中语文】中考语文文言文重点字词——《过零丁洋》01-01
交通安全方面应注意的要点01-01
幼儿园小班美术教案《桃花朵朵开》含反思01-01
内蒙古高等学历学籍修改应提供的证明材料01-01
关不上的窗-散文随笔01-01
七月初七中国情人节活动策划方案01-01
第七条猎狗读后感优秀3篇01-01
销售部奖励机制活动方案01-01