Display dot matrix is basically a composition of several LEDs are arranged to form matrix row by row and column that varies according to type. Technique using a dot matrix display can be controlled with multiplexing techniques. Where there is a separate control path between the control columns and rows of the dot matrix display. Dot matrix display can be used to create the look of the characters according to our wishes. Before I discuss on how to create characters in the dot matrix display, I will discuss how to make scrolling dot matrix display first. Here will be made a bar chart with columns in rolling turns. Ports that are used in micro namely Port 0 for cathode dot matrix, while the Port 1 on the anode dot matrix.
Schematic circuit:
Schematic Scrolling Dot Matrix 8x8
Source Code:
ORG 0h
START:
NOP
MOV R3, # 3
LOP2:
MOV R4, # 8
MOV R2, # 0
LOP1:
MOV P1, # 0FFH
MOV DPTR, # Taba
MOV A, R2
MOVC A, @ A + DPTR
MOV P0, A
INC R2
LCALL DELAY
DJNZ R4, LOP1
DJNZ R3, LOP2
MOV R3, # 3
LOP4:
MOV R4, # 8
MOV R2, # 7
LOP3:
MOV P1, # 0FFH
MOV DPTR, # Taba
MOV A, R2
MOVC A, @ A + DPTR
MOV P0, A
DEC R2
LCALL DELAY
DJNZ R4, LOP3
DJNZ R3, LOP4
MOV R3, # 3
LOP6:
MOV R4, # 8
MOV R2, # 0
LOP5:
MOV P0, # 00H
MOV DPTR, # TABB
MOV A, R2
MOVC A, @ A + DPTR
MOV P1, A
INC R2
LCALL DELAY
DJNZ R4, LOP5
DJNZ R3, LOP6
MOV R3, # 3
LOP8:
MOV R4, # 8
MOV R2, # 7
LOP7:
MOV P0, # 00H
MOV DPTR, # TABB
MOV A, R2
MOVC A, @ A + DPTR
MOV P1, A
DEC R2
LCALL DELAY
DJNZ R4, LOP7
DJNZ R3, LOP8
LJMP START
DELAY:
MOV R5, # 10
DELAY2:
MOV R6, # 20
DELAY1:
MOV R7, # 248
DJNZ R7, $
DJNZ R6, DELAY1
DJNZ R5, DELAY2
RET
Taba: DB 0FEH, 0FDH, 0FBH, 0F7H, 0EFH, 0DFH, 0BFH, 07FH
TABB: DB 01h, 02H, 04H, 08H, 10H, 20h, 40H, 80h
END
* Schematic created by the author using Proteus 7.5 SP4, and Source Code to be made using the Mide-51. For those who do not have to download the link below.
0 comments:
Posting Komentar