Rushdiey
Junior Member level 2
- Joined
- Jan 10, 2013
- Messages
- 24
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,419
Who know how 2 make bcd counter to 7segment led using 825
i manage do 0-9 only
Now i want to do 0-99
Code:
ORG 0000H
PORTA: EQU 80H
PORTB: EQU 81H
PORTC: EQU 82H
CTRL: EQU 83H
MVI A, 10001001B ; Control word setting where Port A AND B = O/P and Port C= I/P.
OUT 83H ; Send control word to control register.
MVI A,00111111B
OUT PORTA
OUT PORTB
MVI B,00H
OUT CTRL
REPEAT: IN PORTC
ANI 00001111B
CPI 00001111B
JNZ CONT
XRA A
OUT PORTA
JMP REPEAT
CONT: LXI H,TABLE
MVI B,0
MOV C,A
DAD B
MOV A,M
OUT PORTA
JMP REPEAT
TABLE: DFB 00111111B,00000110B,01011011B,01001111B,01100110B
DFB 01101101B,01111101B,00000111B,01111111B,01101111B
i manage do 0-9 only
Now i want to do 0-99