A microprocessor system is pointless unless it can communicate with the outside world. It does this through an
INTERFACE which is usually a plug or socket.
The CPU communicates with this interface via an INPUT/OUTPUT PORT chip.
These chips are called VERSATILE INTERFACE ADAPTORS or UNIVERSAL ASYNCHRONOUS RECEIVER/TRANSMITTERS etc.
Ports have their own registers with addresses, and the CPU can write data to, or read data from, these registers. If the system is controlling a set of traffic lights, then the
CPU can write data to the registers, to switch the lights in the correct sequence. It can also read data that is provided to the port by sensors buried in the road.
This means that it can make decisions according to the amount of traffic and switch the lights accordingly. Since the system is digital and the outside world is mostly analogue, digital to analogue converters are required when providing an output, such as one to control the temperature of an oven.
An analogue to digital converter is required if the system is to read an
analogue device, such as a thermometer.