cpu板PCB图:
[attach]5144[/attach]
CPU板原理图:
[attach]5145[/attach]
16个汉字显示并左移:
//16个汉字显示并左移
ORG 00H
LJMP START
ORG 030H
START: MOV A,#00H
MOV P0,A
MOV P2,A
MOV 2AH,#00
MOV R3,#200
D1MS: MOV R5,#250
F1: DJNZ R5,F1
DJNZ R3,D1MS
DIS: MOV R2,#01H
MOV 20H,#00
D4: MOV R4,#00H
MOV R1,#0FFH
D5: MOV R6,#128
MOV R0,20H
D2: MOV A,R4
MOV P1,A
MOV A,R0
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P0,A
INC R0
MOV A,R0
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P2,A
INC R0
MOV R3,#50
F10: DJNZ R3,F10
MOV A,#00H
MOV P0,A
MOV P2,A
INC R4
DJNZ R6,D2
MOV R4,#00
DJNZ R1,D5
MOV 20H,R0
DJNZ R2,D4
MOVE3: JB 2AH.0,MOVE00
MOVE1: MOV DPTR,#TABLE
MOV 2AH,#00H
MOVE: MOV 20H,#00
MOV R4,#00
M1: MOV R1,#01FH
M2: MOV R6,#128
MOV R0,20H
M3: MOV A,R4
MOV P1,A
MOV A,R0
MOVC A,@A+DPTR
MOV P0,A
INC R0
MOV A,R0
MOVC A,@A+DPTR
MOV P2,A
INC R0
CJNE R0,#00,MOVE0
JB 2AH.0,MOVE01
MOV DPTR,#TABLE1
MOVE0: MOV R3,#25
DJNZ R3,$
MOV A,#00
MOV P0,A
MOV P2,A
INC R4
DJNZ R6,M3
JB 2AH.0,MOVE02
MOV DPTR,#TABLE
MOVE04: MOV R4,#00
DJNZ R1,M2
MOV A,20H
ADD A,#08
MOV 20H,A
XRL A,#248
JNZ M1
JB 2AH.0,MOVE1
MOV 2AH,#01
JMP MOVE3
MOVE00: MOV DPTR,#TABLE1
JMP MOVE
MOVE01: MOV DPTR,#TABLE
JMP MOVE0
MOVE02: MOV DPTR,#TABLE1
JMP MOVE04
TABLE: DB 40H,00,40H,00,4FH,0FFH,48H,00
DB 49H,10H,48H,88H,48H,00,7FH,0FEH
DB 48H,00,49H,10H,48H,8AH,48H,01
DB 5FH,0FEH,0C8H,00,40H,00,00,00
DB 02,01,42H,01,42H,02,42H,04
DB 42H,08,42H,30H,42H,0C0H,7FH,00
DB 42H,0C0H,42H,30H,42H,08,42H,04
DB 0C2H,02,46H,03,02,02,00,00
DB 00,02,7FH,7EH,42H,02,43H,0FCH
DB 42H,44H,0FEH,44H,48H,80H,10H,0FFH
DB 31H,42H,0EAH,42H,24H,42H,2AH,42H
DB 31H,42H,21H,0FFH,01,40H,00,00
DB 08,20H,86H,20H,40H,7FH,61H,80H
DB 06,00,04,00,0FDH,0FFH,0A5H,50H
DB 0A5H,50H,0BDH,50H,85H,52H,85H,51H
DB 0FDH,0FEH,05,00,06,00,00,00
DB 00,00,00,10H,00,20H,00,40H
DB 01,80H,06,02,00,01,0FFH,0FEH
DB 00,00,04,00,02,00,01,00
DB 00,80H,00,60H,00,00,00,00
DB 00,20H,00,40H,03,80H,00,00
DB 0FH,0FCH,00,02,80H,02,40H,02
DB 38H,02,10H,02,00,02,00,0EH
DB 02,00,01,00,00,0E0H,00,00
DB 02,00,1CH,00,00,00,0FFH,0FFH
DB 10H,00,0BH,0C1H,0FAH,51H,0AAH,5AH
DB 0ABH,0D4H,0AAH,54H,0ABH,0D4H,0AAH,5AH
DB 0FAH,52H,07,0C1H,02,01,00,00
DB 00,40H,08,80H,11H,00,23H,0FFH
DB 0C4H,00,02,00,42H,00,42H,00
DB 42H,00,42H,02,42H,01,43H,0FEH
DB 0C2H,00,46H,00,02,00,00,00
TABLE1B 00,82H,03H,02H,0CH,42H,78H,42H
DB 08H,42H,08H,42H,08H,42H,0FFH,0FEH
DB 08H,42H,08H,42H,08H,42H,08H,0C2H
DB 18H,42H,08H,06H,00,02H,00,00
DB 00,00,00,00,00,00,7FH,0FEH
DB 41H,04H,41H,04H,41H,04H,41H,04H
DB 41H,04H,41H,04H,41H,04H,0FFH,0FEH
DB 40H,00,00,00,00,00,00,00
DB 01H,00,0EH,00,00,00,0FFH,0FFH
DB 08H,41H,04H,42H,08H,44H,08H,58H
DB 0FFH,0E0H,08H,50H,08H,48H,08H,44H
DB 1FH,0C2H,08H,43H,00,42H,00,00
DB 00,00,01H,02H,03H,04H,3DH,08H
DB 21H,30H,21H,02H,21H,01H,2FH,0FEH
DB 41H,00,41H,00,0C1H,20H,41H,10H
DB 01H,0CH,03H,06H,01H,00,00,00
DB 00,02H,00,42H,00,42H,00,44H
DB 3FH,0C4H,2AH,44H,6AH,48H,0AAH,48H
DB 2AH,50H,2AH,62H,2AH,41H,7FH,0FEH
DB 20H,80H,01H,00,02H,00,00,00
DB 02H,00,04H,00,1FH,0FFH,0E0H,10H
DB 08H,60H,09H,80H,0EH,20H,08H,20H
DB 0FFH,0FFH,08H,20H,0EH,20H,09H,80H
DB 18H,60H,08H,30H,00,20H,00,00
DB 02H,00,04H,00,1FH,0FFH,0E0H,22H
DB 11H,94H,12H,98H,1CH,0E4H,08H,92H
DB 2AH,91H,2AH,91H,0FFH,0FFH,2AH,91H
DB 2AH,91H,3EH,0B3H,08H,92H,00,00
DB 00,02H,00,0CH,3FH,0F0H,22H,02H
DB 2AH,0C4H,2AH,0A8H,2AH,92H,0AAH,81H
DB 7FH,0FEH,2AH,0A0H,2AH,90H,2AH,88H
DB 2FH,94H,62H,26H,22H,04H,00,00
END
//一个8汉字连续左移程序:
//8个汉字需用4块显示板
ORG 00H
LJMP START
ORG 030H
START: MOV A,#00H
MOV P0,A
MOV P2,A
MOV R3,#200
D1MS: MOV R5,#250
F1: DJNZ R5,F1
DJNZ R3,D1MS
DIS: MOV R2,#01H
MOV 20H,#00
D4: MOV R4,#00H
MOV R1,#0FFH
D5: MOV R6,#128
MOV R0,20H
D2: MOV A,R4
MOV P1,A
MOV A,R0
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P0,A
INC R0
MOV A,R0
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P2,A
INC R0
MOV R3,#50
F10: DJNZ R3,F10
MOV A,#00H
MOV P0,A
MOV P2,A
INC R4
DJNZ R6,D2
MOV R4,#00
DJNZ R1,D5
MOV 20H,R0
DJNZ R2,D4
MOV R7,#03H
MOVE: MOV 20H,#00
MOV R4,#00
M1: MOV R1,#01FH
M2: MOV R6,#128
MOV R0,20H
M3: MOV A,R4
MOV P1,A
MOV A,R0
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P0,A
INC R0
MOV A,R0
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P2,A
INC R0
MOV R3,#25
DJNZ R3,$
MOV A,#00
MOV P0,A
MOV P2,A
INC R4
DJNZ R6,M3
MOV R4,#00
DJNZ R1,M2
MOV A,20H
ADD A,#08
MOV 20H,A
XRL A,#192
JNZ M1
DJNZ R7,MOVE
JMP DIS
TABLE: DB 40H,00,40H,00,4FH,0FFH,48H,00
DB 49H,10H,48H,88H,48H,00,7FH,0FEH
DB 48H,00,49H,10H,48H,8AH,48H,01
DB 5FH,0FEH,0C8H,00,40H,00,00,00
DB 02,01,42H,01,42H,02,42H,04
DB 42H,08,42H,30H,42H,0C0H,7FH,00
DB 42H,0C0H,42H,30H,42H,08,42H,04
DB 0C2H,02,46H,03,02,02,00,00
DB 00,02,7FH,7EH,42H,02,43H,0FCH
DB 42H,44H,0FEH,44H,48H,80H,10H,0FFH
DB 31H,42H,0EAH,42H,24H,42H,2AH,42H
DB 31H,42H,21H,0FFH,01,40H,00,00
DB 08,20H,86H,20H,40H,7FH,61H,80H
DB 06,00,04,00,0FDH,0FFH,0A5H,50H
DB 0A5H,50H,0BDH,50H,85H,52H,85H,51H
DB 0FDH,0FEH,05,00,06,00,00,00
DB 00,00,00,10H,00,20H,00,40H
DB 01,80H,06,02,00,01,0FFH,0FEH
DB 00,00,04,00,02,00,01,00
DB 00,80H,00,60H,00,00,00,00
DB 00,20H,00,40H,03,80H,00,00
DB 0FH,0FCH,00,02,80H,02,40H,02
DB 38H,02,10H,02,00,02,00,0EH
DB 02,00,01,00,00,0E0H,00,00
DB 02,00,1CH,00,00,00,0FFH,0FFH
DB 10H,00,0BH,0C1H,0FAH,51H,0AAH,5AH
DB 0ABH,0D4H,0AAH,54H,0ABH,0D4H,0AAH,5AH
DB 0FAH,52H,07,0C1H,02,01,00,00
DB 00,40H,08,80H,11H,00,23H,0FFH
DB 0C4H,00,02,00,42H,00,42H,00
DB 42H,00,42H,02,42H,01,43H,0FEH
DB 0C2H,00,46H,00,02,00,00,00
END
4汉字显示程序,“雨天路滑”“小心慢行”轮流显示。
ORG 00H
LJMP START
ORG 030H
START:MOV A,#00H
MOV P0,A
MOV P2,A
MOV R3,#200
D1MS:MOV R5,#250
F1: DJNZ R5,F1
DJNZ R3,D1MS
DIS:MOV R2,#02H ;(分2屏显示)
MOV 20H,#00
D4: MOV R4,#00H
MOV R1,#0FFH
D5: MOV R6,#64 ;(每屏显示4个字)
MOV R0,20H
D2: MOV A,R4
MOV P1,A ;(扫描输出)
MOV A,R0
MOV DPTR,#TABLE ;(指数据表指针)
MOVC A,@A+DPTR ;(取上半部代码 )
MOV P0,A
INC R0
MOV A,R0
MOV DPTR,#TABLE
MOVC A,@A+DPTR ;(取下半部代码)
MOV P2,A
INC R0
MOV R3,#50
F10JNZ R3,F10
MOV A,#00H
MOV P0,A
MOV P2,A
INC R4
DJNZ R6,D2 ;(4个字是否取完)
MOV R4,#00 ;(扫描指针清零)
DJNZ R1,D5 ;(重复显示)
MOV 20H,R0 ;(保存数据代码偏移量)
DJNZ R2,D4 ;(2屏显示是否完成)
MOVE:MOV 20H,#00 ;(偏移量清零)
MOV R4,#00 ;(扫描指针清零)
M1: MOV R1,#0FFH
M2: MOV R6,#64
MOV R0,20H
M3: MOV A,R4
MOV P1,A
MOV A,R0
MOV DPTR,#TABLE
JMP START
TABLE: DB 40H,00,40H,00,4FH,0FFH,48H,00
DB 49H,10H,48H,88H,48H,00,7FH,0FEH ; 雨
DB 48H,00,49H,10H,48H,8AH,48H,01
DB 5FH,0FEH,0C8H,00,40H,00,00,00
DB 02,01,42H,01,42H,02,42H,04
DB 42H,08,42H,30H,42H,0C0H,7FH,00 ; 天
DB 42H,0C0H,42H,30H,42H,08,42H,04
DB 0C2H,02,46H,03,02,02,00,00
DB 00,02,7FH,7EH,42H,02,43H,0FCH
DB 42H,44H,0FEH,44H,48H,80H,10H,0FFH ; 路
DB 31H,42H,0EAH,42H,24H,42H,2AH,42H
DB 31H,42H,21H,0FFH,01,40H,00,00
DB 08,20H,86H,20H,40H,7FH,61H,80H
DB 06,00,04,00,0FDH,0FFH,0A5H,50H ;滑
DB 0A5H,50H,0BDH,50H,85H,52H,85H,51H
DB 0FDH,0FEH,05,00,06,00,00,00
DB 00,00,00,10H,00,20H,00,40H
DB 01,80H,06,02,00,01,0FFH,0FEH ;小
DB 00,00,04,00,02,00,01,00
DB 00,80H,00,60H,00,00,00,00
DB 00,20H,00,40H,03,80H,00,00
DB 0FH,0FCH,00,02,80H,02,40H,02 ;心
DB 38H,02,10H,02,00,02,00,0EH
DB 02,00,01,00,00,0E0H,00,00
DB 02,00,1CH,00,00,00,0FFH,0FFH
DB 10H,00,0BH,0C1H,0FAH,51H,0AAH,5AH
DB 0ABH,0D4H,0AAH,54H,0ABH,0D4H,0AAH,5AH ;慢
DB 0FAH,52H,07,0C1H,02,01,00,00
DB 00,40H,08,80H,11H,00,23H,0FFH
DB 0C4H,00,02,00,42H,00,42H,00
DB 42H,00,42H,02,42H,01,43H,0FEH ;行
DB 0C2H,00,46H,00,02,00,00,00
END
斑竹有没有再深入的研究下大屏的?交流下。
是啊,需要考虑哪些因素?
刷新速度是个大问题。我找找,记得我有一个大型LED点阵屏的文件。找到了就发上来
你好我就是做大屏的可就是不会单片机现正想学呢,PCB我自己会,zcllom版主挺历害还会单片机能给小弟弄一个长6个字高2个字的单片机吗?有尝服务.
[em01]
长6个字高2个字的单片机吗?
===========================
双排显示吗?
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |