找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5872|回复: 0
打印 上一主题 下一主题
收起左侧

16*16动态点阵程序-汇编语言

[复制链接]
跳转到指定楼层
楼主
ID:70976 发表于 2014-12-26 23:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. LJMP MAIN;

  2. ORG 0030H;

  3. MAIN:

  4. MOV R1,#00H;选择数据指针入口标志

  5. MOV R2,#10H;列选线

  6. MOV R5,#00H;寻字节显示

  7. MOV R3,#00H;R3用于记录某一静态状态重复扫描次数,若到了100,则向右移动一位格。

  8. MOV R4,#00H;R4用于记录移动的格数,这里R4暂时只能在0-255之间变化。

  9. MOV DPTR,#MING;

  10. DISPLAY:DEC R2;

  11. MOV P1,R2;列选线

  12. CJNE R2,#000H,LOOP1;

  13. MOV R2,#010H;

  14. ;MOV R5,#00H;放在这里文字会有重影

  15. LOOP1:MOV A,R5;

  16. ADD A,R4;************************************这样最多只能显示8个文字,因为A只有8位。

  17. ADD A,R4;************************************

  18. MOVC A,@A+DPTR;

  19. MOV P0,A;

  20. INC R5;

  21. MOV A,R5;

  22. ADD A,R4;************************************

  23. ADD A,R4;************************************

  24. MOVC A,@A+DPTR;

  25. MOV P2,A;

  26. INC R5;



  27. CJNE R2,#010H,LOOP2;

  28. MOV R5,#00H;



  29. LOOP2:INC R3;**************************************

  30. CJNE R3,#0005H,LOOP0;调节R3的最大值可以改变文字滚动速度。

  31. INC R4;

  32. CJNE R4,#070H,LOOP0;这里的#10H是代表存的文字个数,两个文字的话就是#20H,实际上就是一个字移动16格。

  33. MOV R4,#00H;

  34. INC R1;

  35. CJNE R1,#01H,LOOP5;

  36. MOV DPTR,#MING;

  37. LJMP LOOP0;

  38. LOOP5:CJNE R1,#02H,LOOP6;

  39. MOV DPTR,#Q;

  40. LJMP LOOP0;

  41. LOOP6:CJNE R1,#03H,LOOP0;

  42. MOV DPTR,#Q2;

  43. MOV R1,#00H;



  44. LOOP0:LCALL DELAY;

  45. LJMP DISPLAY;



  46. DELAY:MOV R6,#090H;调节R6的值也可以改变文字滚动速度

  47. DJNZ R6,$;

  48. RET;



  49. MING:

  50. ;空格

  51. DB 000H,000H,000H,000H,000H,000H,000H,000H

  52. DB 000H,000H,000H,000H,000H,000H,000H,000H

  53. DB 000H,000H,000H,000H,000H,000H,000H,000H

  54. DB 000H,000H,000H,000H,000H,000H,000H,000H



  55. ;*****************************************************************

  56. ;欢   CBBB6

  57. DB 028H,004H,024H,008H,022H,032H,021H,0C2H

  58. DB 026H,0C2H,038H,034H,004H,004H,018H,008H

  59. DB 0F0H,030H,017H,0C0H,010H,060H,010H,018H

  60. DB 014H,00CH,018H,006H,010H,004H,000H,000H



  61. ;迎   CD3AD

  62. DB 002H,002H,082H,004H,073H,0F8H,020H,004H

  63. DB 000H,002H,03FH,0E2H,020H,042H,040H,082H

  64. DB 040H,002H,03FH,0FAH,020H,002H,020H,042H

  65. DB 020H,022H,03FH,0C2H,000H,002H,000H,000H



  66. ;乘   CB3CB

  67. DB 010H,044H,014H,044H,054H,088H,054H,088H

  68. DB 05FH,0D0H,050H,030H,050H,060H,07FH,0FEH

  69. DB 050H,040H,090H,020H,09FH,0B0H,092H,098H

  70. DB 094H,08CH,034H,088H,011H,080H,000H,000H



  71. ;坐   CD7F8

  72. DB 000H,082H,001H,002H,006H,022H,038H,022H

  73. DB 004H,022H,003H,022H,000H,022H,0FFH,0FEH

  74. DB 000H,0A2H,001H,022H,002H,022H,03CH,022H

  75. DB 002H,022H,001H,002H,000H,002H,000H,000H



  76. ;本   CB1BE

  77. DB 010H,010H,010H,010H,010H,020H,010H,040H

  78. DB 010H,0A0H,013H,020H,01CH,020H,0FFH,0FEH

  79. DB 018H,020H,016H,020H,011H,020H,010H,0C0H

  80. DB 010H,060H,010H,030H,010H,020H,000H,000H



  81. ;车   CB3B5

  82. DB 000H,020H,020H,020H,021H,020H,023H,020H

  83. DB 025H,020H,039H,020H,0E1H,020H,021H,020H

  84. DB 02FH,0FFH,021H,020H,021H,020H,021H,020H

  85. DB 021H,020H,021H,020H,000H,020H,000H,000H

  86. ;!  

  87. DB 000H,000H,000H,000H,01FH,000H,03FH,0ECH

  88. DB 03FH,0ECH,01FH,000H,000H,000H,000H,000H

  89. DB 000H,000H,000H,000H,000H,000H,000H,000H

  90. DB 000H,000H,000H,000H,000H,000H,000H,000H

  91. ;上面8个字

  92. ;下面8个字

  93. Q:

  94. ;请   CC7EB

  95. DB 002H,000H,042H,000H,032H,000H,023H,0FEH

  96. DB 000H,004H,044H,008H,055H,0FFH,055H,050H

  97. DB 055H,050H,0FDH,050H,055H,052H,055H,051H

  98. DB 055H,0FEH,044H,000H,004H,000H,000H,000H



  99. ;携   CD0AF

  100. DB 008H,020H,008H,022H,008H,041H,0FFH,0FFH

  101. DB 009H,000H,008H,001H,03FH,0A2H,0EAH,0ACH

  102. DB 02AH,0B0H,0AAH,0A0H,07FH,0A0H,02AH,0AAH

  103. DB 02AH,0B9H,02AH,0A9H,020H,08EH,000H,000H



  104. ;带   CB4F8

  105. DB 001H,000H,026H,000H,024H,000H,024H,0FCH

  106. DB 0FCH,080H,024H,080H,024H,080H,0FFH,0FFH

  107. DB 024H,080H,024H,088H,024H,084H,0FCH,0F8H

  108. DB 025H,000H,026H,000H,024H,000H,000H,000H



  109. ;好   CBAC3

  110. DB 008H,001H,008H,0C2H,00FH,044H,0F8H,028H

  111. DB 008H,030H,00FH,0CEH,001H,004H,041H,000H

  112. DB 041H,002H,041H,001H,04FH,0FEH,051H,000H

  113. DB 061H,000H,041H,000H,001H,000H,000H,000H



  114. ;随   CCBE6

  115. DB 07FH,0FFH,044H,020H,04AH,010H,071H,0E2H

  116. DB 042H,004H,033H,0F8H,000H,004H,024H,004H

  117. DB 02FH,0FAH,039H,042H,0E9H,052H,029H,04AH

  118. DB 02FH,0F2H,020H,002H,020H,002H,000H,000H



  119. ;身   CC9ED

  120. DB 000H,000H,000H,042H,000H,042H,000H,044H

  121. DB 03FH,0C4H,06AH,048H,0AAH,048H,02AH,050H

  122. DB 02AH,050H,02AH,062H,02AH,061H,03FH,0FEH

  123. DB 000H,0C0H,007H,040H,002H,040H,000H,000H



  124. ;物   CCEEF

  125. DB 002H,020H,03CH,020H,008H,040H,0FFH,0FEH

  126. DB 008H,080H,00BH,022H,004H,044H,018H,088H

  127. DB 0F3H,010H,01CH,020H,010H,0C2H,01FH,001H

  128. DB 010H,002H,01FH,0FCH,000H,000H,000H,000H



  129. ;品   CC6B7

  130. DB 000H,000H,000H,0FEH,000H,084H,000H,084H

  131. DB 07EH,084H,044H,084H,044H,0FEH,044H,000H

  132. DB 044H,0FEH,044H,084H,044H,084H,07EH,084H

  133. DB 000H,084H,000H,0FEH,000H,000H,000H,000H

  134. Q2:

  135. ;空格

  136. DB 000H,000H,000H,000H,000H,000H,000H,000H

  137. DB 000H,000H,000H,000H,000H,000H,000H,000H

  138. DB 000H,000H,000H,000H,000H,000H,000H,000H

  139. DB 000H,000H,000H,000H,000H,000H,000H,000H

  140. ;欢   CBBB6

  141. DB 028H,004H,024H,008H,022H,032H,021H,0C2H

  142. DB 026H,0C2H,038H,034H,004H,004H,018H,008H

  143. DB 0F0H,030H,017H,0C0H,010H,060H,010H,018H

  144. DB 014H,00CH,018H,006H,010H,004H,000H,000H



  145. ;迎   CD3AD

  146. DB 002H,002H,082H,004H,073H,0F8H,020H,004H

  147. DB 000H,002H,03FH,0E2H,020H,042H,040H,082H

  148. DB 040H,002H,03FH,0FAH,020H,002H,020H,042H

  149. DB 020H,022H,03FH,0C2H,000H,002H,000H,000H



  150. ;下   CCFC2

  151. DB 000H,000H,040H,000H,040H,000H,040H,000H

  152. DB 040H,000H,040H,000H,040H,000H,07FH,0FEH

  153. DB 044H,000H,046H,000H,043H,080H,041H,000H

  154. DB 040H,000H,0C0H,000H,040H,000H,000H,000H



  155. ;次   CB4CE

  156. DB 000H,040H,040H,07AH,038H,0C2H,003H,004H

  157. DB 00CH,004H,032H,008H,00CH,010H,0F0H,020H

  158. DB 010H,0C0H,01FH,080H,010H,060H,010H,010H

  159. DB 014H,00CH,018H,006H,010H,004H,000H,000H



  160. ;乘   CB3CB

  161. DB 010H,044H,014H,044H,054H,088H,054H,088H

  162. DB 05FH,0D0H,050H,030H,050H,060H,07FH,0FEH

  163. DB 050H,040H,090H,020H,09FH,0B0H,092H,098H

  164. DB 094H,08CH,034H,088H,011H,080H,000H,000H



  165. ;坐   CD7F8

  166. DB 000H,082H,001H,002H,006H,022H,038H,022H

  167. DB 004H,022H,003H,022H,000H,022H,0FFH,0FEH

  168. DB 000H,0A2H,001H,022H,002H,022H,03CH,022H

  169. DB 002H,022H,001H,002H,000H,002H,000H,000H

  170. ;

  171. ;!  

  172. DB 000H,000H,000H,000H,01FH,000H,03FH,0ECH

  173. DB 03FH,0ECH,01FH,000H,000H,000H,000H,000H

  174. DB 000H,000H,000H,000H,000H,000H,000H,000H

  175. DB 000H,000H,000H,000H,000H,000H,000H,000H





  176. END
复制代码


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏1 分享淘帖 顶 踩
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表