Uploaded by M Ganesh

Digital Interfaces in Measurement Systems

advertisement
Digital Interfaces in Measurement Systems
IEEE-488 Instrumentation Bus – General Purpose Interface Bus (GPIB)
• The IEEE-488 bus was developed by HP in the early 1970s as a standard, 8-bit, bidirectional,
asynchronous bus (HP-IB) to enable a number of HP-IB-compatible instruments to communicate with a
controlling computer and with each other
GPIB Bus Structure
The GPIB consists of eight, tristate, bidirectional data lines and eight control lines that select, deselect, and
otherwise coordinate the asynchronous communications between the host computer and satellite instruments
The maximum practical data transmission rate in most GPIB systems is about 250 kB/s, equivalent to about 2
Mb/s.
Practical considerations on loading a typical IEEE-488 bus limit the number of devices on the bus to about 15, all
which should be located within 3 m or so of the host computer.
All lines on the GPIB use a complimentary TTL logic protocol.
All commands and most data on the 8-bitdata I/O lines are generally sent using the 7-bit ASCII code set, in which
case the eighth bit is used for parity or is unused.
1. DAV (data valid): When a selected device on the GPIB supplies an 8-bit word to then data lines (i.e., is a talker), DAV is
set LOW (or TRUE) to indicate to all on the bus that the data byte on the bus is ready to be read to a listener device. DAV
is one of the three handshaking lines that control data transmission on the GPIB.
2. NRFD (not ready for data): This second handshaking line is pulled LOW by a selected listener to indicate it is ready to
accept data (NRFD would be better called RFD).
3. NDAC (not data accepted): This third handshaking line is set LOW by the selected listener device when the data byte
transmitted has been accepted and that new data may now be supplied
4. ATN (attention): This line is pulled LOW by the bus controller (computer) to signal that it is sending a command. It drives
ATN HI to signal that a talker can send it data messages.
5. IFC (interface clear): The GPIB controller drives this line LOW to reset the status of all other devices on the GPIB and to
become controller in charge (CIC).
6. SRQ (service request): This is the GPIB equivalent of an interrupt line.
7. REN (remote enable): This controller output line is set LOW to allow the controller to take over front-panel controls of a
selected instrument on the GPIB
8.EOI (end or identify): This line has two functions—a talker uses EOI LOW to mark the end of a multibyte data message.
EOI LOW is also used by the bus controller to initiate a parallel poll
Serial Data Communications Links
Serial, asynchronous data transmission protocols include the RS-422, RS-423, RS-449, RS-485, and the
USB
RS stands for recommended standard
RS-232C and D Interfaces
RS-232C serial communications are sent by data terminal equipment (DTE) and data communications
equipment (DCE). DTE include such things as computer terminals, teleprinters, computers, and digital
instruments. DCE are devices (modems) that encode the serial digital signals into low-bandwidth (sinusoidal)
formats compatible with transmission on voice band telephone lines.
The RS-232C interface operates either in the simplex, half-duplex, or full-duplex modes. In the
simplex mode, data transmission is unidirectional, for example, from the computer to a printer.
In the half-duplex mode, serial data can be sent in both directions but in only one direction at
a time. Full-duplex operation permits simultaneous, bidirectional, serial data transmission.
Data are transmitted as 8-bit, ASCII words signaled by high or low logic voltages on the transmitted data
(TD) line.
Like the RS-232C, the RS-232D is used for low-speed, asynchronous communication between a computer and
a single, slow, peripheral device
• Data are transmitted as 8-bit, ASCII words signaled by high or low logic voltages on the transmitted data (TD) line.
• At the beginning of data word transmission, the TD line goes low and stays low for one clock period. This is the start bit,
which is always low
• The receiving equipment senses the high–low transition of the start bit and, to verify start, samples the received data (RD)
one-half clock period later.
• If low, the start bit is verified. The state of the RD line is then sampled eight times at intervals of one clock period.
• The last (eighth) sample is the MSB and is called the parity bit.
• In setting up an RS-232D interface, the user can specify the use of odd, even, or no parity in the data transmission
process.
• If even parity is used, the parity (8th) bit is set so that the total number of logical 1s in the transmitted word, including the
parity bit, is even
• At the end of data transmission, after the parity bit is sent, one or two high stop bits are sent before the TD line is declared
idle and is ready to transmit the next word (ASCII character).
Example of an 8-bit, serial data signal sent on pin 2 of an RS-232C DTE.
The “pinout” of a DE-9 connector for any DTE (Data Terminal Equipment) device
TRS-422, RS-423, and RS-485 Interfaces
The 422 and 485 standards differ significantly from 232, their designs intended to optimize both maximum cable
length and maximum data rate
An RS-422A, balanced, twisted-pair transmission line. Note: DT = differential transmitter. DR = differential
receiver. Zo = characteristic impedance of the transmission line
The RS-422A interface can transmit data at up to 10 M baud and can have lengths of up to 1200 m.
• To begin with, the electrical signaling used for both EIA/TIA-422 and EIA/TIA-485 is differential rather than singleended (balanced rather than unbalanced).
• This means a dedicated pair of wires is used for each communications channel rather than a single wire whose voltage
is referenced to a common ground point as is the case with EIA/TIA-232
Using dedicated wire pairs instead of single conductors sharing a common ground means that EIA/TIA-422 and
EIA/TIA-485 networks enjoy much greater immunity to induced noise than EIA/TIA-232
Since the receiver responds
only to differential voltage
between its two inputs, this
common-mode noise cancels,
revealing a “clean” data
signal at the end
The RS-423A interface uses an unbalanced single line, similar to the RS-232D link. Even so, the RS-423A link is faster
than the RS-232C; it was designed, according to Stone (1982), to provide a linkage between the old RS-232C interface
and the RS-422A interface.
Its operational protocol is very similar to RS-232, although improvements in the driver and receiver electronics allow it
to operate at rates up to 100 kbaud over short cables (<30 m) and at significantly slower rates over cables up to 1.2 km.
The RS-485 interface is a balanced (twisted pair) party line on which a number of secondary receivers and
transmitters can operate.
In this respect, it is effectively a data bus.
RS-485, balanced, bidirectional, twisted pair serial data transmission
system. Differential, tristate transceivers are used. Note: T/R = transmit/receive signal.
RS-485 interface can transmit data up to 10 M baud
Universal Serial Bus(USB)
• The modern USB has rapidly replaced the RS-232 C&D and other serial interfaces as a means for a
computer to communicate with medium-speed peripheral devices such as scanners, mice, printers,
PDAs, and digital cameras
• USB data are clock encoded and use NRZI with bit stuffing
The USB has four types of data transfer modes: (1) control, (2) interrupt, (3) bulk, and
(4) isochronous.
Control mode is initiated by the host and is used to initialize the peripheral device.
Bidirectional, handshaking traffic occurs in one direction at a time.
In interrupt mode, the host queries devices to see if they need servicing.
Bulk mode is used when data transfer accuracy is essential, as when reading or writing to a peripheral
CD-RW.
Isochronous mode sacrifices data accuracy for data timing. Uses include USB loudspeakers and
precision
motion generation.
Data Transmission on Fiber-Optic Cables
• FOCs are the means for very-high-speed, serial data and video transmission. They have rapidly
replaced conventional wire transmission lines in point-to-point applications.
• FOC systems are used in increasing numbers in instrumentation systems because of their low cost,
high reliability, low loss, immunity from EMI, and wide bandwidth.
• Organization of a single, fiber-optic, serial communications channel is shown below. Note: OC =
optical coupler, FOC = fiber-optic cable, DRV = driver amplifier, LED/LAD = modulated light source,
PS = photo sensor (fiber-optic receiver).
The refractive index of the FOC core is thus
The refractive index of the cladding
material (e.g., glass, plastic) surrounding
the core is
Diagram of the cutback end of a step-index FOC.
The angle relations for this case are given by the well known Snell’s law:
Download