微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > 点阵16*32综合C程序

点阵16*32综合C程序

时间:11-29 来源:互联网 点击:
点阵16*32综合(间断、上移、下移、左移、右移、左拉、右拉)C程序,硬件电路:行驱动74HC154+S8550三极管,列驱动74HC595,具体原理图祥见:http://www.51hei.com/mcu/1522.html

具体视频效果祥见:http://www.tudou.com/programs/view/8qoTrWwtGzg/

程序代码下载:http://www.51hei.com/f/dz88.rar
#include
#define uchar unsigned char
#define uint unsigned int
#define LINE P0//定义行线IO口,即74HC154控制端
#define shudu 4//字移动的速度
sbit DATA=P1^4;//74HC595数据端
sbit CLK=P1^5;//74HC595移位脉冲端
sbit CLKR=P1^6;//74HC595数据锁存端
uchar move;//移动几位变量
uchar line,ji;//行变量
uint word;//字节变量
uchar BUF[6];//4组缓存数组以便动态更改数据
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,
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,0x10,0x3F,0xF8,0x04,0x10,0x04,0x14,0xFF,0xFE,0x04,0x10,0x04,0x10,
0x3F,0xF0,0x04,0x10,0x04,0x00,0x08,0x00,0x08,0x00,0x10,0x00,0x20,0x00,0x40,0x00,
0x01,0x00,0x01,0x08,0x7F,0xFC,0x01,0x00,0x3F,0xF8,0x01,0x00,0xFF,0xFE,0x00,0x10,
0x1F,0xF8,0x10,0x10,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,0x10,0x50,0x10,0x20,

0x01,0x00,0x01,0x00,0x01,0xF8,0x01,0x00,0x01,0x10,0x1F,0xF8,0x10,0x10,0x10,0x10,
0x10,0x10,0x1F,0xF0,0x10,0x10,0x01,0x10,0x28,0x88,0x24,0x44,0x44,0x44,0x00,0x00,
0x00,0x80,0xF8,0x80,0x88,0x80,0x97,0xFC,0xA1,0x00,0x91,0x40,0x8A,0x40,0x8F,0xFC,
0x88,0x40,0xA8,0x40,0x97,0xFE,0x80,0x40,0x80,0x40,0x80,0x40,0x80,0x40,0x80,0x40,

0x24,0x04,0x34,0x04,0x24,0x24,0x3F,0xA4,0x44,0x24,0x04,0x24,0x7F,0xA4,0x04,0x24,
0x3F,0xA4,0x24,0xA4,0x24,0xA4,0x24,0xA4,0x24,0x84,0x27,0x84,0x05,0x14,0x04,0x08,
0x08,0x80,0x0C,0x80,0x09,0x00,0x13,0xFE,0x12,0x80,0x34,0x88,0x50,0xFC,0x90,0x80,
0x10,0x80,0x10,0x84,0x10,0xFE,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,

0x00,0xA0,0x00,0x90,0x00,0x80,0x3F,0xFE,0x20,0x80,0x20,0x80,0x3E,0x88,0x22,0x8C,
0x22,0x48,0x22,0x50,0x22,0x20,0x2A,0x60,0x44,0x92,0x41,0x0A,0x86,0x06,0x00,0x02,
0x00,0x20,0x00,0x20,0x7F,0x20,0x08,0x20,0x0B,0xFC,0x08,0x24,0x08,0x24,0x08,0x44,
0x09,0x44,0x0E,0x44,0xF0,0x84,0x40,0x84,0x01,0x04,0x02,0x78,0x04,0x10,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,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};//字模数组
ucharcode table1[]={
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,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/* 当前所选字体下一个汉字对应的点阵为: 宽度x高度=32x16, 调整后为: 32x16*/
0x00,0x00,0x01,0x00,0x3F,0xF8,0x01,0x00,0x02,0x08,0x3F,0xF8,0x02,0x08,0x01,0x00,
0x7F,0xFE,0x1F,0xF0,0x02,0x08,0x01,0x00,0x02,0x08,0xFF,0xFE,0x3F,0xF8,0x00,0x00,
0x02,0x08,0x1F,0xF0,0x02,0x00,0x10,0x10,0x04,0x00,0x1F,0xF0,0x04,0x00,0x10,0x10,
0x08,0x00,0x1F,0xF0,0x10,0x00,0x10,0x10,0x20,0x00,0x10,0x50,0x40,0x00,0x10,0x20,

/*; 当前所选字体下一个汉字对应的点阵为: 宽度x高度=32x16, 调整后为: 32x16*/
0x01,0x00,0x00,0x80,0x01,0x00,0xF8,0x80,0x01,0xF8,0x88,0x80,0x01,0x00,0x97,0xFC,
0x01,0x10,0xA1,0x00,0x1F,0xF8,0x91,0x40,0x10,0x10,0x8A,0x40,0x10,0x10,0x8F,0xFC,
0x10,0x10,0x88,0x40,0x1F,0xF0,0xA8,0x40,0x10,0x10,0x97,0xFE,0x01,0x10,0x80,0x40,
0x28,0x88,0x80,0x40,0x24,0x44,0x80,0x40,0x44,0x44,0x80,0x40,0x00,0x00,0x80,0x40,

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top