I/O, I/O, It’s Off to Work We Go…
BIRKET Engineering News, July/Aug 1993
Computers are useless without I/O (inputs and outputs). In an office, we could not function without the keyboard and the mouse as inputs, and the CRT and the printer as outputs. In our business of automation and process control, the computer receives inputs from sensors that indicate the status of the system. The computer’s outputs control the process. The large number of variables that a computer can be asked to sense and control give rise to an enormous variety in the configurations of inputs and outputs. The meanings of some common terms used to describe inputs and outputs are given below.
Both inputs and outputs can be analog or digital in nature. Digital indicates that the signal can take on only certain discrete states. Often only two states are possible: on and off. A common example of a digital signal is a line which has only the states of zero volts and five volts, or perhaps zero volts and 24 volts. Sometimes a phase shift is used to indicate an “on” state. These approaches lend themselves to the representation of numbers using the binary (base 2) counting system.
Analog data can take on a continuous range of values. A true analog signal can be any possible value between the defined extremes such as zero and ten volts, or four milliamps and twenty milliamps. An opportunity for confusion arises when analog signals are created by digital means. In such a case, the so-called analog signal is actually only able to take on a certain number of discrete states between the limits. For example, if a twelve bit digital-to-analog converter is used to create a representation of a zero to ten volt analog signal, the resulting analog signal will always occupy one of 4,096 possible values, each separated from the other by 2.44 millivolts. The information content of an analog signal is often more difficult to extract because the information is conveyed by obscure means (compared to digital signals) such as the value or magnitude of some characteristic of the waveform such as the amplitude, phase, or frequency.
Serial and parallel are terms which are generally used when referring to the communication of digital data. A serial or parallel input or output usually requires both an electrical and a protocol specification. A few standards such as MIDI specify both the electrical characteristics and the protocol. Serial communications are generally achieved with a single line or pair of lines for communication in each direction. The information is contained in the time sequencing of the signal. RS232, 422, and 485 are electrical definitions for serial communication. Protocols vary widely and are generally defined in the software as agreed upon by the developers of the two communicating devices. Many standard and proprietary protocols exist. Some elements of the protocol may be implemented with additional electrical lines between the computers such as the RTS, CTS, DCD, DSR, and DTR lines on a modem using RS232 communication.
Parallel communication uses a greater number of wires and associated electronic hardware. This generally offers faster communications. Communication of 8, 16, or 32 bit digital data requires one line per bit plus a strobe and other control signals which are all referenced to a single common potential. Each digital value that is to be communicated is represented on the lines as a binary number, after which its presence is indicated by manipulation of the strobe or other lines.
Without regard to a signal’s other characteristics, a signal may be sourcing or sinking. We generally imagine that a computer will apply a voltage to its output to indicate an “on” condition. It is just as valid and almost as common for a computer to have a sinking output which merely provides a return path for a voltage or current coming “from” the input device. It is difficult to read the state of a sinking output with a meter or scope unless it is connected to its destination.
Another important characteristic of inputs and outputs especially when they are distant or separately powered is isolation. When there are concerns about ground loops, or the sending and receiving systems are not referenced to a common potential, it is necessary to provide isolation at either the sending or receiving end. Isolation may be accomplished in several ways; common options are relays and opto-isolators. The terms contact closure and dry contact are often included in specifications to enforce isolation. Both refer to the use of a relay.
Thousands of possible configurations exist for I/O implementations, each a unique variation of the concepts presented above and many others which were not mentioned. Each has merit in certain circumstances and disadvantages in others. The choice affects cost, system integrity, and maintainability.