Statement:Write a program for displaying BCD down counter. Counter should count numbers from 99 to 00 and it should increment after every 1 sec. Assume operating frequency of 8085 equal to 3MHz. Display routine is available.
Home
8085 Forum
8085 Free Projects
8085 Free Programs
8085 Tutorials
8085 details
Interfacing Techniques
Electronic Tutorials
Electronic Projects
Assembler/ IDE
Datasheets
Guest Book
About Me
Source Program 1:
       
       LXI SP, 27FFH        : Initialize stack pointer
       MVI C, 99H                : Initialize counter = 99
BACK:CALL Display         : Call display subroutine
       CALL Delay                : Call delay subroutine
       ADI 99H                : See Addition below
       DAA                        : Adjust for decimal
       CPI 99H                : Compare with last count
       JNZ BACK                :If no, repeat
       HLT


FLOWCHART




Source Program2:

       LXI SP, 27FFH        : Initialize stack pointer
       MVI C, 99H                : Initialize counter = 99
BACK: CALL Display         : Call display subroutine
       CALL Delay                : Call delay subroutine
       MOV A, C                : Get count
       ANI 0FH                : Check for lower nibble
       JNZ SKIP                : If it is not 0FH go to skip
       MOV A,C                : Else get the count
       SBI ,06                : Subtract 06
       MOV C,A                : Store the count
       DCR C                        : Decrement count
       CPI 99H                : Check it for last count
       JNZ BACK                : If not, repeat
       HLT                        : Stop