15. Combination of USART, SPI, and I2C (USI)
A96G150 User's manual
184
15.8.2
USIn UART transmitter flag and interrupt
The USART transmitter has two flags which indicate its state. One is USART data register empty flag
(DREn) and the other is transmit completion flag (TXCn). Both flags can be interrupt sources.
DREn flag indicates whether the transmit buffer is ready to receive new data. This bit is set when the
transmit buffer is empty and cleared when the transmit buffer contains data to be transmitted but has
not yet been moved into the shift register. And also this flag can be cleared by writing ‘0’ to this bit
position. Writing ‘1’ to this bit position is
prohibited.
When the data register empty interrupt enable (DRIEn) bit in USInCR2 register is set and the global
interrupt is enabled, USInST1 status register empty interrupt is generated while DREn flag is set.
The transmit complete (TXCn) flag bit is set when the entire frame in the transmit shift register has been
shifted out and there is no more data in the transmit buffer.
The TXCn flag is automatically cleared when the transmit complete interrupt serve routine is executed,
or it can be cleared by writing ‘0’ to
TXCn bit in USInST1 register.
When the transmit complete interrupt enable (TXCIEn) bit in USInCR2 register is set and the global
interrupt is enabled, UART transmit complete interrupt is generated while TXCn flag is set.
15.8.3
USIn UART parity generator
The parity generator calculates the parity bit for the serial frame data to be sent. When parity bit is
enabled (USInPM1=1), the transmitter control logic inserts the parity bit between the MSB and the first
stop bit of the frame to be sent.
15.8.4
USIn UART disabling transmitter
Disabling the transmitter by clearing the TXEn bit will not become effective until ongoing transmission
is completed. When the Transmitter is disabled, the TXDn pin can be used as a normal general purpose
I/O (GPIO).
Содержание 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...