ImageVerifierCode 换一换
格式:DOCX , 页数:19 ,大小:20.70KB ,
资源ID:20740988      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/20740988.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(51单片机驱动1616LED点阵显示动画汉字汇编程序Word文档下载推荐.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

51单片机驱动1616LED点阵显示动画汉字汇编程序Word文档下载推荐.docx

1、LJMP CHINESE显示8幅画面子程序,SCREE专用,用字模软件字要倒置(表必须深256字节)DD: MOV B,#00HMOV R0,#08H ;显示8幅画面AJMP CCCC0: MOV A,BADD A,#20H ;指向下一幅画面MOV B,ACC: MOV R7,#08H ;画面停留时间MOV R3,BMOV 37H,R0LCALL ENTERDIS00: LCALL DISPLAYDJNZ R7,DIS00MOV R0,37HDJNZ R0,CC0RET汉字上移子程序,可显示8个汉字,(表必须深256字节)HZ: MOV R3,#00H ;查表偏移量MOV R5,#81H ;查

2、表128次MOVBACK: MOV R4,#10H ;使显示完一个汉字MOVBACK0: MOV R7,#02H ;一桢画面显示时间MOV R0,#6DH ;低8位R0指向显示缓存倒数第3个字节,以备与最后1个字节交换MOV R1,#6CH ;高8位R1指向显示缓存倒数第4个字节,以备与倒数第2个字节交换MOV R2,#10H ;内存后移的次数DJNZ R5,MOVBACK1RET ;显示完该表,返回MOVBACK1: MOV A,R0 ;低8位被后移的内存单元数据暂存入AINC R0 ;后移两字节MOV R0,A ;放入要移的低8位数据MOV A,R0 ;R0指向下一个要后移的内存单元SUB

3、B A,#04HMOV R0,AMOV A,R1 ;高8位被后移的内存单元数据暂存入AINC R1 ;INC R1MOV R1,A ;放入要移高8位的数据MOV A,R1 ;R1指向下一个要后移的内存单元MOV R1,A ;DJNZ R2,MOVBACK1 ;显示缓存数据依次后移MOV A,R3 ;从表TAB1读入要移进50H,51H的数据MOVC A,A+DPTR;先给50H读数据MOV 50H,A指向下一字节INC AMOV R3,A再给51H读数据MOV 51H,AMOV 30H,R3 ;保护数据MOV 31H,R4MOV 32H,R5DISMOV: LCALL DISPLAY ;显示当

4、前数据DJNZ R7,DISMOVMOV R3,30HMOV R4,31HMOV R5,32HDJNZ R4,MOVBACK0MOV R7,#24H ;显示当前数据延时DISMOV0:DJNZ R7,DISMOV0LJMP MOVBACK放进一幅显示数据到显示缓存子程序,要先设好指针DPTR和R3,影响R1,R2,R3ENTER: MOV R1,#50H ;从50H单元起把表存入MOV R2,#20H ;查表次数MOV A,R3CLLOOP_: MOVC A,A+DPTR ;查表将表放进5X,6X单元R1指向下一个地址空间查表指针后移MOV R3,A ;将指针修改结果存入R3DJNZ R2,C

5、LLOOP_;没查完转CLLOOP_15MS,显示子程序,一桢32个字节,影响A,R0,R1,R3,R4,R5,R6;单片机网提供汉字取模工具,可显示任意汉字DISPLAY: MOV A,#0FFHSETB CMOV R6,#7FH ;赋扫描字初值,左移后初值为0FEHMOV R5,#00H ;列扫描低8位控制行的高8(p1)位要显示的数据起始地址MOV R1,#10H ;扫描次数DISLOOP:从内存读数据MOV P2,#0FFH ;装入数据时不显示任何东西MOV P3,#0FFHCPL A ;数据取反以适合显示MOV P1,A ;送入行的高8(p1)位要显示的数据修改R0指向低8位要显示的

6、数据MOV A,R0 ;读低8位要显示的数据MOV P0,A ;送入行的低8(p0)位要显示的数据R0指向下一个高8(p0)位要显示的数据LCALL NEXT ;调用列扫描程序LCALL DELAY1MS ;显示延时DJNZ R1,DISLOOP;一桢显示完返回MOV P3,#0FFH ;全灭列扫描子程序DISLOOP专用NEXT: JNC NEXT1 ;C=0转扫描高8(p3)位行MOV A,R6 ;修改扫描字RL AMOV R6,AINC R5CJNE R5,#09H,NEXT0 ;R6=#0FEH时C=0AJMP NEXT1BACK: RETNEXT0: MOV P2,R6 ;扫描低8(

7、p2)位行AJMP BACKNEXT1: MOV P2,#0FFHMOV P3,R6 ;扫描高8(p3)位行延时1MS子程序DELAY1MS: MOV R3,#10D0: MOV R4,#50D1: DJNZ R4,D1DJNZ R3,D0TAB1:DB 01FH,0F8H,001H,000H,07FH,0FEH,041H,004H,01DH,070H,001H,000H,01DH,070H,000H,000HDB 01FH,0F0H,011H,010H,01FH,0F0H,011H,010H,01FH,0F2H,001H,002H,001H,002H,000H,0FEH;電DB 000H,0

