您的位置 首页 电路

51单片机驱动16X16点阵(上移左移闪耀显现)

仿真文件里面有电路图下载地址:http:www51heicombbsdpj-20402-1html,大家可以用protues直接看到效果下面是源代码:*本次16X16点

仿真文件里边有电路图下载地址:http://www.51hei.com/bbs/dpj-20402-1.html,我们可以用protues直接看到作用
下面是源代码:
/*本次16X16点阵显现各种方法的显现程序悉数由自己编写,因为自己学习C言语并不是太深,正好借此机会让各位教师学习学习。*/
/*本次显现程序的规划分三个阶断
第一阶段:左移显现方法的规划
第二阶段:上移显现方法的规划
第三阶段:闪耀显现方法的规划 */
#include
#define uchar unsigned char
#define uint unsigned int
uchar table1[]={
0xE0,0x0F,0x10,0x10,0x08,0x20,0x08,0x20,
0x08,0x20,0x10,0x10,0xE0,0x0F,0x00,0x00,/*”O”,0*/

0x08,0x20,0xF8,0x3F,0x88,0x20,0xC0,0x01,
0x28,0x26,0x18,0x38,0x08,0x20,0x00,0x00};/*”K”,1*//*上移显现的字符*/

uchar code table[]=
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x0C,0x20,0x0C,0x38,
0x0C,0x0F,0xEC,0x03,
0x7F,0x60,0x0F,0x63,
0xCC,0x31,0x0C,0x18,
0xEC,0x0F,0xEC,0x07,
0x0C,0x0C,0x0C,0x19,
0x8C,0x31,0xCC,0x60,
0x0C,0x20,0x00,0x00,/*”灰”,0*/
0x20,0x00,0x30,0x00,
0xF8,0x3F,0xFC,0x7F,
0x6F,0x63,0x6F,0x63,
0xEC,0x63,0xFC,0x63,
0x7C,0x63,0x6C,0x63,
0x64,0x63,0xE0,0x63,
0xE0,0x73,0x00,0x30,
0x00,0x00,0x00,0x00,/*”色”,1*/
0x00,0x00,0x9C,0x60,
0xDC,0x60,0x4C,0x66,
0x6C,0x66,0x2C,0x66,
0x0D,0x66,0x0F,0x7E,
0x0E,0x7E,0x2C,0x66,
0x6C,0x66,0x4C,0x66,
0xCC,0x66,0x9C,0x60,
0x1C,0x60,0x00,0x00,/*”空”,2*/
0x00,0x00,0xF8,0x7F,
0xFB,0x7F,0x07,0x00,
0xF6,0x0F,0xF0,0x0F,
0x36,0x0D,0x36,0x0D,
0x36,0x0D,0xF6,0x0F,
0xF6,0x2F,0x06,0x60,
0xFE,0x7F,0xFE,0x3F,
0x00,0x00,0x00,0x00,/*”间”,3*//*左移显现的字符*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

uchar code table2[]={
0x60,0x06,0x6C,0x06,
0x6C,0x66,0xFC,0x7F,
0xFE,0x3F,0x66,0x03,
0x66,0x23,0x60,0x30,
0xFF,0x33,0xFF,0x1F,
0x60,0x1C,0x66,0x37,
0x6C,0x63,0x68,0x70,
0x00,0x70,0x00,0x00,/*”我”,0*/
0x70,0x08,0x76,0x18,
0xB6,0x5D,0xBE,0x4D,
0xBE,0x67,0xF6,0x6F,
0xF6,0x3D,0xBE,0x35,
0xBE,0x35,0xB3,0x3D,
0xBB,0x6D,0xBF,0x65,
0xF7,0x61,0x70,0x60,
0x00,0x20,0x00,0x00,/*”爱”,1*/
0x00,0x00,0xF8,0x18,
0x48,0x20,0x48,0x20,
0x48,0x20,0x48,0x20,
0x88,0x1F,0x00,0x00,/*”5″,2*/
0x00,0x00,0x20,0x00,
0x30,0x00,0xF8,0x3F,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,/*”1″,3*/
0x00,0x00,0x00,0x18,
0xFC,0x1B,0xFC,0x1B,
0x6D,0x1B,0x6F,0x1B,
0x6E,0x1B,0xFC,0x7F,
0xFC,0x7F,0x6E,0x1B,
0x6F,0x1B,0x6D,0x1B,
0xFC,0x1B,0xFC,0x1B,
0x00,0x18,0x00,0x00,/*”单”,4*/
0x00,0x00,0x00,0x60,
0x00,0x38,0xFE,0x1F,
0xFE,0x07,0x30,0x03,
0x30,0x03,0x30,0x03,
0x30,0x03,0x3F,0x03,
0x3F,0x7F,0x30,0x7F,
0x30,0x00,0x30,0x00,
0x00,0x00,0x00,0x00,/*”片”,5*/
0x18,0x06,0x98,0x03,
0xFF,0x7F,0xFF,0x7F,
0x98,0x01,0x18,0x23,
0x00,0x70,0xFE,0x3F,
0xFE,0x0F,0x06,0x00,
0x06,0x00,0xFE,0x3F,
0xFE,0x7F,0x00,0x60,
0x00,0x70,0x00,0x00,/*”机”,6*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/*闪耀显现字符*/
uchar v,flag,temp;
uchar i,j,k,shuz,shub,temp1;
uchar a,b,c,d,e,f,numa,numb;
uchar ii,jj,kk;
uchar iii,jjj,kkk;
uchar a3,b3;
uchar num3,temp3;
uchar temp2;
sbit le=P3^0;/*各变量值的初始化*/
void init();/*主函数的初始化声名*/
void init1();/*左移显现方法的初始化声名*/
void init2();/*上移显现方法的初始化声名*/
void init3();/*闪耀显现方法的初始化声名*/
void disp1();/*左移显现子程序声名*/
void disp2();/*上移显现子程序声名*/
void disp3();/*闪耀显现子程序声名*/

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/fangan/dianlu/318184.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部