XC886/888CLM
Serial Interfaces
User’s Manual
12-3
V1.3, 2010-02
Serial Interfaces, V 1.0
Reception is started by the condition REN = 1 and RI = 0. At the start of the reception
cycle, 11111110
B
is written to the receive shift register. In each machine cycle that
follows, the contents of the shift register are shifted left one position and the value
sampled on the RXD line in the same machine cycle is shifted in from the right. When
the 0 of the initial byte reaches the leftmost position, the control block executes one last
shift, loads SBUF and sets the RI bit.
The baud rate for the transfer is fixed at
f
PCLK
/2 where
f
PCLK
is the input clock frequency,
i.e. one bit per machine cycle.
12.1.1.2
Mode 1, 8-Bit UART, Variable Baud Rate
In mode 1, the UART behaves as an 8-bit serial port. A start bit (0), 8 data bits, and a
stop bit (1) are transmitted on TXD or received on RXD at a variable baud rate.
The transmission cycle is activated by a write to SBUF. The data is transferred to the
transmit register and a 1 is loaded to the 9th bit position (as in mode 0). At phase 1 of
the machine cycle after the next rollover in the divide-by-16 counter, the start bit is copied
to TXD, and data is activated one bit time later. One bit time after the data is activated,
the data starts getting shifted right with zeros shifted in from the left. When the MSB gets
to the output position, the control block executes one last shift and sets the TI bit.
Reception is started by a high to low transition on RXD (sampled at 16 times the baud
rate). The divide-by-16 counter is then reset and 1111 1111
B
is written to the receive
register. If a valid start bit (0) is then detected (based on two out of three samples), it is
shifted into the register followed by 8 data bits. If the transition is not followed by a valid
start bit, the controller goes back to looking for a high to low transition on RXD. When the
start bit reaches the leftmost position, the control block executes one last shift, then
loads SBUF with the 8 data bits, loads RB8 (SCON.2) with the stop bit, and sets the
RI bit, provided RI = 0, and either SM2 = 0 (see
) or the received stop
bit = 1. If none of these conditions is met, the received byte is lost.
The associated timings for transmit/receive in mode 1 are illustrated in
*
Содержание XC886CLM
Страница 1: ...User s Manual V1 3 2010 02 Microcontrollers 8 Bit XC886 888CLM 8 Bit Single Chip Microcontroller...
Страница 3: ...User s Manual V1 3 2010 02 Microcontrollers 8 Bit XC886 888CLM 8 Bit Single Chip Microcontroller...
Страница 324: ...XC886 888CLM Serial Interfaces User s Manual 12 52 V1 3 2010 02 Serial Interfaces V 1 0...
Страница 663: ...w w w i n f i n e o n c o m Published by Infineon Technologies AG...