Asynchronous Serial Ports (UARTs)
13-8
Am186™CC/CH/CU Microcontrollers User’s Manual
13.5.2
Data
In asynchronous serial port communication, data is transmitted in
frames. Each frame
begins with a start bit (Low) and ends with one or two stop bits (High). After the start bit is
transmitted, the data bits are transmitted serially, least significant bit first. Data can be 7 or
8 bits, plus an optional address bit. For more information, see “Address Bits” on page 13-9.
The data bits may be followed by an optional parity bit. A parity bit ensures there is an even
or odd number of bits in the transmission. The UARTs support even, odd, or no parity.
Even
parity forces an even number of 1s in the data field by changing the parity bit as needed;
odd parity forces an odd number of 1s. Parity checking allows the detection of single bit
errors in each frame.
The UARTs also support transmission of either one or two stop bits. A second stop bit
increases the spacing between back-to-back serial frames and can be useful in reducing
frame errors due to clock frequency inconsistencies between devices. All these options are
configured by bits in the (H)SPCON0 register. The TXD line is always held High between
frames.
In asynchronous serial communication, an idle line can be differentiated from an active
receive line by the absence of start bits in the data stream. In other words, a transmission
of a data stream of FFh in N-8-1 mode (no parity, eight data bits, one stop bit) results in a
Low bit, the start bit, every tenth bit time. When the line is truly idle, there are no Low bits.
The UARTs set the IDLED bit in the (H)SPSTAT register when 40 bit times have elapsed
without a Low bit and there is unread data in the receiver.
Figure 13-2 shows the frame configuration and the bit stream sequence for the UARTs.
Figure 13-3 shows the timing for a transmission or a receive.
Figure 13-2
UARTs Frame
Figure 13-3
UARTs Timing
13.5.2.1
Data Overflow
The UART registers contain two bits to handle receiver overrun errors: OER and OERIM.
An
overrun error occurs when the serial port overwrites valid, unread data in the receive
data register or receive FIFO, resulting in a loss of data.
Stop
Bit
7 Data Bits
Optional
8th
Data Bit
Optional
Address Bit
Optional
Parity
Bit
Optional
2nd
Stop Bit
Start
Bit
Serial Clock
TXD or RXD
idle
0
1
0
1
1
0
0
idle
Asynchronous transmission of 03Ah as 8 bits of data (LSB first), even parity, one stop bit
1
stop
parity
start
asynchronous serial frame
serial data
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...