The following figure shows the parallel expansion static display circuit diagram (3 LED static display circuit), the figure compiled display routines, displays the number (≤255) in the presence of the RAM 30H.
Appropriate procedures for:
DIR1: MOV A, 30H; reading shows the number of
DIR1: MOV A, 30H; reading shows the number of
MOV B, # 100; set divisor
DIV AB; produce one hundred display numbers
MOVC A, @ A + DPTR; display character read one hundred
MOV DPTR, # 0DFFFH; set 74 377 (one hundred) address
MOVX @ DPTR, A; output one hundred display character
MOV A, B; reading remainder
MOV B, # 10; divisor set
DIV AB; produce ten display numbers
MOV DPTR, # TAB; set common anode field code table first site
MOVC A, @ A + DPTR; reading ten character display
MOV DPTR, # 0BFFFH; set 74377 (ten) address
MOVX @ DPTR, A; output ten character display
MOV A, B; reading bits display digital
MOV DPTR, # TAB; set common anode field code table first site
MOVC A, @ A + DPTR; reading a bit display characters
MOV DPTR, # 7FFFH; set 74377 (a bit) address
MOVX @ DPTR, A; output bit display characters
RET;
TAB: DB 0C0H, 0F9H, 0A4H, 0B0H, 99H; common anode field code table
DB 92H, 82H, 0F8H, 80H, 90H;
No comments:
Post a Comment
Please comment