unsigned char
unsigned char code digittab[][8]={
{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},//" ",0*/
{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},//" ",0*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF},//"_",0*/
{0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF},//"_",0*/
{0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF},//"_",0*/
{0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF},//"_",0*/
{0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF},//"_",0*/
{0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},//"_",0*/
{0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},//"_",0*/
{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},//"_",0*/
{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01},//"|",0*/
{0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02},//"|",0*/
{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04},//"|",0*/
{0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08},//"|",0*/
{0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10},//"|",0*/
{0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20},//"|",0*/
{0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40},//"|",0*/
{0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80},//"|",0*/
{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},//" ",0*/
//图形1
{0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00},//"未命名文件",0*/
{0x00,0x00,0x3C,0x24,0x24,0x3C,0x00,0x00},//"未命名文件",0*/
{0x00,0x7E,0x42,0x42,0x42,0x42,0x7E,0x00},//"未命名文件",0*/
{0xFF,0x81,0x81,0x81,0x81,0x81,0x81,0xFF},//"未命名文件",0*/
//图形2
{0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00},
{0x00,0x00,0x24,0x18,0x18,0x24,0x00,0x00},
{0x00,0x42,0x24,0x18,0x18,0x24,0x42,0x00},
{0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81},
//图形3
{0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00},
{0x00,0x00,0x24,0x18,0x18,0x24,0x00,0x00},
{0x00,0x10,0x24,0x1A,0x58,0x24,0x08,0x00},
{0x08,0x10,0x24,0x9A,0x59,0x24,0x08,0x10},
{0x0C,0x10,0xA4,0x9A,0x59,0x25,0x08,0x30},
{0x0E,0x90,0xA4,0x9A,0x59,0x25,0x09,0x70},
{0x8F,0x90,0xA4,0x9A,0x59,0x25,0x09,0xF1},
{0x0C,0x12,0x12,0x12,0x12,0x12,0x0C,0x00},
{0x04,0x06,0x04,0x04,0x04,0x04,0x0E,0x00},
{0x0C,0x12,0x10,0x08,0x04,0x02,0x1E,0x00},
{0x0C,0x12,0x10,0x0C,0x10,0x12,0x0C,0x00},
{0x08,0x0C,0x0C,0x0A,0x0A,0x1E,0x08,0x00},
{0x1E,0x02,0x02,0x0E,0x10,0x10,0x0E,0x00},
{0x0C,0x12,0x02,0x0E,0x12,0x12,0x0C,0x00},
{0x1E,0x12,0x10,0x08,0x04,0x04,0x04,0x00},
{0x0C,0x12,0x12,0x0C,0x12,0x12,0x0C,0x00},
{0x0C,0x12,0x12,0x1C,0x10,0x12,0x0C,0x00},
{0x0C,0x12,0x12,0x12,0x1E,0x12,0x12,0x00},
{0x0E,0x12,0x12,0x0E,0x12,0x12,0x0E,0x00},
{0x0C,0x12,0x02,0x02,0x02,0x12,0x0C,0x00},
{0x0E,0x12,0x12,0x12,0x12,0x12,0x0E,0x00},
{0x1E,0x02,0x02,0x0E,0x02,0x02,0x1E,0x00},
{0x1E,0x02,0x02,0x0E,0x02,0x02,0x02,0x00},
{0x0C,0x12,0x02,0x1A,0x12,0x12,0x0C,0x00},
{0x12,0x12,0x12,0x1E,0x12,0x12,0x12,0x00},
{0x0E,0x04,0x04,0x04,0x04,0x04,0x0E,0x00},
[page]
{0x10,0x10,0x10,0x10,0x12,0x12,0x0C,0x00},
{0x12,0x12,0x0A,0x06,0x0A,0x12,0x12,0x00},
{0x02,0x02,0x02,0x02,0x02,0x02,0x1E,0x00},
{0x12,0x1E,0x1E,0x12,0x12,0x12,0x12,0x00},
{0x12,0x16,0x16,0x1A,0x1A,0x12,0x12,0x00},
{0x1E,0x12,0x12,0x12,0x12,0x12,0x1E,0x00},
{0x0E,0x12,0x12,0x0E,0x02,0x02,0x02,0x00},
{0x0C,0x12,0x12,0x12,0x16,0x1A,0x1C,0x00},
{0x0E,0x12,0x12,0x0E,0x06,0x0A,0x12,0x00},
{0x0C,0x12,0x02,0x0C,0x10,0x12,0x0C,0x00},
{0x1E,0x04,0x04,0x04,0x04,0x04,0x04,0x00},
{0x12,0x12,0x12,0x12,0x12,0x12,0x0C,0x00},
{0x12,0x12,0x12,0x12,0x0C,0x0C,0x0C,0x00},
{0x12,0x12,0x12,0x12,0x1E,0x1E,0x12,0x00},
{0x12,0x12,0x0C,0x0C,0x0C,0x12,0x12,0x00},
{0x11,0x11,0x0A,0x04,0x04,0x04,0x04,0x00},
{0x1E,0x10,0x08,0x0C,0x04,0x02,0x1E,0x00},
};
unsigned int timecount;
unsigned char cnta;
unsigned char cntb;
void main(void)
{
TMOD=0x01;
TH0=(65536-3000)/256;
TL0=(65536-3000)%6;
TR0=1;
ET0=1;
EA=1;
while(1)
{;
}
}
void t0(void) interrupt 1 using 0
{
TH0=(65536-2000)/256;
TL0=(65536-2000)%6;
P1=0XFF; //消除显示重影问题
P0=~digittab[cntb][cnta];
P1=~(0x01< cnta++; if(cnta==8) { cnta=0; } timecount++; if(timecount==200) { timecount=0; cntb++; if(cntb==70) { cntb=0; } } }
上一篇:51单片机计数器计数数码管显示
下一篇:51单片机摸拟串口(232)
推荐阅读最新更新时间:2024-03-16 14:30
设计资源 培训 开发板 精华推荐
- 柔灵科技陈涵:将小型、柔性的脑机接口睡眠设备,做到千家万户
- 微灵医疗李骁健:脑机接口技术正在开启意识与AI融合的新纪元
- USB Type-C® 和 USB Power Delivery:专为扩展功率范围和电池供电型系统而设计
- 景昱医疗耿东:脑机接口DBS治疗技术已实现国产替代
- 首都医科大学王长明:针对癫痫的数字疗法已进入使用阶段
- 非常见问题解答第223期:如何在没有软启动方程的情况下测量和确定软启动时序?
- 兆易创新GD25/55全系列车规级SPI NOR Flash荣获ISO 26262 ASIL D功能安全认证证书
- 新型IsoVu™ 隔离电流探头:为电流测量带来全新维度
- 英飞凌推出简化电机控制开发的ModusToolbox™电机套件
- 意法半导体IO-Link执行器电路板为工业监控和设备厂商带来一站式参考设计