Chapter Three3 Narration 1
Chapter Three3 Narration 1
Chapter Three3 Narration 1
7 10
8 9
15 + - 6
DB25 and DB9 SIGNAL ALLOCATIONS
DB25 DB9 SIGNAL NAME
1 Frame Ground /Chassis Ground
2 3 TxD (Transmitted Data)
3 2 RxD (Received Data)
4 7 RTS (Request To Send)
5 8 CTS (Clear To Send)
6 6 DSR (Data Set Ready)
7 5 GND (Logic Ground)
8 1 DCD (Data Carrier Detect)
20 4 DTR (Data Terminal Ready)
22 9 RING (Ring Indication)
RS232 CHARACTER FRAME
ASCII CHARACTER ‘A’ ASCII CODE $41 - 100 0001
TTL FRAME
IDLE
START BIT 0 BIT 1 BIT 2 BIT 3 BIT 4 BIT 5 BIT 6 EVEN STOP BITS
BIT LSB PARITY
Character Frame
7 data bits per ASCII Character
IDLE
RS232 FRAME
SYNCHRONISING TO INCOMING FRAME
5 6 7 0 1 2 3 4 5 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
IDLE 0 1 1 0 1 0 0 1 1 1
START BIT 0 BIT 1 BIT 2 BIT 3 BIT 4 BIT 5 BIT 6 BIT 7 ODD STOP
BIT LSB MSB PARITY BIT
IDLE 0 1 0 1 1 1 1 0 0 1
IDLE 1 0 1 1 0 1 1 0 0 1
RS232 CONFIGURATION
BAUD RATE PARITY SETTINGS WORD LENGTH
19200 bps ODD Parity 5 bits/char
9600 bps EVEN Parity 6 bits/char
4800 bps NO PARITY 7 bits/char
1200 bps MARK PARITY 8 bits/char
600 bps SPACE PARITY
300 bps STOP BITS
150 bps 1 STOP Bit
110 bps 1.5 STOP Bits
2 STOP Bits
Settings must be identical on either side of the serial link
LINK UTILSATION EFFICIENCY
• Asynchronous transmission has overheads. Start bit,
Parity bit and Stop bit(s) to convey the actual data bits per
character. Stop bits and Start bits required for character
synchronisation
• Link utilisation efficiency is data bits in character divided
by total number of bits in the frame expressed as %
• Maximum byte or character transfer rate is Baud Rate
divided by the total number of bits in the character frame
• For first example: Efficiency = 7/11 = 63.63%
• For second example: Efficiency = 8/11 = 72.7%
• Maximum transfer rates are both 19200/11 = 1745.45
characters or bytes per second
Matching RS232 settings
• Mismatched settings can result in errors on the
serial link
• Banks of DIP switches can be used to select the
correct settings so they match the settings on the
other end of the serial link
• Software is available to configure the serial link to
the desired settings
• A protocol analyser or data communications tester
can be used to determine the settings available
• Data communications tester can send test messages
like all the lower and upper case and digit
characters and the “QUICK BROWN FOX” message
RS232 Errors
• RS232 uses simple parity to detect errors
• Simple Parity can only detect an ODD number of
bit errors.
• Errors can always be reduced by reducing the data
bit rate
• A Framing Error results when one or more STOP
bits are missing
• Large mismatch between the transmitter clock and
the receiver clock can also cause errors, especially
framing errors and parity errors
• Character overruns can be prevented by interrupts