USCI Operation: UART Mode
19-5
Universal Serial Communication Interface, UART Mode
19.3 USCI Operation: UART Mode
In UART mode, the USCI transmits and receives characters at a bit rate
asynchronous to another device. Timing for each character is based on the
selected baud rate of the USCI. The transmit and receive functions use the
same baud rate frequency.
19.3.1 USCI Initialization and Reset
The USCI is reset by a PUC or by setting the UCSWRST bit. After a PUC, the
UCSWRST bit is automatically set, keeping the USCI in a reset condition.
When set, the UCSWRST bit resets the UCAxRXIE, UCAxTXIE, UCAxRXIFG,
UCRXERR, UCBRK, UCPE, UCOE, UCFE, UCSTOE and UCBTOE bits and
sets the UCAxTXIFG bit. Clearing UCSWRST releases the USCI for
operation.
Note: Initializing or Re-Configuring the USCI Module
The recommended USCI initialization/re-configuration process is:
1) Set UCSWRST (
BIS.B #UCSWRST,&UCAxCTL1
)
2) Initialize all USCI registers with UCSWRST = 1 (including UCAxCTL1)
3) Configure ports.
4) Clear UCSWRST via software (
BIC.B #UCSWRST,&UCAxCTL1
)
5) Enable interrupts (optional) via UCAxRXIE and/or UCAxTXIE
19.3.2 Character Format
The UART character format, shown in Figure 19−2, consists of a start bit,
seven or eight data bits, an even/odd/no parity bit, an address bit (address-bit
mode), and one or two stop bits. The UCMSB bit controls the direction of the
transfer and selects LSB or MSB first. LSB-first is typically required for UART
communication.
Figure 19−2. Character Format
[Parity Bit, UCPEN = 1]
[Address Bit, UCMODEx = 10]
Mark
Space
D0
D6
D7
AD
PA
SP
SP
[Optional Bit, Condition]
[2nd Stop Bit, UCSPB = 1]
[8th Data Bit, UC7BIT = 0]
ST
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...