8、00H,03FH,0F0H,000H,020H,000H,040H,000H,080H,001H,000H,001H,000H,001H,004HDB 0FFH,0FEH,001H,000H,001H,000H,001H,000H,001H,000H,001H,000H,005H,000H,002H,000H;子DB 008H,000H,008H,0FCH,07EH,084H,008H,084H,0FFH,094H,041H,088H,022H,080H,014H,0FEHDB 07EH,0A4H,008H,0A4H,008H,098H,0FFH,098H,008H,0A4H,008H,0A6

9、H,008H,0C4H,008H,080H;報DB 000H,000H,000H,010H,03FH,0F8H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000HDB 000H,000H,000H,000H,000H,000H,000H,004H,07FH,0FEH,000H,000H,000H,000H,000H,000H;二DB 01FH,0F8H,001H,000H,07FH,0FEH,041H,004H,01DH,070H,001H,000H,01DH,070H,002H,080HDB 004H,060H,01AH,01EH,0E1H,0

10、08H,01FH,0E0H,000H,040H,002H,080H,001H,000H,001H,000H;零DB 004H,000H,003H,000H,001H,080H,001H,000H,0FFH,0FEH,000H,000H,000H,000H,004H,080HDB 006H,040H,004H,020H,008H,010H,008H,018H,010H,00CH,020H,00CH,040H,008H,000H,000H;六DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,0

11、00HDB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H;(空)- 水纹 - * 宋体, 12 * 当前所选字体下一个汉字对应的点阵为: 宽度x高度=128x16, 调整后为: 128x16TAB2:DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,001H,080HDB 001H,080H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000

12、H,000H,000H,000H,000HDB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,001H,080H,003H,0C0HDB 003H,0C0H,001H,080H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000H,000HDB 000H,000H,000H,000H,000H,000H,000H,000H,001H,080H,002H,040H,004H,020H,008H,010HDB 008H,010H,004H,020H,002H,040H,

13、001H,080H,000H,000H,000H,000H,000H,000H,000H,000HDB 000H,000H,001H,0C0H,006H,030H,008H,008H,008H,008H,010H,004H,020H,002H,020H,002HDB 020H,002H,010H,004H,008H,008H,008H,008H,006H,030H,001H,0C0H,000H,000H,000H,000HDB 003H,0C0H,00CH,030H,010H,008H,010H,008H,060H,006H,040H,002H,080H,001H,080H,001HDB 08

14、0H,001H,080H,001H,040H,002H,060H,006H,010H,008H,010H,008H,00CH,030H,003H,0C0HDB 000H,000H,038H,01CH,046H,062H,081H,081H,080H,001H,040H,002H,040H,002H,020H,004HDB 020H,004H,040H,002H,040H,002H,080H,001H,081H,081H,046H,062H,038H,01CH,000H,000HDB 0C0H,003H,0A0H,005H,058H,01EH,024H,024H,024H,024H,01EH,0

15、78H,005H,0A0H,002H,040HDB 002H,040H,005H,0A0H,01AH,078H,024H,024H,024H,024H,058H,01AH,0A0H,005H,0C0H,003HDB 000H,000H,0C0H,003H,0B0H,00DH,088H,011H,044H,022H,025H,0A4H,012H,048H,00DH,0B0HDB 00DH,0B0H,012H,048H,025H,0A4H,044H,022H,088H,011H,0B0H,00DH,0C0H,003H,000H,000H-福- * 宋体, 12 * 宽度x高度=16x16, 调整后

16、为: 16x16TAB3:DB 0AAH,055H,055H,0AAH,0AAH,055H,055H,0AAH,0AAH,055H,055H,0AAH,0AAH,055H,055H,0AAHDB 055H,0AAH,0AAH,055H,055H,0AAH,0AAH,055H,055H,0AAH,0AAH,055H,055H,0AAH,0AAH,055HDB 0AAH,055H,055H,0AAH,0AAH,055H,055H,0AAH,0AAH,055H,054H,02AH,0A8H,015H,050H,00AHDB 050H,00AH,0A8H,015H,054H,02AH,0AAH,055

17、H,055H,0AAH,0AAH,055H,055H,0AAH,0AAH,055HDB 0AAH,055H,054H,02AH,0A8H,015H,050H,00AH,0A0H,005H,040H,002H,080H,001H,000H,000HDB 000H,000H,080H,001H,040H,002H,0A0H,005H,050H,00AH,0A8H,015H,054H,02AH,0AAH,055HDB 0A0H,005H,040H,002H,091H,0F9H,000H,000H,074H,0F0H,019H,008H,031H,008H,058H,0F0HDB 014H,000H,

