Professional Documents
Culture Documents
Lecture67 PDF
Lecture67 PDF
The serial data line is enabled when SOE=1. Only then either ‘0’ or ‘1’
can be outputted to SOD pin. The following set of instructions output
the carry bit (may be ‘0’ or ‘1’) to serial output port.
MVI A, 80H
RAR
SIM
In this set of instructions, the serial output line is enabled by
rotating ‘1’ into bit position D6; the instruction SIM output the carry bit
through bit position D7.
As discussed earlier, SIM instruction is a dual purpose
instruction and used both for interrupt mask control and serial
communication. When it is used only for serial communication, MSE
bit is kept ‘0’ so that the interrupts are not affected by this instruction.
Similarly, if interrupt masks are to be changed without affecting the
serial output line, SOE is kept ‘0’.
Instruction RIM is used to input serial data through the SID line.
When RIM instruction is executed it reads the data from serial input
port to the position D7 in accumulator (A) as shown in fig.12.10.
D7 D6 D5 D4 D3 D2 D1 D0
Interrupt Bits
The SID and SOD lines in the 8085 eliminate the need for an input
port and an output port in the software controlled serial I/O.
Externally SID is a 1-bit input port and SOD is 1-bit output port.
Main
Decrement Counter
No Is
Counter = 0
?
Yes
Stop
Decrement Counter
No Is
Counter = 0
?
Yes
Stop
Enter
Setup Bit Counter
Read SID
Wait for One Bit Time
Yes Is
Read SID
SID line HIGH
?
Read SID
Are
Yes
All Bits
Is Received
No
SID line LOW Return ?
? No