3.12 16*16 LED中文字幕移动实验
3.12.1 实验目的
了解中文字符的读取,点阵显示器的显示原理等。
3.12.2 实验设备
(1) PC机一台;
(2) QTH-8086B 16位微机教学实验仪一套。
3.12.3 实验说明
16*16点阵LED是由4个8*8的点阵组成的,其内部每一行8个发光二极管的阴极连在一起,每一列的阳极也连在一起,要使某一点亮,只要使该点所在的行为低电平,所在列为高电平就可以了。本实验中列由4-16译码器控制,行由74LS273控制,动态度扫描各列,扫描述到的列给与对应的码子,循环下去就使各列显示出想要点亮的点,4个LED拼在一起就成一个字符了。
3.12.4 实验内容
循环移动显示“欢迎使用启东市微机应用研究所开发的QTH系列产品”。
3.12.5 实验原理图
图3-12-1 16*16LED电路
3.12.6 实验步骤
(1) 实验连线:
LS273模块的WR、RD分别连到MCU主模块的WR、RD。
LS273模块的数据(AD016进制字符串转16进制数组~AD7)、地址线(A0~A7)分别连到MCU主模块的数据(AD0~AD7)、地址线(A0~A7)。LS273模块选通线CS连到MCU主模块的地址A15。
点阵模块选通线CS1连到MCU主模块的地址A14、CS2连到MCU主模块的地址A13;WR连到MCU主模块的WR。
点阵模块数据线(D0~D7、D8~D15)连到MCU主模块的数据(AD0~AD7)。
点阵模块八线插座CZ3连到LS273模块的Q0~Q3即A0—Q0,A1—Q1,A2—Q2,A3—Q3。
(2) 运行程序:LED88.ASM
(3) 观察点阵LED显示的滚动显示“欢迎使用启东市微机应用研究所开发的QTH系列产品”。
图3-12-2 LED中文字幕移动实验连线
附: 点阵式LED 显示实验程序
移动显示“欢迎使用启东市微机应用研究所开发的QTH系列产品”
PAGE 60,132
.MODEL small
.STACK 20H
.DATA
LS273 EQU 7000H ;A15
LEDCS1 EQU 0B000H ;A14
LEDCS2 EQU 0D000H ;A13
DELAY_SET EQU 100H ;延时常数
LY DB ? ;显示器位选信号
.CODE
ORG 0100H
START: MOV SP,9000H
MOV BX,OFFSET TAB
MOV DI,BX
MOV CX,03H
S1: MOV BX,DI
CALL DISP1
LOOP S1
MOV CX,03H
MOV BX,DI
INC BX
INC BX
MOV DI,BX
JMP S1
DISP1: MOV LY,00H ;列号
DISP2:
MOV AX,[BX] ;取数据
CMP AX,0FFFFH
JNZ DISP3
JMP START
DISP3: CALL SENDLY ;送列号
CALL SEND2 ;1-8行
CALL SEND1
CALL DELAY
MOV AX,0000H ;关闭显示
CALL SEND2
CALL SEND1
INC LY
CMP LY,10H
JNZ DISP4
RET
DISP4: INC BX
INC BX
JMP DISP2
SEND1: PUSH CX
MOV AL,AH
NOT AL
MOV DX,LEDCS1
OUT DX,AL
POP CX
RET
SEND2: PUSH CX
NOT AL
MOV DX,LEDCS2
OUT DX,AL
POP CX
RET
DELAY: PUSH CX
MOV CX,DELAY_SET
LOOP $
POP CX
RET
SENDLY: PUSH DX
PUSH AX
MOV DX,LS273
MOV AL,LY
OUT DX,AL ;送列号
POP AX
POP DX
RET
TAB:
DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H
DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H
DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H
DB 00H,00H,00H,00H
;欢 CBBB6
DB 020H,014H,010H,024H,04CH,044H,043H,084H
DB 043H,064H,02CH,01CH,020H,020H,010H,018H
DB 00CH,00FH,003H,0E8H,006H,008H,018H,008H
DB 030H,028H,060H,018H,020H,008H,000H,000H
;迎 CD3AD
DB 040H,040H,020H,041H,01FH,0CEH,020H,004H
DB 040H,000H,047H,0FCH,042H,004H,041H,002H
DB 040H,002H,05FH,0FCH,040H,004H,042H,004H
DB 044H,004H,043H,0FCH,040H,000H,000H,000H
;使 CCAB9
DB 000H,040H,000H,020H,07FH,0F0H,000H,01CH
DB 040H,007H,041H,0F2H,022H,094H,014H,094H
DB 00CH,094H,013H,0FFH,010H,094H,030H,094H
DB 020H,094H,061H,0F4H,020H,004H,000H,000H
;用 CD3C3
DB 080H,000H,040H,000H,030H,000H,00FH,0FEH
DB 002H,022H,002H,022H,002H,022H,002H,022H
DB 0FFH,0FEH,002H,022H,002H,022H,042H,022H
DB 082H,022H,07FH,0FEH,000H,000H,000H,000H
;启 CC6F4
DB 040H,000H,020H,000H,018H,000H,007H,0F8H
DB 000H,048H,07EH,048H,022H,048H,022H,049H
DB 022H,04EH,022H,04AH,022H,048H,022H,048H
DB 022H,048H,07EH,078H,000H,000H,000H,000H
;东 CB6AB
DB 000H,000H,000H,004H,020H,004H,018H,0C4H
DB 00EH,0B4H,004H,08CH,020H,087H,040H,084H
DB 0FFH,0F4H,000H,084H,002H,084H,004H,084H
DB 018H,084H,030H,004H,000H,000H,000H,000H
;市 CCAD0
DB 000H,004H,000H,004H,000H,004H,03FH,0E4H
DB 000H,024H,000H,024H,000H,025H,0FFH,0FEH
DB 000H,024H,000H,024H,010H,024H,020H,024H
DB 01FH,0E4H,000H,004H,000H,004H,000H,000H
;微 CCEA2
DB 001H,010H,000H,088H,0FFH,0F7H,040H,022H
DB 020H,05CH,01FH,050H,001H,05FH,001H,050H
DB 0BFH,05CH,050H,020H,021H,0F8H,016H,017H
DB 008H,012H,0F7H,0F0H,040H,010H,000H,000H
;机 CBBFA
DB 004H,008H,003H,008H,000H,0C8H,0FFH,0FEH
DB 000H,048H,041H,088H,030H,008H,00CH,000H
DB 003H,0FEH,000H,002H,000H,002H,000H,002H
DB 03FH,0FEH,040H,000H,078H,000H,000H,000H
;应 CD3A6
DB 040H,000H,038H,000H,007H,0FCH,020H,044H
DB 020H,084H,02FH,004H,024H,014H,020H,025H
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论