In the microprocessor lab you type three lines: MVI A,55H, OUT 80H, HLT. The moment the second line runs, every other LED on the board lights up: 55H is 0101 0101, so bits 0, 2, 4 and 6 are on. Nothing inside the CPU knows what an LED is. All it did was put the number 80H on its address lines, put 55H on its data lines, and mark the cycle as an I/O write. A decoder noticed that 80H was its number, a latch caught the byte and held it, and the lamps did the rest.
That small story is the whole subject of this chapter. I/O interfacing is the handful of chips between the CPU and the world that decide "this one is for me". The last chapter showed a keyboard module with a status register and a data register, and left one question open: how does the CPU name which register it wants? We answer that, and then follow the answer down to the wires. How does a port get its number? How long may a slow chip take? How does the 8086 cope with byte addresses on a 16-bit bus? And how does a sensor's voltage reach the CPU as a byte?
By the end you will be able to say, for any CPU in the syllabus, how a device is addressed and how many ports it can have. You will build a port decoder from a 74LS138 and explain what every gate does, draw a memory and port map, and show why an innocent OUT 80H can overwrite RAM if one line is forgotten. You will count the wait states a slow memory needs, trace byte and word accesses on the 8086's two memory banks, and read an ADC and drive a DAC through ports, with the timing sums.
We go in five parts, in the order the signals travel: naming, decoding, timing, the 8086's two banks, and last the converters.