Serial Line Driver Chips

I/O Ports

To communicate with peripherals and other electronic devices, a computer/microcontroller needs to be able to input and output data beyond the computer itself. These pages explore the basics of computer Input/Output (I/O).

Schematic for a one-bit bidirectional I/O port

The diagram above shows one bit of a bidirectional I/O port. This type of port provides both input and output using the same port I/O pin (right). It may be used to provide a "bus" to connect peripherals. A control latch controls the direction of the transfer (by setting a bit of the W (Write) register into the lower D type latch in the diagram.

Below is a summary of the operations required to read data from a port pin:

Reading can be performed by using a move instruction to clock a '1' into the I/O control latch, which will (via the Q output routed through the OR gate) switch OFF the upper FET (a p-channel type switches OFF when its input is high); simultaneously the '0' fed to the AND gate will switch OFF the lower FET. The output from the data latch is irrelevant as both FETs are OFF and the port is disabled . Data may now be read from the port pin.

Write operations are a little more complex; we have to consider the cases of writing a '0' and '1' separately. In either case we would use a move instruction to clock a '0' into the I/O control latch first, to configure the pin as an output (see below).

Suppose we want to write a '0' to the I/O pin. A move instruction is used to write the '0' to the port pin's data latch, but the inverted Q output is used, so a logic '1' is fed to the OR gate, switching OFF the upper FET; the same logic '1' is also fed to the AND gate whose other input is also '1', so the lower FET is switched ON and the pin's output is at logic '0'.

Suppose now we want to write a '1' to the I/O pin. A move instruction is used to write the '1' to the port pin's data latch, but the inverted Q output is still used, so a logic '0' is fed to the OR gate, and as the other input is also logic '0', this switches ON the upper FET; the same logic '0' from the data latch is also fed to the AND gate (the other input being '1') so the lower FET is switched OFF and the output is at logic '1'.

In most communications links the driver operates in either an input of out mode while the link is being used. When half-duplex mode is used, the I/O port needs to alternate between Input and Output modes.

When data is transmitted serially over distances greater than a few metres the 5v TTL logic system is found to be inadequate, and typically buffers or isolators are used, which we call Line Drivers.

Line Drivers

Line driver ICs improve data transmission reliability and noise immunity.

Line receiver often implement hystersis to reduce the effect of varying signal levels. For example a thresholds of 200mV hysteresis establishes two thresholds 200mV apart:

For balanced transmission the threshold is measured as the difference between the two conductors, for unbalanced transmission the threshold is relative to a common reference (ground).

Some common physical layers used for serial communications are '232' and '485'. These send signals using voltage level often larger than the supply voltage, the required voltages are generated by an internal charge pump.

Bit Errors

Suppose we wish to transmit the byte "10110010" over a communications link, then we may perhaps expect the signal corresponding to the byte to be distorted a little as it travels along the cable.

In fact, there are many different ways a byte may be distorted, some of which are represented below at three points along the cable. The crucial question is: "Will the receiver be able to recognise the signal it receives and associate it with the transmitted bit sequence?"

If the byte is correctly interpreted by the receiver at the end of the cable, we say that we have achieved error-free communication. If however, the receiver sometimes makes mistakes in interpreting the bits received, we say that bit errors have been introduced by the link.

As it propagates along the cable, the signal will be subject to attenuation - due to signal loss (e.g. the resistance of the cable per metre); distortion - due to the capacitance of the cable (acting as a filet that attenuates higher frequencies) and noise/interference - this reduces the ability of the receiver to discriminate the baud symbols from other extraneous signals (the less energy per baud, the harder it is to discriminate).


The easiest effect to imagine is that as the signal travels along the cable, some of the signal fades away. In effect, the signal gets weaker, and weaker, the further it has to travel. This is known as attenuation.


Often the attenuation which is observed is not linear. If we view the frequency spectrum of the signal which was originally sent, we would see that some parts of the spectrum are attenuated more than other parts. This causes the shape of the received signal to change as it passes down the cable. In some cases, the level of distortion may be predicted (e.g. it may be a function of the type of cable used and proportional to the length of the cable). If the level of distortion is known, it may be compensated for by applying non-linear amplification (this is known as signal equalisation).


Attenuation and (predictable) distortion alone would not be a significant problem for error-free communication. They would simply require the use of ultra-sensitive receivers for long cables, or (more preferably) the use of amplifiers at strategic points along the length of the cable to restore the original signal. However, all communications systems also experience random noise which appears at the receiver to be mixed with the received signal. As the signal becomes attenuated, it approaches the level of noise (i.e. it becomes hard to differentiate the signal from the background random noise). Amplifying the signal also amplifies the noise, which grows with each stage of amplification.


The key to digital transmission is not the only to use amplifiers, but to use amplifiers as a part of regenerative digital repeaters. A repeater amplifies and equalises the received signal, and then digitally samples the signal to decode the bits being sent (i.e. recognises each bit in turn). Once decoded, the digital bits may be sent a fresh down the cable to the next repeater, regenerating a signal at the output of the repeater which is as good as the original sent signal. By using repeaters at suitable points along the cable (before the signal deteriorates below the level at which it may be reliably decoded), arbitrary long distances may be reached with little probability of bit errors.

Digital repeaters (splitters/mergers in DMX) are therefore a key component of any long digital link.

Wideband signals

A driver circuit normally includes both a transmitter and a receiver.

First focus on a simple high baud rate transmitter (for example at 250 kbaud as used by DMX). The energy in the DMX signal is mainly around 250 kHz, the baud rate of the system. If seen on an oscilloscope, the signal will have sharp rise and fall edges, looking like a "clean" digital waveform Without any filtering or signal shaping, this set of square-edged pulses results in frequency harmonics much higher than the baud rate. The transmit signal would therefore have a wide spectrum if viewed on a spectrum analyser.

This signal travels along the cable. The line driver at the receiver has to decide which bauds were signalled by the sender, but the resulting signal at the receiver is seldom the same as was sent. There are two problems, some of the energy of the sender has failed to reach the receiver, and some other unwanted signal energy (interference/noise) will also be received. A wideband receiver accepts any signal received during a baud period, irrespective of its frequency. This makes it particularly vulnerable to noise/interference.

Limited bandwidth signals

Early communications engineers discovered that limiting the spectrum of the signal at the receiver significantly improved the performance. A band-limited signal (e.g. using a low-pass filter) reduces susceptibility to any unwanted interference/noise outside the filter band. It is therefore wise to use a receiver that filters the signal at frequencies above the baud rate. Slew-rate limiting at the transmitter works by slowing the edges of the RS-485 signal down, reducing the signal's high-frequency components.

The communications engineered also reasoned that transmission of any signal outside the pass-band of the remote receiver was of no value - at best the receiver would filter and remove the signal, and it would have no effect on the output of the receiver. At worst, some of the signal may leak from the cable adding interference to other transmissions. There was no point in sending this signal energy.

The optimum solution was to apply the same shaping of the signal at the sender and the receiver. If both used the same form of filter, then this would result in less interference to other signals and highest probability of correct reception. This filter is implemented as the slew-rate limiting circuit of the line transceiver.

Slew Rate

Slew-rate limiting at the transmitter works by slowing the edges of the the signal down (i.e. reducing the signal's high-frequency components). It also adds a (small) propagation delay through the line driver.

A high baud rate line receiver that accepts a wide bandwidth input signal is more susceptible to interference at higher frequencies picked-up as the signal travels along the cable (e.g. frequencies >> 250 kHz in this example). This reduces the ability to detect the wanted signal, whereas a band-limited signal (e.g., one using a low-pass filter matched to the bandwidth of the signal) reduces susceptibility to any unwanted interference/noise outside the filter band.

An appropriate choice of driver/receiver circuit at the transmitter and receiver hence both reduces radiated emissions and reduces susceptibility to noise and improper termination.

Trace showing the effect of limiting slew rate at a receiver when sending a 125 kHz square wave. Green traces show the input to receiver from the cable with ringing and noise, whereas the purple trace captured at the output is cleaner. Note also the propagation delay (shift on the horizontal axes) through the receiver, and the need to sample at the centre of the baud.

See also:

Prof. Gorry Fairhurst, School of Engineering, University of Aberdeen, Scotland. (2014)