资源描述:
《点阵程序--自己写地》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、实用文档硬件简单介绍一下:行驱动用154四线译码器加8550驱动,列用74hc595移位寄存器驱动。#include#defineucharunsignedchar#defineuintunsignedint#defineLINEP2//定义行线IO口,即74HC154控制端#defineshudu12//字移动的速度sbitDATA=P1^2;//74HC595数据端sbitCLK=P1^0;//74HC595移位脉冲端sbitCLKR=P1^1;//74HC595数据锁存端ucharmove;//移动几位变量
2、ucharline;//行变量uintword;//字节变量ucharji,gai;//字节变量ucharBUF[4];//4组缓存数组以便左移右移等功能动态更改数据uchar codetable[]={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,/*--
3、文字: 笨 --*//*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/实用文档0x00,0x08,0x7F,0xFC,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x08,0x3F,0xFC,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x04,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0
4、x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/**********************下拉、下移数组************************/uchar codetable1[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x
5、00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*-- 文字: 蛋 --*//*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/0x00,0x80,0x78,0x80,0x4B,0xFC,0x48,0x40,0x48,0x48,0x48,0x30,0x78,0xD2,0x4B,0x0A,0x4F,0xF6,0x49,0x20,0x79,0x20,0x4A,0x20,0x02,0x22,0x04,0x22,0x
6、08,0x1E,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 codetable2[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
7、0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*-- 文字: 虫 --*//*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/0x00,0x80,0x00,0x40,0x78,0x40,0x17,0xFE,0x10,0x00,0x13,0xF8,0x7A,0x08,0x12,0x08,0x13,0xF8,0x10,0x40,0x12,0x50,0x1A,0x4
8、8,0x64,0x44,0x04,0x44,0x09,0x40,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x