Programming For Microcontroller
Programming For Microcontroller
Programming For Microcontroller
MOV TMOD,#01100001B // Sets Timer1 as Mode2 counter & Timer0 as Mode1 timer
DJNZ R6,BACK
ACALL DELAY
ACALL DELAY
MOV A,B
MOV B,#10D
MOV P0,A
ACALL DELAY
ACALL DELAY
ACALL DELAY
CLR P1.2
MOV P0,#11111111B
RET
RET
DISPLAY: MOVC A,@A+DPTR // gets 7seg digit drive pattern for current value in A
CPL A
RET
DB 06H
DB 5BH
DB 4FH
DB 66H
DB 6DH
DB 7DH
DB 07H
DB 7FH
DB 6FH
END