Free Electronic Circuits & 8085 projects

Electronic projects with circuit diagram and 8085 microprocessor projects.

Find the 7-segment codes for given numbers

Published on Nov 18 2009 // Code conversion

Statement: Write a main program and a conversion subroutine to convert the binary number stored at 6000H into its equivalent BCD number. Store the result from memory location 6100H.

Sample problem :

(6000) H = 8AH

Source program :

  • LXI H, 6200H : Initialize lookup table pointer
  • LXI D, 6000H : Initialize source memory pointer
  • LXI B, 7000H : Initialize destination memory pointer
  • BACK: LDAX D : Get the number
  • MOV L, A : A point to the 7-segment code
  • MOV A, M : Get the 7-segment code
  • STAX B : Store the result at destination memory location
  • INX D : Increment source memory pointer
  • INX B : Increment destination memory pointer
  • MOV A, C
  • CPI O5H : Check for last number
  • JNZ BACK : If not repeat
  • HLT : End of program

Flowchart for program

56-Find the 7-segment codes for given numbers

Related Programs for Beginners: (Click down)

Program to test RAM

Program to generate Fibonacci number

Generate a delay of 0.4 seconds

Arrange in Descending Order