点阵程序.doc

点阵程序.doc

ID:38069929

大小:25.00 KB

页数:3页

时间:2019-05-25

点阵程序.doc_第1页
点阵程序.doc_第2页
点阵程序.doc_第3页
资源描述:

《点阵程序.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、#include#include#defineucharunsignedchar#defineclkP2_5#definesclkP2_6#defineenP2_4#definedatP2_7voidhang(uchara){uchark;//P2=0;//en=1;for(k=0;k<8;k++){dat=a&0x80;clk=1;clk=0;a<<=1;}//sclk=1;//sclk=0;}delay1ms(unsignedcharm){unsignedcharn;while(m--){for(n=0;n<122;n++);}}voi

2、dmain(void){uchari,j,q;ucharcodea[32]={0x01,0x00,0x01,0x04,0xFF,0xFE,0x01,0x00,0x02,0x00,0x3F,0xFC,0x24,0x24,0x22,0x44,0x2F,0xF4,0x21,0x04,0x3F,0xFC,0x21,0x04,0x21,0x04,0x21,0x14,0x21,0x08,0x00,0x00};ucharcodeb[32]={0x00,0x00,0x7D,0xFC,0x45,0x04,0x49,0x04,0x49,0x04,0x51,0x04,0x49,0xFC,0x45,0x0

3、4,0x45,0x04,0x45,0x04,0x69,0x04,0x51,0x04,0x41,0xFC,0x41,0x04,0x40,0x00,0x40,0x00};ucharcodec[32]={0x00,0x00,0x03,0xFC,0xFA,0x44,0x22,0x44,0x23,0xFC,0x22,0x44,0xFA,0x44,0x23,0xFC,0x22,0x44,0x20,0x40,0x23,0xFC,0x38,0x40,0xC0,0x40,0x00,0x40,0x0F,0xFE,0x00,0x00};ucharcoded[32]={0x00,0x00,0x3F,0xF

4、C,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00};while(1){P2=0;en=1;//P3=0xff;for(j=0;j<62;j++){for(i=0;i<32;i=i+2){hang(a[i]);hang(a[i+1]);q=(31-i)/2;P2=P2&0xf0;P2=P2

5、q;sclk=1;sclk=0;delay1ms(1);}}fo

6、r(j=0;j<62;j++){for(i=0;i<32;i=i+2){hang(b[i]);hang(b[i+1]);q=(31-i)/2;P2=P2&0xf0;P2=P2

7、q;sclk=1;sclk=0;delay1ms(1);}}for(j=0;j<62;j++){for(i=0;i<32;i=i+2){hang(c[i]);hang(c[i+1]);q=(31-i)/2;P2=P2&0xf0;P2=P2

8、q;sclk=1;sclk=0;delay1ms(1);}}for(j=0;j<62;j++){for(i=0;i<32;i=i+2){hang(d[i]);hang(d[

9、i+1]);q=(31-i)/2;P2=P2&0xf0;P2=P2

10、q;sclk=1;sclk=0;delay1ms(1);}}}}

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。