|-------- Most significant three bits ----------|
These are generated from the keyboard by holding down the CTRL key whilst hitting a letter key. An ASCII code which is $40 less than the upper-case character is generated.
Control codes may be used for any purpose, but in the interests of standardisation, the majority have a defined usage, for example:
$0A line feed (LF) = CTRL-J $0D carriage return (CR) = CTRL-M $08 backspace (BS) = CTRL-H $09 horizontal tab (HT) = CTRL-ISuch representations of characters are used within a microprocessor system. A standard character set is especially important when transferring data between systems.
Parallel data transfers are commonly used for printers. Here, fast data transfer is possible as the distance from computer to printer is normally short. The 'Centronics' interface is one example of a parallel port.
With long lines and (or) high data rates, parallel interfaces run into problems with data skew or differential delay. At the remote end, the bits of data may no longer be aligned and it will be difficult to reconstruct the original data.
Another problem with long parallel lines is that of cross-talk where data from an adjacent line interferes with the data, so corrupting it.
For these reasons, parallel interfaces are normally only used for short distances.
A higher-performance parallel interface has been defined and is known as the General Purpose Interface Bus (GPIB) or HPIB (Hewlett-Packard Interface Bus, since HP originated the specification), or by its American Standard - IEEE 488.
A parity bit may also be used to detect single-bit errors.
The data may be sent as 8-bit ASCII or 7-bit ASCII and this format must be agreed in advance by transmitter and receiver.
e.g. 7-bit ASCII, 1 STOP bit
In the format above, in order to transmit a 7-bit ASCII code, 10 bits are used in the frame.
Between characters, a continuous STOP bit is sent. This is a '1'. The START bit is always a '0' so a high-to-low transition defines the start of a character. The baud rate is agreed in advance, so that on receipt of a start bit, a half-bit delay is generated and each bit is then sampled at intervals of one bit (i.e. in the centre of each bit).
All the '1's in the data transmitted are counted (excluding START and STOP bits).
If even parity is selected, the parity bit is set so that the total number of bits which are '1' is an even number.
If odd parity is selected, the parity bit is set so that the total number of bits which are '1' is an odd number.
Some RS232 derivative specifications use 0V and 5V levels. These are acceptable for short distances only.
The full RS232 specification allows for +/-15V to be sent by the transmitter. The receiver has a +/-3V threshold to allow for attenuation.
A SPACE (logic '0') is transmitted as a positive voltage and the MARK (logic '1') is transmitted as a negative voltage. It should be noted that negative logic is used here.
Tx 2 -------------\ /-------------- 2 Tx \/ Rx 3 ______________/\_______________ 3 Rx GND 7 ------------------------------- 7 GNDIn spite of the 'standard', there are numerous variations in RS232 connections found in equipment. This is why there are several RS232 analysers on the market. It may be necessary to experiment before achieving successful RS232 communications.