I/O and Peripheral Interfacing
Peripheral interfacing connects external devices to the microprocessor. Interface chips (programmable peripheral devices) bridge the gap between the processor and I/O devices, handling data formatting, timing, and control.
I/O Techniques
Three methods for I/O data transfer: Programmed I/O (CPU continuously checks device status — polling), Interrupt-driven I/O (device signals when ready), and DMA (Direct Memory Access — device transfers directly to/from memory without CPU involvement). DMA is used for high-speed transfers like disk I/O.
8255 PPI
The Intel 8255 Programmable Peripheral Interface provides three 8-bit ports (A, B, C) configurable as input or output. It operates in three modes: Mode 0 (simple I/O), Mode 1 (strobed I/O with handshaking), and Mode 2 (bidirectional bus for Port A). The control word register configures port directions and modes.
8259 PIC
The Intel 8259 Programmable Interrupt Controller manages up to 8 interrupt sources for the CPU. It handles priority resolution, interrupt masking, and vector generation. Multiple 8259s can be cascaded for up to 64 interrupt sources. It is programmed with Initialisation Command Words (ICW) and Operation Command Words (OCW).
8253/8254 Timer
The Intel 8253/8254 Programmable Interval Timer has three independent 16-bit counters. Modes include: Mode 0 (interrupt on terminal count), Mode 1 (hardware-triggered one-shot), Mode 2 (rate generator), Mode 3 (square wave generator). It generates timing signals, delays, and clock frequencies.
Serial Communication
Serial communication transmits data one bit at a time. Synchronous communication uses a shared clock; asynchronous uses start/stop bits. The 8251 USART handles serial-to-parallel and parallel-to-serial conversion. RS-232 defines the electrical standard.
ADC and DAC
ADC (Analog-to-Digital Converter) converts analog signals to digital values. DAC (Digital-to-Analog Converter) does the reverse. ADC types include successive approximation, flash, and dual-slope. Resolution is measured in bits (8-bit ADC gives 256 levels). These are essential for sensor interfacing.
Summary
Peripheral interfacing connects the microprocessor to the real world. Programmable devices like the 8255, 8259, 8253, and 8251 provide flexible I/O, interrupt management, timing, and serial communication capabilities.