Free Electronic Circuits & 8085 projects

Electronic projects with circuit diagram and 8085 microprocessor projects.

Receive ASCII character through SID pin

Statement: An ASCII character is being received on SID pin of 8085. Write a program in assembly language of 8085 to assemble this character and store it in memory. Write comment for each instruction.

Source program :

  • LXI SP, 27FFH
  • LXI H, 2000H : Memory pointer
  • RIM : Read SID
  • ANI 80H : Check D7 bit of Accumulator
  • CALL Delay : 1/2 bit time delay for stop bit
  • MVI B, 08H : Initialize bit counter
  • MVI D, 00H : Clear data register
  • UP1: ALL Delay : 1 bit time
  • RIM : Read SID line
  • ANI 80H : Mask bits B6 – Bo
  • ORA D : OR data bit with previous bits
  • RRC
  • MOV D, A : Store data bit at appropriate position
  • DCR B
  • JNZ UP1
  • RLC : Shift left to correct result
  • MOV M, A : Store result
  • RIM : Read stop bit
  • ANI 8OH
  • CZ error : If not stop bit call error
  • HLT : Terminate program.

Delay subroutine:

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

 

Flowchart for Program

60.a-Receive ASCII character through SID pin

Flowchart for Delay routine

58.59.60.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