Digital Logic & Microprocessor — Microprocessor System, NEC licence examination syllabus (Nepal Engineering Council).
Serial Interfaces: sending a byte down one wire
Eight bits, one at a time, and both ends must agree on when each bit starts.
Parallel transfer needs one wire per bit. Serial needs one wire total — which is why every cable that leaves your computer is serial. The difficulty is purely one of agreement: the receiver sees only a voltage changing over time, so it must know exactly when to sample to recover the original bits. Everything about serial protocols exists to solve that timing problem.
Serial versus parallel
PARALLEL
· n wires for n bits, all arriving together
· Fast for short distances
· Problem: SKEW — traces of different lengths make bits
arrive at slightly different times. Worse as speed
rises and distance grows.
· Problem: CROSSTALK between adjacent wires
· Expensive cables and connectors
SERIAL
· 1 wire (plus ground) — cheap cables, few pins
· No skew: there is only one path
· Can run at very high bit rates precisely because
there is no skew to worry about
· Needs shift registers and timing recovery at each end
Modern high-speed links (USB, SATA, PCIe, Ethernet) are ALL
serial. Parallel buses lost, despite the obvious n× width
advantage, because skew capped their clock rate.
Bit rate versus baud rate
BIT RATE = bits transmitted per second (bps)
BAUD RATE = signal changes (symbols) per second
They are EQUAL only when each symbol carries exactly 1 bit.
If a modulation scheme encodes 2 bits per symbol:
bit rate = 2 × baud rate
Example: 2400 baud with 4 bits/symbol → 9600 bps
Effective data rate must also account for framing:
9600 bps with 1 start + 8 data + 1 stop
= 8 useful bits per 10 transmitted
= 7680 bps of actual data (80% efficiency)
"9600 baud" is almost always used loosely to mean 9600 bits per second, and for simple systems they coincide. But they are different quantities, and an exam asking you to distinguish them wants: baud counts symbol changes, bit rate counts bits, and they differ whenever a symbol carries more than one bit.
The 8085's on-chip serial pins
The 8085 has minimal built-in serial support:
SOD (Serial Output Data) — one output pin
SID (Serial Input Data) — one input pin
Controlled by two instructions:
SIM — Set Interrupt Mask (also writes SOD)
RIM — Read Interrupt Mask (also reads SID)
SIM accumulator format for serial output:
bit 7 (SOD) = the data bit to send
bit 6 (SDE) = Serial Data Enable (must be 1)
RIM: bit 7 of the accumulator = the value on SID
This is BIT-BANGING — software must generate every bit and
every delay. For real serial work you'd add an 8251 USART,
which handles framing and timing in hardware.
Worked numerical 1 — bit-banged serial output
Write 8085 code to transmit the byte in register B serially on SOD, LSB first.
MVI C, 08H ; 8 bits to send
MOV A, B ; the data byte
TXLOOP: RAR ; rotate right through carry
; → LSB now in the CY flag
MOV D, A ; save the shifted data
MVI A, 00H
RAL ; move CY into bit 0 of A
RAL ; keep shifting left…
RAL ; …until the data bit reaches
RAL ; …
RAL ; …
RAL ; …
RAL ; bit 7 (the SOD position)
ORI 40H ; set bit 6 = SDE (enable)
SIM ; output the bit on SOD
CALL BITDLY ; wait one bit time
MOV A, D ; restore the data
DCR C
JNZ TXLOOP
RET
The awkwardness is instructive: seven RALs to move one bit
into position, because SIM only looks at bit 7. This is
exactly why dedicated USART chips exist — the 8251 does all
of this in hardware from a single OUT instruction.
Bit delay for 1200 baud at 3 MHz:
bit time = 1/1200 = 833 µs
T-states needed = 833 µs / 0.333 µs = 2502 T
Using the 14T loop: count = 2502/14 = 179 = B3H
Worked numerical 2 — transmission time
How long does it take to send a 1 KB file at 9600 baud with 8N1 framing (8 data, no parity, 1 stop)?
Bits per character = 1 start + 8 data + 0 parity + 1 stop
= 10 bits
Characters = 1 KB = 1024
Total bits = 1024 × 10 = 10 240 bits
Time = 10 240 / 9600 = 1.067 seconds
Useful throughput:
8192 data bits / 1.067 s = 7680 bps
Efficiency = 8/10 = 80%
Compare at 115 200 baud:
time = 10 240/115 200 = 0.089 s (89 ms)
And with 7 data bits + even parity + 1 stop (7E1):
bits per char = 1 + 7 + 1 + 1 = 10 (same total!)
but only 7 useful → efficiency 70%
💡 Exam angle: serial-vs-parallel comparison and the bit-rate/baud-rate distinction are the two most-asked points here — give the skew explanation for why serial won at high speed. Know the SID/SOD pins with SIM/RIM, and be able to compute transmission time including framing overhead. The 80% efficiency figure for 8N1 is worth remembering.
Syllabus points
Serial communication basics
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.