Dan Moos wrote:
OK, to my question. I realize what the 68C22 does. I just don't see why it's needed?
I/O devices of any type interface the microprocessor's (MPU) buses with the outside world under controlled conditions. Using the VIA as an example, it has two eight bit parallel ports, of which each bit can be programmed to be an input or an output. The VIA's chip selects are wired into the glue logic in such a way that it only responds to read and write requests from the MPU when a specific address is present on the address bus, and only during the correct time in the bus cycle. Furthermore, one of the parallel ports appears at one address and the other parallel port appears at a different address. What this means in practical terms is the external devices or system connected to the parallel ports only communicate with the MPU under program-controlled conditions.
The ability to arbitrarily make some port bits inputs and others outputs masks a characteristic of all microprocessors, in that they can receive input or generate output, but not both at the same time. Obviously, the parallel ports in the VIA don't have such a restriction.
In addition to the I/O facilities of the VIA, it has another important feature. It can be configured to interrupt the MPU when an external device needs attention. Interrupt-driven I/O is a basic computer concept that allows for the fact that the microprocessor normally executes program instructions in a sequential way, whereas external events are random in nature and cannot be planned upon in advance. So the VIA performs an important service in that it doesn't pester the MPU unless something important has happened.
Another function of I/O devices such as the VIA is they insulate the MPU buses from the uncouthness of the outside world. That includes providing different voltages and/or more drive current to the external devices or systems than can be gotten from the MPU itself, as well as protecting the MPU and other devices attached to the buses from unwanted conditions. If the outside world were directly connected to the MPU's buses, instability or outright failure could result.
There are many kinds of I/O devices available, the VIA being but one of them. Others include UARTs, video controllers, SCSI controllers, printer port controllers, digital-to-analog converters, etc., all of which respond to the MPU on one side and interact with external hardware on the other side.
Hope my explanation helps.