NOTE: When initializing the external modules set these settings
NON Multiplexed, green or red, common cathode, BCD.
Port line selections:
Number digits -2,
Control line and port line:
CONNECT PORT1.0 TO 1.4 BITS TO DIGIT2 AND PORT 1.4 TO 1.7 TO DIGIT1
$MOD51
ORG 0000H
SJMP MAIN
ORG 0030H
MAIN: MOV A,#00H
AGAIN:MOV P 1,A
LCALL DELAY
ADD A,#01
DA A
SJMP AGAIN
;DELAY ROUTINE
ORG 0040H
DELAY: MOV R2,#0FFH
UP1: MOV R1,#0FFH
UP2: NOP
NOP
NOP
DJNZ R1,UP2
DJNZ R2,UP1
RET
END
No comments:
Post a Comment