Serial Communications Overview
12-6
Am186™CC/CH/CU Microcontrollers User’s Manual
12.3
SERIAL COMMUNICATIONS INTRODUCTION
In
serial communications, one data bit at a time is transmitted through a single wire or
communication channel. Because a processor data bus uses
parallel communications
(more than one data bit is transmitted at the same time through more than one wire), the
communications channel must convert data to serial at the transmitter and then back to
parallel at the receiver. In addition, the timing of long streams of bits must be the same for
the transmitter and the receiver, or errors result.
12.3.1
Asynchronous and Synchronous Communications
In
asynchronous serial communications, the receiver and transmitter have independent
clocks. Synchronization problems are avoided by not sending long, uninterrupted streams
of bits. Instead, data bits are transmitted one character at a time. Each
character can be
from four to nine data bits, and is preceded by a start bit and followed by a stop bit. The
start bit, character, and stop bit together are called a
frame. Asynchronous communication
does not require continuous data so timing must only be maintained within each character;
the receiver can resynchronize between frames. In addition, frames can be sequenced to
form packets of data.
In
synchronous serial communications, timing is determined by transmitting a clock signal
along with the data. The channel transmits blocks of bits or characters without a start or a
stop bit; the clock ensures the transmitter and receiver are synchronized. While this
addresses the timing problem, the receiver must also be able to determine the beginning
and end of a block of data. To achieve this, each block of data has some start and end bits.
Other control information may be included. The data plus the control information is called
a
frame. The start-bit and end-bit patterns vary based on the protocol, and are sometimes
called
preamble and postamble bits, or flags.
Asynchronous communications is simpler to use but has a higher overhead than
synchronous communications, and as such is better suited for small blocks of data that
transmit in bursts (e.g., a keyboard or terminal). Synchronous communications is better
suited for continuous large data blocks and higher speeds (e.g., HDLC frames), as many
bytes of data are sent without overhead.
12.3.2
Hardware Flow Control
Both synchronous and asynchronous communications can have problems when a
transmitter sends the data faster than the receiver is ready for it. Typically, a receiver
allocates a data buffer with a certain length. After the data is processed, the receiver clears
the buffer so it can receive more data. However, the receiver buffer can overflow if new data
is received before the last received data is read.
Hardware flow control is a method to
eliminate the possibility of overrun errors. The Am186CC/CH/CU microcontrollers support
the clear-to-send/ready-to-receive (CTS/RTR) protocol on the UART and High-Speed
UART.
The Am186CC and Am186CH microcontrollers also support the clear-to-send/ready-to-
receive (CTS/RTR) protocol on the HDLC ports.
The CTS/RTR protocol is a symmetrical interface between two serial ports, and provides
flow control when both ports are sending and receiving data, as shown in Figure 12-5.
CH
CC
Summary of Contents for Am186 CC
Page 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Page 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Page 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Page 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Page 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Page 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Page 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Page 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Page 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Page 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Page 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Page 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Page 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Page 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Page 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Page 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Page 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...