16 16点阵显示汉字汇编
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
ORG 0000H
LJMP START
ORG 000BH
LJMP TIMER0
ORG 0030H
START: MOV SCON,#00H ;串口0方式传送显示字节;MOV R5,#10
MOV R0,#00H
MOV R1,#00H
MOV R3,#00H
MOV TMOD,#01H
MOV TH0,#00H
MOV TL0,#00H
SETB EA
SETB ET0
START1: CJNE R1,#00H,S0
MOV DPTR,#TAB0
S0: CJNE R1,#01H,S1
MOV DPTR,#TAB1
S1: CJNE R1,#02H,S2
MOV DPTR,#TAB2
S2: CJNE R1,#03H,START2
MOV DPTR,#TAB3
START2: MOV R2,#00H
DIS: MOV P1,R2
MOV R0,#02H
DD: CLR A
MOVC A,@A+DPTR
MOV SBUF,A
WAIT: JNB TI,WAIT
CLR TI
INC DPTR
DJNZ R0,DD
CLR P1.6
SETB P1.6 ;STcp上升沿,将寄存器中的数据传出
;SJMP $
LCALL DELAY
INC R2
SETB P1.7
CLR P1.7
CJNE R2,#10H,DIS
INC R3
CJNE R3,#10H,START1
MOV R3,#00H
SETB P1.7
LCALL DELAY1
;DJNZ R5,START1 ;一个字闪烁一会
;MOV R5,#10
SETB P1.7
SETB F0
SETB TR0
CJNE R0,#08H,$ ;利用定时器黑屏一会
MOV R0,#00H
CLR TR0
CLR P1.7
INC R1
CJNE R1,#04H,S3
MOV R1,#00H
S3: LJMP START1
DELAY:
MOV R6,#0AH
LOOP: MOV R7,#09FH ;1μs
DJNZ R7,$ ;2×256μs
DJNZ R6,LOOP ;1μs× (1+2×256+1)×10
RET
DELAY1:
MOV R6,#0AFH
LOOP1: MOV R7,#0AFH ;1μs
DJNZ R7,$ ;2×256μs
DJNZ R6,LOOP1 ;1μs× (1+2×256+1)×10
RET
TIMER0: MOV TH0,#00H
MOV TL0,#00H
INC R0
RETI
TAB0: DB 01H,00H,01H,00H,01H,00H,01H,00H,01H,00H,21H,04H,21H,04H,21H,04H DB 21H,04H,21H,04H,21H,04H,21H,04H,21H,04H,7FH,0FCH,20H,04H,00H,00H ;山
TAB1: DB 10H,04H,10H,84H,10H,84H,10H,84H,10H,84H,10H,84H,10H,84H,10H,84H DB 10H,84H,10H,84H,10H,84H,10H,84H,10H,84H,20H,84H,20H,04H,40H,00H ;川TAB2: DB 20H,00H,17H,0FEH,10H,08H,00H,08H,88H,08H,4BH,0C8H,52H,48H,12H,48H DB 22H,48H,23H,0C8H,0E2H,48H,20H,08H,20H,08H,20H,08H,20H,28H,20H,10H ;河
TAB3: DB 20H,80H,10H,40H,17H,0FEH,00H,40H,80H,80H,49H,10H,4BH,0F8H,10H,08H DB 12H,50H,12H,50H,0E2H,50H,22H,50H,24H,52H,24H,52H,28H,4EH,20H,00H ;流
END