Free Electronic Circuits & 8085 projects

Electronic projects with circuit diagram and 8085 microprocessor projects.

Generate square wave from SOD pin

Statement: Write a program to output square wave of 1 kHz frequency on the SOD pinof 8085 for 5 seconds. Operating frequency of 8085 is 2 MHz.

Source program :

  • LXI SP, 27FFH : Initialize stack pointer
  • LXI B, 1388H : Initialize counter with count 5000.
  • BACK: MVI A, COH
  • SIM : Send high on SOD pin
  • CALL DELAY : Wait for 0.5 msec
  • MVI A, 40H : Send low on SOD pin
  • CALL DELAY : wait for. 5 msec
  • DCX B : Decrement count by 1
  • MOV A, C
  • ORA B : Check if count = 0
  • JNZ BACK : If not, repeat
  • HLT : Stop program execution

Delay subroutine:

  • Delay: LXI D, Count
  • Back: DCX D
  • MOV A, D
  • ORA E
  • JNZ Back
  • RET

 

Flowchart for Program

59.a-Generate square wave from SOD pin

Flowchart for Delay routine

58-b.59.bOutput byte from SOD pin

Related Programs (Click down)

Find the 7-segment codes for given numbers

Find the ASCII character

ASCII to Decimal Conversion

HEX to Decimal conversion