18、011H,0F8H,012H,044H,013H,0FCH,012H,044H,091H,0F9H,040H,002H,0A0H,005HDB 020H,000H,013H,0FEH,010H,000H,0FDH,0FCH,005H,004H,009H,004H,011H,0FCH,030H,000HDB 05BH,0FEH,096H,022H,012H,022H,013H,0FEH,012H,022H,012H,022H,013H,0FEH,012H,002HDB 000H,004H,07FH,0C8H,000H,008H,03FH,0BFH,020H,0A0H,020H,090H,03FH

19、,088H,000H,00CHDB 07FH,0DAH,044H,069H,044H,048H,07FH,0C8H,044H,048H,044H,048H,07FH,0C8H,040H,048HDB 010H,040H,010H,080H,091H,000H,073H,0FFH,014H,080H,018H,040H,040H,0FFH,05EH,092HDB 052H,092H,052H,092H,052H,0FEH,052H,092H,052H,092H,05EH,092H,040H,0FFH,000H,000HDB 012H,002H,013H,0FEH,012H,022H,012H,0

20、22H,013H,0FEH,012H,022H,096H,022H,05BH,0FEHDB 030H,000H,011H,0FCH,009H,004H,005H,004H,0FDH,0FCH,010H,000H,013H,0FEH,020H,000HTAB4:DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0F8H,0FFH,0F8H,0FFH,0C0H,0FFH,0C0HDB 0FEH,000H,0FEH,000H,0F0H,000H,0F0H,007H,0B0H,002H,0C8H,002H,048H,006H,030H,002H;STEP1

21、DB 0FEH,000H,0FEH,000H,0F6H,000H,0F9H,007H,089H,002H,086H,001H,000H,005H,000H,002H;STEP2DB 0FEH,0C0H,0FFH,020H,0F1H,020H,0F0H,0C7H,080H,001H,080H,007H,000H,001H,000H,007H;STEP3DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0F8H,0FFH,0F8H,0FFH,0D8H,0FFH,0E4HDB 0FEH,024H,0FEH,018H,0F0H,000H,0F0H,001H

22、,080H,001H,080H,007H,000H,005H,000H,005H;STEP4DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FBH,0FFH,0FCH,0FFH,0C4H,0FFH,0C3HDB 0FEH,000H,0FEH,000H,0F0H,000H,0F0H,007H,080H,001H,080H,007H,000H,004H,000H,007H;STEP5DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,000H,000H,000H,000H,000H,000HDB

23、 000H,000H,000H,000H,000H,000H,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFHDB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFHDB 000H,000H,0F4H,058H,084H,0D4H,085H,052H,0F5H,052H,085H,052H,086H,054H,0F4H,058HDB 000H,000H,022H,05EH,022H,050H,022H,050H,023H,0DEH,022

24、H,050H,022H,050H,0FAH,05EHEND咕哝了很多天终于成功了,发出来供大家交流,没准儿还能对别人有些帮助,总之百利无一害点阵大小是16*32的。 #include#defineBLKN27F3F8C6A1F7F1F0F7F7F9F5C7F1F1F1F7F7F3F8C6A1F7F1F0F7F7F9F5C7F1F1F1F7F 3f0f3F3F7F0C2C3F7F7F4A4A2C7F0A0A3F7F0C2C3F7F7F4A4A2C3F7F1F7F7F0F0F3F2009年05月10日GI文件的支持运行 */ initgraph(&gd, &gm, );void drawmat(c

25、har *mat,int matsize,int x,int y,int color)/*依次:字模指针、点阵大小、起始坐标(x,y)、颜色*/ int i, j, k, n; n = (matsize - 1) / 8 + 1; for(j = 0; j matsize; j+) for(i = 0; i n; i+) for(k = 0;k k) /*测试为1的位则显示*/ putpixel(x + i * 8 + k, y + j, color);char yi12=/* 以下是 1 的 12点阵宋体 字模,24 byte */0x00,0x00,0x0C,0x00,0x1C,0x00,

26、0x3C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,;char er12=20x00,0x00,0x3E,0x00,0x63,0x00,0x03,0x00,0x06,0x00,0x0C,0x00,0x18,0x00,0x30,0x00,0x63,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,char dian12=点0x04,0x00,0x07,0xC0,0x04,0x00,0x04,0x00,0x3F,0x80,0x20,0x80,0x20,0x80,0x3F,0x80,0x00,0x00,0x49,0x40,0xC9,0x20,0x00,0x00,char zhen12=阵0xF2,0x00,0x9F,0xE0,0x92,0x00,0xA5,0x00,0xA5,0x00,0x97,0xE0,0x91,0x00,0xB1,0x00,0x8F,0xE0,0x81,0x00,0x81,0x00,0x00,0x00,char song16=宋 的 16点阵宋体 字模,32 byte

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1