Difference between revisions of "Asynchronous serial line"

From Computer History Wiki
Jump to: navigation, search
(reorder to define before use)
(DCE and refrences: Need common word size for VT-52 terminals.)
Line 13: Line 13:
 
==Break==
 
==Break==
  
If the line is held in the 'space' state for longer than a character time, this is called a '''break''' condition, and it can be detected by the receiver and signalled specially. This is often used to [[interrupt]] the computer on the other end of the line from the terminal.
+
If the line is held in the 'space' state for longer than a character time, this is called a '''break''' condition, and it can be detected by the receiver and sent specially. This is often used to [[interrupt]] the computer on the other end of the line from the terminal.
 +
 
 +
== RS-232 Standard and common settings ==
 +
The RS-232 standard defines the two devices connected with a serial cable as the Data Terminal Equipment (DTE) and Data Circuit-Terminating Equipment (DCE). This terminology reflects the RS-232 origin as a standard for communication between a computer terminal and a modem.
 +
 
 +
Common settings with 8 data bits, no parity bit, and 1 stop bit, with the required start bit, which leads to a bit-packet of exactly 10 bits, which makes throughput calculations simple. ( bits-per-second/10 = Characters per second ).
 +
 
 +
Common settings for remote terminals was to force all caps, and only needing 5 bits per character, It was thought that it would speed throughput, but at such low data rates, the savings were not significant.
 +
 
 +
Speed would commonly be set at the fastest rate that did not have errors:
 +
Common for ttys: was 45, 90 and 120 baud.
 +
Common for VTD was 1200, 2400 and 4800,
 +
Later as communication chips improved, 9600, 14400 and 19200.
 +
 
 +
Most common speeds were Baud rate: 9600 or 115200.
 +
 
 +
Between DTE and DCE modems, you could lock the carrier rates, and increase the RS-232 rate at 2x the carrier rates, eliminating any bottle neck in the local circuitry. 
  
 
==UART==
 
==UART==
  
 
The complete circuitry needed to originate and interpret serial line signals, including the serial-parallel conversion, was implemented in one of the first [[MSI]] chips, the Universal Asynchronous Receiver/Transmitter (UART). The circuitry needed to produce the voltages and currents needed by the particular interface type was outside the chip, so a UART could be used with either EIA or 20mA interfaces.
 
The complete circuitry needed to originate and interpret serial line signals, including the serial-parallel conversion, was implemented in one of the first [[MSI]] chips, the Universal Asynchronous Receiver/Transmitter (UART). The circuitry needed to produce the voltages and currents needed by the particular interface type was outside the chip, so a UART could be used with either EIA or 20mA interfaces.
 +
 +
==UART Buffers==
 +
With increased speeds, besides locking the DCE-DTE rate at 2x the communication rate, UART chips would need to increase their local buffer size to be able to send continuously. It did not help that a UART chip was released with a defective buffer, or that in some cases, the buffers would need to be enabled.
 +
 +
==References==
 +
[https://www.tldp.org/HOWTO/html_single/Serial-HOWTO/#ss23.1 Linux Serial how-to (extensive)]
 +
 +
  
 
[[Category: Communication Basics]]
 
[[Category: Communication Basics]]

Revision as of 22:06, 22 June 2020

Asynchronous serial lines were the most common interface to computers for many decades; originally they connected printing terminals like the Teletype, and later video terminals such as the VT100. In general, asynchronous serial line interfaces were bi-directional, using separate wires for each direction (although there are counter-examples, such as printers).

There were two different common electrical interface specifications, 20mA current loop serial line interface, and later EIA RS-232 serial line interface, but they both used the same logical interface protocol at a higher layer. EIA supported operation through modems, but 20ma was strictly for local devices.

There is no separate clock or other control signal; rather, the data stream itself has synchronization information, which marks the start and end of each character.

Transmission format

Characters are sent as sequence (see image, right) of up to four fields: a 1-bit start marker; 5-8 data bits; an optional parity bit; and a stop marker of 1, 1.5 or 2 bits. The speed, data size, and parity must be externally configured into the transmitter and receiver; the stop width is set in the former.

The line starts at idle; when a character is ready to be sent, one 'start' bit of space (confusingly, on an EIA interface, high voltage) marks the start of a character. The data is then sent, one bit at a time, least-significant-bit first. Finally, the appropriate number of 'stop' bits are sent as mark (low on an EIA interface). If no other characters are ready to be sent, the line is then left at idle (mark), otherwise the sending of the next character starts immediately, with another start bit.

Break

If the line is held in the 'space' state for longer than a character time, this is called a break condition, and it can be detected by the receiver and sent specially. This is often used to interrupt the computer on the other end of the line from the terminal.

RS-232 Standard and common settings

The RS-232 standard defines the two devices connected with a serial cable as the Data Terminal Equipment (DTE) and Data Circuit-Terminating Equipment (DCE). This terminology reflects the RS-232 origin as a standard for communication between a computer terminal and a modem.

Common settings with 8 data bits, no parity bit, and 1 stop bit, with the required start bit, which leads to a bit-packet of exactly 10 bits, which makes throughput calculations simple. ( bits-per-second/10 = Characters per second ).

Common settings for remote terminals was to force all caps, and only needing 5 bits per character, It was thought that it would speed throughput, but at such low data rates, the savings were not significant.

Speed would commonly be set at the fastest rate that did not have errors: Common for ttys: was 45, 90 and 120 baud. Common for VTD was 1200, 2400 and 4800, Later as communication chips improved, 9600, 14400 and 19200.

Most common speeds were Baud rate: 9600 or 115200.

Between DTE and DCE modems, you could lock the carrier rates, and increase the RS-232 rate at 2x the carrier rates, eliminating any bottle neck in the local circuitry.

UART

The complete circuitry needed to originate and interpret serial line signals, including the serial-parallel conversion, was implemented in one of the first MSI chips, the Universal Asynchronous Receiver/Transmitter (UART). The circuitry needed to produce the voltages and currents needed by the particular interface type was outside the chip, so a UART could be used with either EIA or 20mA interfaces.

UART Buffers

With increased speeds, besides locking the DCE-DTE rate at 2x the communication rate, UART chips would need to increase their local buffer size to be able to send continuously. It did not help that a UART chip was released with a defective buffer, or that in some cases, the buffers would need to be enabled.

References

Linux Serial how-to (extensive)