A96G150 User's manual
15. Combination of USART, SPI, and I2C (USI)
183
15.7
USIn UART parity bit
Parity bit is calculated by doing an exclusive-OR of all the data bits. If odd parity is used, result of the
exclusive-OR is inverted. The parity bit is located between the MSB and the first stop bit of a serial
frame.
P
even
= Dn-
1 ^ … ^ D3 ^ D2 ^ D1 ^ D0 ^ 0
P
odd
= Dn-1 ^
… ^ D3 ^ D2 ^ D1 ^ D0 ^ 1
P
even
: Parity bit using even parity
P
odd
: Parity bit using odd parity
D
n
: Data bit n of the character
15.8
USIn UART transmitter
The UART transmitter is enabled by setting the TXEn bit in USInCR2 register. When the Transmitter is
enabled, the TXDn pin should be set to TXDn function for the serial output pin of UART by the
P1FSRL[7:6], P2FSRL[3:2] and P2FSRL[7:6].The baud-rate, operation mode and frame format must
be set up once before doing any transmission. In synchronous operation mode, the SCKn pin is used
as transmission clock, so it should be selected to do SCKn function by P1FSRH[7:6], P1FSRL[5:4] and
P2FSRH[1:0].
15.8.1
USIn UART sending TX data
A data transmission is initiated by loading the transmit buffer (USInDRregister I/O location) with the
data to be transmitted. The data be written in transmit buffer is moved to the shift register when the shift
register is ready to send a new frame. The shift register is loaded with the new data if it is in idle state
or immediately after the last stop bit of the previous frame is transmitted. When the shift register is
loaded with new data, it will transfer one complete frame according to the settings of control registers.
If the 9-bit characters are used in asynchronous or synchronous operation mode, the ninth bit must be
written to the USInTX8 bit in USInCR3 register before it is loaded to the transmit buffer (USInDR
register).
Содержание A96G150
Страница 126: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 126 Figure 43 16 bit Timer Counter Mode Operation Example...
Страница 136: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 136 Figure 51 16 bit Timer Counter Mode Operation Example...
Страница 147: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 147 Figure 59 16 bit Timer Counter Mode Operation Example...
Страница 157: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 157 Figure 67 16 bit Timer Counter Mode Operation Example...
Страница 171: ...A96G150 User s manual 14 12 bit ADC 171 Figure 79 ADC Operation Flow Sequence...
Страница 333: ...A96G150 User s manual Revision history 333 Revision history Revision Date Notes 1 00 2022 06 22 First creation...