完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
望各位能告诉我电路的工作流程#include #include /* 数据端接口定义 */ ***it sck = P2^0; //输入时钟 ***it row_dat = P2^1; //行数据时钟 ***it row_buf_sck = P2^2; //行锁存 //***it row_mr = P2^4; //移位寄存器清零端 //***it row_oe = P2^5; //输出使能 /* 选通端接口定义 */ ***it col_dat = P2^6; //列数据时钟 ***it col_buf_sck = P2^3; //列锁存 unsigned int code sel[16] = {0xff7f,0x7fff,0xffbf,0xbfff,0xffdf,0xdfff,0xffef,0xefff, 0xfff7,0xf7ff,0xfffb,0xfbff,0xfffd,0xfdff,0xfffe,0xfeff}; unsigned char code hanzi[22][32] = { /* @1 河(16x16,V)@ [suki software]*/ {0x08,0x20, 0x06,0x20, 0x40,0x7E, 0x31,0x80, 0x00,0x00, 0x20,0x00, 0x27,0xF0, 0x24,0x20, 0x24,0x20, 0x27,0xF0, 0x20,0x02, 0x20,0x01, 0x3F,0xFE, 0x20,0x00, 0x20,0x00, 0x00,0x00}, /* @2 南(16x16,V)@ [suki software]*/ {0x20,0x00, 0x27,0xFF, 0x24,0x00, 0x24,0x10, 0x26,0x90, 0x25,0x90, 0x24,0x90, 0xFC,0xFE, 0x24,0x90, 0x25,0x90, 0x26,0x90, 0x24,0x12, 0x24,0x01, 0x27,0xFE, 0x20,0x00, 0x00,0x00}, /* @3 工(16x16,V)@ [suki software]*/ {0x00,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x3F,0xFC, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x00,0x04, 0x00,0x00}, /* @4 业(16x16,V)@ [suki software]*/ {0x00,0x02, 0x08,0x02, 0x06,0x02, 0x01,0xC2, 0x00,0x02, 0xFF,0xFE, 0x00,0x02, 0x00,0x02, 0x00,0x02, 0xFF,0xFE, 0x00,0x42, 0x00,0x82, 0x03,0x02, 0x0C,0x02, 0x00,0x02, 0x00,0x00}, /* @5 职(16x16,V)@ [suki software]*/ {0x40,0x10, 0x40,0x18, 0x7F,0xF0, 0x49,0x10, 0x49,0x20, 0x7F,0xFF, 0x40,0x20, 0x40,0x01, 0x3F,0xC6, 0x20,0x98, 0x20,0x80, 0x20,0x80, 0x20,0x90, 0x3F,0xCC, 0x00,0x03, 0x00,0x00}, /* @6 业(16x16,V)@ [suki software]*/ {0x00,0x02, 0x08,0x02, 0x06,0x02, 0x01,0xC2, 0x00,0x02, 0xFF,0xFE, 0x00,0x02, 0x00,0x02, 0x00,0x02, 0xFF,0xFE, 0x00,0x42, 0x00,0x82, 0x03,0x02, 0x0C,0x02, 0x00,0x02, 0x00,0x00}, /* @7 技(16x16,V)@ [suki software]*/ {0x08,0x20, 0x08,0x22, 0x08,0x41, 0xFF,0xFE, 0x08,0x80, 0x09,0x01, 0x10,0x01, 0x11,0x02, 0x11,0xC2, 0x11,0x34, 0xFF,0x08, 0x11,0x14, 0x11,0x62, 0x11,0x81, 0x10,0x01, 0x00,0x00}, /* @8 术(16x16,V)@ [suki software]*/ {0x00,0x08, 0x08,0x10, 0x08,0x20, 0x08,0x40, 0x08,0x80, 0x0B,0x00, 0x0C,0x00, 0xFF,0xFF, 0x0C,0x00, 0x0B,0x00, 0x48,0x80, 0x38,0x40, 0x08,0x20, 0x08,0x10, 0x00,0x08, 0x00,0x00}, /* @9 学(16x16,V)@ [suki software]*/ {0x02,0x20, 0x0C,0x20, 0x88,0x20, 0x69,0x20, 0x09,0x20, 0x09,0x22, 0x89,0x21, 0x69,0x7E, 0x09,0x60, 0x09,0xA0, 0x19,0x20, 0x28,0x20, 0xC8,0x20, 0x0A,0x20, 0x0C,0x20, 0x00,0x00}, /* @10 院(16x16,V)@ [suki software]*/ {0x00,0x00, 0x7F,0xFF, 0x44,0x20, 0x5A,0x10, 0x61,0xE0, 0x08,0x01, 0x30,0x82, 0x24,0x8C, 0x24,0xF0, 0xA4,0x80, 0x64,0x80, 0x24,0xFC, 0x24,0x82, 0x28,0x82, 0x30,0x8E, 0x00,0x00}, /* @11 电(16x16,V)@ [suki software]*/ {0x00,0x00, 0x00,0x00, 0x1F,0xF8, 0x11,0x10, 0x11,0x10, 0x11,0x10, 0x11,0x10, 0xFF,0xFE, 0x11,0x11, 0x11,0x11, 0x11,0x11, 0x11,0x11, 0x1F,0xF9, 0x00,0x01, 0x00,0x0F, 0x00,0x00}, /* @12 子(16x16,V)@ [suki software]*/ {0x01,0x00, 0x41,0x00, 0x41,0x00, 0x41,0x00, 0x41,0x00, 0x41,0x02, 0x41,0x01, 0x47,0xFE, 0x45,0x00, 0x49,0x00, 0x51,0x00, 0x61,0x00, 0x41,0x00, 0x01,0x00, 0x01,0x00, 0x00,0x00}, /* @13 工(16x16,V)@ [suki software]*/ {0x00,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x3F,0xFC, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x20,0x04, 0x00,0x04, 0x00,0x00}, /* @14 程(16x16,V)@ [suki software]*/ {0x24,0x10, 0x24,0x60, 0x25,0x80, 0x7F,0xFF, 0xC4,0x80, 0x44,0x60, 0x00,0x02, 0x7C,0x92, 0x44,0x92, 0x44,0x92, 0x44,0xFE, 0x44,0x92, 0x44,0x92, 0x7C,0x92, 0x00,0x82, 0x00,0x00}, /* @15 系(16x16,V)@ [suki software]*/ {0x00,0x00, 0x00,0x42, 0x44,0x44, 0x4C,0xC8, 0x54,0xD0, 0x65,0x42, 0x45,0x41, 0x46,0x7E, 0x84,0x40, 0x88,0x40, 0x90,0x50, 0x81,0x48, 0x80,0xC4, 0x00,0x62, 0x00,0x00, 0x00,0x00}, /* @16 计(16x16,V)@ [suki software]*/ {0x02,0x00, 0x02,0x00, 0x42,0x00, 0x33,0xFE, 0x00,0x04, 0x02,0x08, 0x02,0x00, 0x02,0x00, 0x02,0x00, 0xFF,0xFF, 0x02,0x00, 0x02,0x00, 0x02,0x00, 0x02,0x00, 0x02,0x00, 0x00,0x00}, /* @17 控(16x16,V)@ [suki software]*/ {0x08,0x40, 0x08,0x42, 0x08,0x81, 0xFF,0xFE, 0x09,0x00, 0x04,0x02, 0x19,0x02, 0x12,0x42, 0x14,0x42, 0x90,0x42, 0x70,0x7E, 0x14,0x42, 0x12,0x42, 0x15,0x42, 0x18,0x02, 0x00,0x00}, /* @18 1(16x16,V)@ [suki software]*/ 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x08,0x04, 0x08,0x04, 0x1F,0xFC, 0x00,0x04, 0x00,0x04, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, /* @19 2(16x16,V)@ [suki software]*/ 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x0E,0x0C, 0x10,0x14, 0x10,0x24, 0x10,0x44, 0x11,0x84, 0x0E,0x0C, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, /* @20 0(16x16,V)@ [suki software]*/ 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x07,0xF0, 0x08,0x08, 0x10,0x04, 0x10,0x04, 0x08,0x08, 0x07,0xF0, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, /* @21 1(16x16,V)@ [suki software]*/ 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x08,0x04, 0x08,0x04, 0x1F,0xFC, 0x00,0x04, 0x00,0x04, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, /* @22 班(16x16,V)@ [suki software]*/ {0x21,0x08, 0x21,0x0C, 0x3F,0xF8, 0x21,0x10, 0x21,0x11, 0x00,0x42, 0x1F,0x84, 0x00,0x18, 0xFF,0xE0, 0x00,0x00, 0x21,0x04, 0x21,0x04, 0x3F,0xFC, 0x21,0x04, 0x21,0x04, 0x00,0x00}, }; void send_data_row(unsigned int dat); /* 发送行数据端数据函数 */ void send_data_col(unsigned int dat); /* 发送列选通端数据函数 */ void display(unsigned char *p); void delay(unsigned int m); void main() { unsigned char i,j; // row_mr = 1; // row_oe = 0; while(1) { for(i=0;i<22;i++) //八个代码 { for(j=0;j<15;j++) //循环显示汉字十遍 display(hanzi); //显示一个汉字 } } } void send_data_row(unsigned int dat) { unsigned char i; for(i=0;i<16;i++) { sck = 0; row_dat = dat&0x8000; //temp<<=1; dat = dat<<1; //ds = CY; sck = 1; } row_buf_sck = 0; _nop_(); _nop_(); row_buf_sck = 1; } void send_data_col(unsigned int dat) { unsigned char i; for(i=0;i<16;i++) { sck = 0; col_dat = dat&0x8000; dat = dat<<1; sck = 1; } col_buf_sck = 0; _nop_(); _nop_(); col_buf_sck = 1; } void delay(unsigned int m) { unsigned char i; for(;m>0;m--) { for(i=0;i<124;i++) {;} } } void display(unsigned char *p) { unsigned char i; // unsigned int temp; for(i=0;i<32;i++) { if(i<16) { send_data_row(0x0000); // temp = sel|0xff00; send_data_col(sel); send_data_row(*p); p++; delay(2); } else { send_data_row(0x0000); // temp = (sel<<8)|0x00ff; send_data_col(sel[i-16]); send_data_row((*p)<<8); p++; delay(2); } } }
|
|
相关推荐
16个回答
|
|
请上传完整编译文件和仿真文件
|
|
|
|
|
|
|
|
两个大点 1、595,他是移位寄存器。要懂他的基本工作原理,他是如何级联的。 2、懂扫描,看清扫描方式。因扫描方式不同而导致的推送方式不同。 看左侧,col,这里说的是列,是控制列显示,看我给你摘下来的图片。他是控制一行中某列显示。 看右侧,row,这里说的是行,是控制行显示,看我给你摘下来的图片。他是控制一行显示。 综上,看我给你摘下来的图片。我截出的点阵,控制第一行,第三列。 在这个原理上,你想看一下他的具体流程,你这样弄 void display(unsigned char *p) { unsigned char i; for(i=0;i<32;i++) { if(i<16) { send_data_row(0x0000); send_data_col(sel); send_data_row(*p); p++; delay(2); } else { send_data_row(0x0000); send_data_col(sel[i-16]); send_data_row((*p)<<8); p++; delay(2); } } } 第一:屏蔽else里面的东西。看如何分屏显示。 第二:加大延时看分屏扫描方向。 结合原理和调试方法,你就能看出他的显示方法了。但个人感觉,这个程序做的一般,你想看看我的程 序吗,我有一份自己编写的,比这个好看,但是放哪了,我忘了,如果你想的话,说一声,我抽空帮你 写一个。 |
|
|
|
要是你有空的话就给我一份你的吧,同时祝你新年快乐,感谢你在论坛长期给大家带来的帮助 |
|
|
|
嗯,谢谢你了。也祝你新年快了。后天我找个时间帮你。 |
|
|
|
朋友啊,不好意思,这两天过年,真的是七大姑八大姨啊!明天就要上班了,如果还不给你弄确实有点过了。谁让你给我拜年了呢。给你。这个我没在细看程序,但是我看了一眼仿真,应该是四种控制方向,你自己先品品,等我上班有时间了,在帮你弄。
Dot_Matrix_Mixed_Model.rar
(129.57 KB, 下载次数: 74
)
|
|
|
|
嗯嗯,不急,你忙您的 |
|
|
|
|
|
|
|
你的资料挺全的,我有一同学想托我问问你,有没有多点温度控制的proteus仿真资料。。收到后麻烦你请尽快回复,这个挺急的,这里先谢谢了
|
|
|
|
是和我说吗? 没太明白你说的多点是指什么,是公用总线的多点,还是多个线的多点。是用什么通讯协议,是one wire,还是iic,还是spi的通讯协议! |
|
|
|
十分有帮助!!谢谢楼主!
|
|
|
|
有16X16的点阵取模软件吗
|
|
|
|
十分有帮助!!谢谢楼主!
|
|
|
|
不错,很好很好的
|
|
|
|
十分有帮助!!谢谢楼主!
|
|
|
|
武力戡乱 发表于 2015-2-24 18:40 不错!赞! |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
4452 浏览 3 评论
5742 浏览 1 评论
6016 浏览 0 评论
Protues中自己封装的芯片元件无Program File、Clock Frequency选项怎么解决,求求大神了!
7750 浏览 1 评论
基于51单片机的车辆倒车雷达报警系统,HC-SR04超声波测距,全套资料
1222 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-23 06:28 , Processed in 0.952228 second(s), Total 103, Slave 85 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号