版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、一、设计题目点阵滚动广告牌二、设计内容 1利用单片机I/O口或以扩展锁存器的方式控制点阵显示。 2掌握单片机与16×16点阵块之间接口电路设计及编程。 3利用实验系统16×16点阵实验单元,要求编制程序实现汉字点阵从下倒上滚动循环显示。三、设计原理及方案1、硬件设计原理图实验线路连接:1对于后缀名含有“H2用一8芯扁平电缆把点阵单元总线接口与系统单元总线D0D7任一接口相连。3用一根双头实验线把点阵单元的片选信号CS插孔与译码输出插孔Y0相连。4用一根双头实验线把点阵单元的写信号WR插孔与系统控制信号插孔WR相连。硬件电路图: 2、软件设计流程图四、设计方案源程序 CODE
2、 SEGMENT ASSUME CS:CODE,DS:CODE,ES:CODE ORG 3AD2H;=HE14: JMP STARTLED0 equ 0ffe3h ;列代码高段(字形)高八位接口地址LED1 equ 0ffe0h ;列代码低段(字形)低位接口地址JED0 equ 0ffe2h ;行扫描高段(字位)高八位接口地址JED1 equ 0ffe1h ;行扫描低段(字位)低八位接口地址;=START: JMP XB13;=x01a: mov BUF+2,00h ;清列值x023: mov bx,OFFSET BUF ;取列值 mov al,02h xlat cmp al,10h ;减16
3、(十进制数) jc x0d2 ;末满16列继续扫描下一列 ret ;本次扫描完毕返回主程序x0d2: MOV dx,0002H MOV ah,00h MUL dx ;当前列乘02 mov cx,ax call xb1f ;= 送扫描代码 = mov dx,led0 ;列代码送高八位锁存器 OUT DX,AL MOV DX,led1 ;列代码送低八位锁存器 mov al,ah OUT DX,Al ;= 取行代码 = mov bx,offset buf mov al,02h xlat inc al mov BUF+2,al ;列指针加1 mov ah,00h mov cx,ax mov al,01
4、h jmp x083x07e: SAL ax,1x083: loop x07e mov dx,jed0 ;行代码送高八位锁存器 OUT DX,AL MOV DX,jed1 ;行代码送低八位锁存器 mov al,ah OUT DX,Al mov cx,0040h ;当前行锁定显示250u秒 loop $ mov al,00h ;关闭显示 mov dx,jed0 out dx,al mov dx,jed1 OUT dx,al jmp x023 ;继续下1行;=x097: mov al,00h ;关闭显示 mov dx,jed0 out dx,al mov dx,jed1 OUT dx,al ;=x
5、0a0: mov al,00h ;清扫描个数存放器 mov BUF+3,al ;从第一个开始x0a2: mov bx,OFFSET buf ;取当前扫描个数 mov al,03h xlat cmp al,16h ;减16(十进制数) jnc x0a0 ;满16个返回从第一个开始 ;= MOV ah,00H mov dx,0020h mul dx mov bx,OFFSET stls add ax,bX mov BUF,aL MOV BUF+1,AH ;= mov al,00h ;清扫描次数存放器 mov BUF+4,alx0bd: mov bx,OFFSET buf ;取当前扫描个数 mov
6、al,04h xlat cmp al,64h ;减64(十进制数) jnc x0cf ;= call x01a ;扫描显示当前字体 ;= mov bx,OFFSET buf ;扫描次数加1 mov al,04h xlat inc al mov BUF+4,al jmp x0bd ;=x0cf: mov bx,OFFSET BUF ;扫描个数加1 mov al,03h xlat inc al mov BUF+3,al jmp x0a2;=STLS:;欢 DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00
7、H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,80H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00HDB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,80H,00H,80H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00HDB 00H,00H,00H,00H,00H,00H,00H,00H,00H,
8、00H,00H,80H,00H,80H,0FCH,80H DB DB00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00H,00H,00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,0
9、4H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H,28H,40H DB 00H,00H,00H,00H,00H,00
10、H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H DB 00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H,28H,40H,28H,40H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,80H DB 00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H,28H,40H,28H,40H,10H,40H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00
11、H,80H,00H,80H DB 0FCH,80H,04H,0FCH,45H,04H,46H,48H,28H,40H,28H,40H,10H,40H,28H,40H DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H DB 04H,0FCH,45H,04H,46H,48H,28H,40H,28H,40H,10H,40H,28H,40H,24H,0A0H DB 00H,00H,00H,00H,00H,00H,00H,00H, 00H,80H,00H,80H,0FCH,80H,04H,0FCH DB 45H,04H
12、,46H,48H,28H,40H,28H,40H,10H,40H,28H,40H,24H,0A0H,44H,0A0H DB 00H,00H,00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H DB 46H,48H,28H,40H,28H,40H,10H,40H,28H,40H,24H,0A0H,44H,0A0H,81H,10H DB 00H,00H,00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H DB 28H,40H,28H,40H,10H,40H,28H,40H
13、,24H,0A0H,44H,0A0H,81H,10H,01H,08H DB 00H,00H,00H,80H,00H,80H,0FCH,80H,04H,0FCH,45H,04H,46H,48H,28H,40H DB 28H,40H,10H,40H,28H,40H,24H,0A0H,44H,0A0H,81H,10H,01H,08H,02H,0EH ;迎 DB 00H,00H,41H,84H,26H,7EH,14H,44H,04H,44H,04H,44H,0F4H,44H,14H,0C4H DB 15H,44H,16H,54H,14H,48H,10H,40H,10H,40H,28H,46H,47H,
14、0FCH,00H,00H;光 DB 01H,00H,21H,08H,11H,0CH,09H,10H,09H,20H,01H,04H,0FFH,0FEH,04H,40H DB 04H,40H,04H,40H,04H,40H,08H,40H,08H,42H,10H,42H,20H,3EH,40H,00H;临 DB 10H,80H,10H,80H,51H,04H,51H,0FEH,52H,00H,54H,80H,58H,60H,50H,24H DB 57H,0FEH,54H,44H,54H,44H,54H,44H,54H,44H,14H,44H,17H,0FCH,14H,04H ;嘉 DB 01H,
15、08H,7FH,0FCH,01H,00H,3FH,0F8H,00H,00H,1FH,0F0H,10H,10H,1FH,0F0H DB 04H,44H,0FFH,0FEH,10H,08H,7EH,0FCH,12H,88H,12H,88H,2AH,0F8H,44H,88H;兴 DB 02H,00H,02H,08H,21H,08H,11H,10H,19H,10H,09H,20H,00H,20H,00H,44H DB 0FFH,0FEH,00H,00H,00H,00H,04H,40H,0CH,20H,10H,18H,20H,0CH,40H,04H;学 DB 22H,08H,11H,08H,11H,10
16、H,00H,20H,7FH,0FEH,40H,02H,80H,04H,1FH,0E0H DB 00H,40H,01H,84H,0FFH,0FEH,01H,00H,01H,00H,01H,00H,05H,00H,02H,00H;院 DB 00H,80H,78H,40H,4FH,0FEH,54H,02H,58H,14H,63H,0F8H,50H,00H,48H,08H DB 4FH,0FCH,48H,0A0H,68H,0A0H,50H,0A0H,41H,22H,41H,22H,42H,1EH,4CH,00H;! DB 00H,00H,00H,00H,00H,00H,00H,00H,10H,00H,
17、10H,00H,10H,00H,10H,00H DB 10H,00H,10H,00H,10H,00H,10H,00H,10H,00H,00H,00H,10H,00H,00H,00H;=xb13: MOV CX,0000H MOV AX,0000H MOV BX,OFFSET STLS ;取汉字表首址 MOV AX,BX MOV BUF,AL MOV BUF+1,AH ;存汉字表指针单元 JMP X097;=取与当前列对应的汉字代码=XB1F: MOV BX,OFFSET BUF ;取当前汉字首址 MOV AX,BX ADD AX,CX ;当前汉字首址加列值 MOV BX,AX MOV AX,B
18、X ;取当前列扫描代码 ;= MOV Bl,00H MOV Cl,Al ROL CL,1 JNC XB_0 OR BL,01hXB_0: ROL CL,1 JNC XB_2 or bl,02hXB_2: ROL CL,1 JNC XB_3 or bl,04hXB_3: ROL CL,1 JNC XB_4 or bl,08hXB_4: ROL CL,1 JNC XB_5 or bl,10hXB_5: ROL CL,1 JNC XB_6 or bl,20hXB_6: ROL CL,1 JNC XB_7 or bl,40hXB_7: ROL CL,1 JNC XB_8 or bl,80hXB_8:
19、mov al,bl ret;=BUF DB ?,?,?,?,?,?CODE ENDS END HE14五、设计实施结果当实验程序装载完毕,实验运行时,“欢送光临嘉兴学院字样在点阵显示模块上从下向上移动,并循环显示。六、总结以前我学习汇编语言时感觉很有难度。当知道要做课程设计的时候心里面感觉有些害怕和担忧, 担忧自己不会或者做不好。但是当真的要做的时候也只好进自己作大的努力去做。我在这个过程中有很多自己的感受,那就是感觉汇编语言真的是很神奇,街上的滚动广告牌我自己竟也能设计出来。我们从开始的担忧和害怕渐渐变成了享受,看着自己做出来的东西,心里面的感觉真的很好。虽然我们做的东西都还很简单,但是毕竟是我们自
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 幕墙系统干挂石材施工方案
- IT项目管理实施方案与最佳实践
- 2024年生活饮用水处理设备项目评价分析报告
- 2024-2030年中国仓储物流行业发展模式及投资规划分析报告
- 2024-2030年中国食品安全检测仪器行业前景趋势与投资预测分析研究报告
- 2024年企业碳中和解决方案合同
- 自建房购房合同模板
- 网站策划合同范本示例
- 招标文件方案设计标准
- 小学劳动教育课方案
- 高校实验室安全通识课学习通超星期末考试答案章节答案2024年
- 2024年秋季新人教版七年级上册生物全册教案设计
- 第15课 两次鸦片战争 教学设计 高中历史统编版(2019)必修中外历史纲要上册+
- 期末知识点复习 2024-2025学年统编版语文九年级上册
- 《江苏省一年级上学期数学第二单元试卷》
- 2024-2025学年度第一学期七年级语文课内阅读练习含答案
- 幼儿园三年发展规划(2024年-2026年)
- 上海市普通高中学业水平合格性考试地理基础知识点复习提纲
- 2024年艾滋病知识题库
- 废旧风机叶片循环利用项目可行性研究报告-积极稳妥推进碳达峰碳中和
- 投标项目进度计划
评论
0/150
提交评论