| 8.1 Parallel Data Input/Output In a microcomputer-applied system, you may want to know the on/off statuses of some switches or display the current statuses using LEDs or others. Such simultaneous input/output of several-bit data is referred to as parallel data input/output and the peripheral functions for parallel data input/output are called "I/O ports", which have registers and pins as shown in Figure 8.1.
|
Parallel data input/output using I/O ports are performed through registers as shown in Figure 8.2.
|
| Input function "1" can be read from I/O port registers when the "High" voltage is applied to I/O port pins or "0" when "Low". Based on the values read from I/O port registers, the on/off statuses of the switches connected to pins or the high/low status of the comparator output can be determined. Output function The "Low" voltage is output from I/O port pins when the values written in I/O port registers are "0" or "High" when "1". Based on the values written in I/O port registers, the LEDs connected to pins or relays can be turned on and off. |