最新点阵 左移 上移 右移 下移 下拉 等花样显示
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
#include
#define uint unsigned int
#define uchar unsigned char
#define sudu 20
/***各种声明的声明*****/
sbit LAT_port=P2^0;
sbit CLK_port=P2^1;
sbit DI_port=P2^2;
sbit G_port=P2^3;
sbit A_port=P2^4;
sbit B_port=P2^5;
sbit C_port=P2^6;
sbit D_port=P2^7;
uchar move; //上移下移用的全局变量
uchar temp; //缓冲用的
uchar han;
uchar zi;
uchar code ziku[]={
0xFF,0xFF,0xC7,0xE3,0x83,0xC1,0x79,0x9E,0xFE,0x7F,0xFE,0x7F,0xFE,0x7 F,0xFE,0x7F,
0xFE,0x7F,0xFE,0x7F,0xFC,0x3F,0xF9,0x9F,0xE3,0xC7,0xC7,0xF1,0x1F,0xF C,0x7F,0xFE,/*"未命名文件",0*/
0x7F,0xFF,0x7F,0xFF,0x01,0xC0,0x3F,0xFE,0x5F,0xFD,0x6F,0xFB,0x73,0xE 7,0x7C,0x9F,
0x0F,0xF8,0xFF,0xFD,0xFF,0xFE,0x00,0x80,0x7F,0xFF,0x7F,0xFF,0x5F,0xF F,0xBF,0xFF,/*"李",0*/
0xF7,0xF7,0x80,0x80,0xF7,0xF7,0xC1,0xC1,0xF7,0xF7,0x80,0x80,0xF7,0xF 7,0x03,0xE0,
0xFF,0xEF,0x07,0xE0,0xFF,0xEF,0x03,0xE0,0x7F,0xFF,0xED,0xDE,0xED,0xB 7,0x1E,0xB0,/*"慧",1*/
0xFF,0xFF,0x07,0xF0,0xF7,0xF7,0xF7,0xF7,0xB7,0xF7,0x77,0xF7,0x77,0xF 7,0xF7,0xF7,
0x00,0x80,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xFB,0xF7,0xFB,0xF7,0xFD,0xF 5,0xFE,0xFB,/*"丹",2*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,
};
uchar code ziku1[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0,0x00,0x00,
0xFF,0xFF,0x07,0xF0,0xF7,0xF7,0xF7,0xF7,0xB7,0xF7,0x77,0xF7,0x77,0xF 7,0xF7,0xF7,
0x00,0x80,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xFB,0xF7,0xFB,0xF7,0xFD,0xF 5,0xFE,0xFB,/*"丹",2*/
0xF7,0xF7,0x80,0x80,0xF7,0xF7,0xC1,0xC1,0xF7,0xF7,0x80,0x80,0xF7,0xF 7,0x03,0xE0,
0xFF,0xEF,0x07,0xE0,0xFF,0xEF,0x03,0xE0,0x7F,0xFF,0xED,0xDE,0xED,0xB 7,0x1E,0xB0,/*"慧",1*/
0x7F,0xFF,0x7F,0xFF,0x01,0xC0,0x3F,0xFE,0x5F,0xFD,0x6F,0xFB,0x73,0xE 7,0x7C,0x9F,
0x0F,0xF8,0xFF,0xFD,0xFF,0xFE,0x00,0x80,0x7F,0xFF,0x7F,0xFF,0x5F,0xF F,0xBF,0xFF,/*"李",0*/
0xFF,0xFF,0xC7,0xE3,0x83,0xC1,0x79,0x9E,0xFE,0x7F,0xFE,0x7F,0xFE,0x7 F,0xFE,0x7F,
0xFE,0x7F,0xFE,0x7F,0xFC,0x3F,0xF9,0x9F,0xE3,0xC7,0xC7,0xF1,0x1F,0xF C,0x7F,0xFE,/*"未命名文件",0*/
};
uchar BUF[4];
/***子函数申明****/
void delay(uint t);
void xie595(uchar dat);
void hangxuan(uchar han);
void huanchong();
void zhuanhuanzuoyi();
void zhuanhuanyouyi();
/***延时****///
void delay(uint t)
{
while(t--) ;
}
/****595输入函数****///
void xie595(uchar dat)
{
uchar i;
CLK_port=0;
for(i=0;i<8;i++)
{
if((dat&0x80)!=0)
DI_port=1;
else
DI_port=0;
CLK_port=1; //上升沿输入数据
CLK_port=0;
dat<<=1;
}
}