The 8085 microprocessor can accept and also deliver single bit serial data under some control conditions. i.e., when we pass some control word [Control word is a series of 8bits that controls the processor paramameters] to accumulator and execute some instructions operating on that control word and concerned with the serial data transfer, the task is accomplished based on the control word. To illustrate this more clearly, let us see an example.
First let us consider the serial input data (SID) - fifth pin in the processor IC. The serial input can be acquired by the processor using a instruction RIM(Read Interrupt Mask).
RIM is a multi-purpose instruction. This RIM instruction operates on a control word that is stored in the accumulator (the a register).
[i.e, when RIM is executed, it assumes that the content of the accumulator is a control word. So u must pass the control word in to the accumulator before executing the RIM instruction].
The format of the control word for RIM to operate on is given in the below table:
SID I7 I6 I5 IE 7.5 6.5 5.5
These are bits A7 to A0
SID (A7th bit): Serial Input Data bit (The bit you are giving as a serial input either 0 or 1)
I7,I6,I5 (A6-A4 bits): If set, corresponding interrupts are pending.
IE(A3rd bit): Interrupt Enable (Interrupts are enabled if its 1)
7.5,6.5,5.5(A2-A0 bits): If these bits are set, the corresponding interrupt is masked(disabled).
But for serial input data, the only bit that is useful is A7th bit. So, if SID is one, then the contents of the accumulator becomes [10000000] and if SID is zero, then the contents become[00000000].
Now consider Serial Output Data (SOD): - Fourth pin in the processor IC. But serial output data is made available using the SIM(Set Interrupt Mask) instruction. Same like RIM, SIM is also a multi-purpose instruction. Let us see the control word for the SIM instruction.
SOD SDE DONTCARE R7.5 MSE M7.5 M6.5 M5.5
SOD (A7th bit): Serial Output Data. Bit A7 of the accumulator is available at the SOD pin when SIM is executed. So, when A7 is 1, SOD is 1 and vice versa.
SDE (A6th bit): Serial Data Enable. If this bit is set to one, only then the processor considers the A7th bit. This bit is like ON/OFF switch for SOD.
Let us leave others for now.
So, if we consider a example,
mvi a,C0h (this instruction loads the accmululator with C0h)i.e[11000000] – clearly, the first bit is the SOD and second bit says, accept SOD. Or ON SOD.
SIM (this instruction makes 1 available as SOD.
That’s all for Explaining SOD and SID.
To see this in action, in your 8085 simulator,
For SID action, execute the example program:
The accumulator contents will be 80h and 00h depending on whether SID is 1 or 0.
For SOD action, execute the following program:
After this program is executed, SOD is set to one.
Note: You have to manually set the SID but you have no control over the SOD button in the simulator
Hope this helps and I am clear all the way to the end.