Input / Output (I/O)
Direct I/O (Peripheral):-
- MPU communicates with outside word through I/O device.
- There are 2 different methods by which MPU identifies and communicates With I/O devices these methods are:
- Direct I/O (Peripheral)
- Memory-Mapped I/O
- The methods differ in terms of the
- No. of address lines used in identifying an I/O device.
- Type of control lines used to enable the device.
- Instructions used for data transfer.
Direct I/O (Peripheral):-
- This method uses two instructions (IN & OUT) for data transfer.
- MPU uses 8 address lines to send the address of I/O device (can identify 256 input devices & 256 output devices).
- The (I/P & O/P devices) can be differentiated by control signals I/O Read (IOR) and I/O Write (IOW).
- The steps in communicating with an I/O device are similar to those in communicating with memory and can be summarized as follows:
- The MPU places an 8-bit device address on address bus then decoded.
- The MPU sends a control signal (IOR or IOW) to enable the I/O device.
- Data are placed on the data bus for transfer.
Memory-Mapped I/O:-
- The MPU uses 16 address lines to identify an I/O device.
- This is similar to communicating with a memory location.
- Use the same control signals (MEMR or MEMW) and instructions as those of memory.
- The MPU views these I/O devices as if they were memory locations.
- There are no special I/O instructions.
- It can identify 64k address shared between memory & I/O devices.