Hardware Reference
In-Depth Information
9 Interfacing
This chapter aims to introduce readers to the general principles of interfacing
sensors and transducers to PC bus I/O cards. We shall describe a variety of
common sensors and transducers and, for those who do not wish to make use of
'off-the-shelf ' signal conditioning modules, details of the circuitry necessary
to interface such devices to several commonly available I/O cards has been
provided. Before embarking on this task, it is perhaps worth mentioning some
of the more important characteristics and limitations of conventional digital and
analogue digital I/O ports.
Characteristics of
digital I/O ports
The digital I/O ports provided by most PC expansion cards are invariably byte
wide (i.e. each port comprises eight individual I/O lines). Such ports are usually
implemented with the aid of one, or more, programmable parallel I/O devices
(e.g. the 8255 described on page 29).
Where expansion card parallel I/O devices are connected directly to the out-
side world via a rear panel-mounted I/O connector, care should be taken to
ensure that no output line is excessively loaded nor that any input level exceeds
the manufacturer's recommended limits.
As far as outputs are concerned, the Port B lines of a programmable parallel
I/O device are usually able to source sufficient current to permit the direct
connection of the base of a high current gain (preferably Darlington) NPN
transistor. To minimize loading on the remaining I/O lines it will generally
be necessary to employ the services of one, or more, octal TTL buffers. In any
event, it is important to note that, when sourcing appreciable current, the high-
level output voltage present on a port line may fall to below 1.5 V. This will be
acceptable when driving a conventional or Darlington transistor but represents
an illegal voltage level as far as TTL devices are concerned.
Some digital I/O expansion cards incorporate buffers between the parallel
I/O device and the rear panel-mounted expansion I/O connector. Others make
use of octal tri-state buffers and transceivers (e.g. 74LS245) rather than a VLSI
parallel I/O device. Such devices can often source and sink as much as 15 and
24 mA, respectively.
Where a much higher output current capacity is required, external circuitry
will generally be required in order to boost the output current. Alternatively
(and provided that switching speed is unimportant) an interface card fitted with
medium/high relays may be used. Such a card may also be employed when a high
degree of isolation is required between an output load and a PC-based controller.
An expansion card which uses programmable I/O devices (rather than con-
ventional buffers and latches) will require software configuration. A typical
configuration routine for an interface based on two 8255 Programmable Periph-
eral Interace (PPI) devices (providing 48 digital I/O lines in six groups of eight
lines) would involve initializing Ports A, B, and C of both devices as either
Search WWH ::




Custom Search