Synchronous communication sends data blocks at strictly timed intervals that are monitored at both ends. Modems operating at speeds up to 56 Kbps over standard telephone audio lines are usually synchronous devices.
Many protocols are used for PC-to-PC modem communication. Kermit, Xmodem, Ymodem, and Zmodem are four common ones. The following is a summary of how these protocols work:
Before a modem sends any data, a communication link must be established. To do this, the modem sends a series of standardized bytes-called sync bytes-to the device it is to communicate with.
The modem on the other end receives the sync bytes.
The receiving modem perceives that it is receiving sync-byte data and synchronizes with the incoming data.
After sending the sync bytes, the sending modem adds a start-of-text (STX) character.
The data bytes are sent. The data in synchronous transmission is processed in packets or in blocks of fixed length, depending on the protocol used.
Each packet ends with an end-of-text (ETX) character and two error-checking characters called CRC (cyclical redundancy check) characters or BCCs (block check characters).
The receiver then responds with an ACK-acknowledgment character-if the data is good, or a NAK-negative acknowledgment-if transmission errors have occurred.
In asynchronous communication, the receiving modem does not respond-it just reads the data and acts on it-unless a timing error is reported. In synchronous modes the receiving modem must respond.
Asynchronous communication packets have an optional parity bit that is used for error detection. The parity bit is used by the receiving port to verify whether the data is intact or has been corrupted. There are two types of parity:
Even parity: The sending computer counts the 1s in the data part of the packet; if the number of 1s is even, the parity bit is 0-this makes the total number of bits even. If the number of 1s in the data part of the packet is odd, the parity bit is set to 1-again making the total number of bits even. The receiving port counts the data bits and compares its answer to the parity bit. If the two fail to match, an error is reported, and a request to retransmit the packet is passed to the sending computer.
Odd parity: This works in exactly the same way as even parity, except that the total number of bits must be odd.
The use of parity bits is optional. The quality of data transmission and telephone lines has improved to the extent that parity bits are no longer required. However, if data accuracy is critical and/or telephone-line quality is questionable, use parity.
Now that we've seen how modems send and receive data, we examine the hardware involved.
The entire modem and even its serial port can be accommodated on a single expansion card. This configuration offers lower cost than that of an external modem, but is more prone to compatibility problems with either the on-board UART or the COM port IRQs.