《多个1616led显示演示程序》由会员分享,可在线阅读,更多相关《多个1616led显示演示程序(11页珍藏版)》请在金锄头文库上搜索。
1、多个多个 1616LED1616LED 显示演示程序显示演示程序/*-多个 16*16LED 显示演示程序MCU AT89C52 XAL 24MHz2005 年 5 月 18 日-*/以下程序能实现多个 16*16LED 屏的多个字符显示,显示方式有整行上移、帘入帘出、左移、右移/#include “reg52.h“#define BLKN 8 /列锁存器数(=LED 显示字数*2)#define TOTAL 20 /待显示字个数,本例共 20 个#define CONIO P1 /显示控制口sbit G=CONIO7; /CONIO.7 为 154 译码器显示允许控制信号端口,0 时输出,1
2、 时输出全为高阻态.sbit CLK=CONIO6; /CONIO.6 为 595 输出锁存器时钟信号端,1 时输出数据,从 1 到 0 时锁存输出数据.sbit SCLR=CONIO5; /CONIO.5 为 595 移位寄存器清零口,平时为 1,为 0 时,输出全为 0.unsigned char idata dispram(BLKN/2)*32=0; /显示区缓存,四字共 4*32 单元/*字模表*/unsigned char code Bmp32=0xEF,0xFF,0xEF,0x03,0x81,0xBB,0xDD,0xBB,0xDD,0xD7,0xEB,0xEF,0xF3,0xD7,
3、0xCD,0xB9,0x3E,0xFF,0xC0,0x07,0xFE,0xF7,0xFD,0xF7,0xFD,0xF7,0xFB,0xF7,0xF7,0xD7,0xEF,0xEF,/*- 文字: 努 -*/0xFE,0xFF,0xFE,0xFF,0xFE,0xFF,0xFE,0xFF,0x80,0x03,0xFE,0xFB,0xFE,0xFB,0xFE,0xFB,0xFE,0xFB,0xFD,0xFB,0xFD,0xFB,0xFB,0xFB,0xFB,0xFB,0xF7,0xFB,0xEF,0xD7,0xDF,0xEF,/*- 文字: 力 -*/0xFE,0xF7,0xEF,0x73,0xF3
4、,0x37,0xF7,0x6F,0x80,0x01,0xBF,0xFB,0x70,0x17,0xFF,0xBF,0xFF,0x7F,0x80,0x01,0xFF,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x7F,0xFD,0x7F,0xFE,0xFF,/*- 文字: 学 -*/0xFF,0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