Rev. 1.20
1�0
�an�a�� 2�� 201�
Rev. 1.20
1�1
�an�a�� 2�� 201�
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
Note that the USR register flags are read only and cannot be cleared or set by the application
program, neither will they be cleared when the program jumps to the corresponding interrupt
servicing routine, as is the case for some of the other interrupts. The flags will be cleared
automatically when certain actions are taken by the UART, the details of which are given in the
UART register section. The overall UART interrupt can be disabled or enabled by the related
interrupt enable control bits in the interrupt control registers of the microcontroller to decide whether
the interrupt requested by the UART module is masked out or allowed.
T�ansmitte� Empt�
Flag TXIF
USR Registe�
T�ansmitte� Idle
Flag TIDLE
Receive� Ove���n
Flag OERR
Receive� Data
Available RXIF
ADDEN
RX Pin
Wake-�p
WAKE
0
1
0
1
0
1
RX7 if BNO=0
RX8 if BNO=1
UCR2 Registe�
OR
RIE
0
1
TIIE
0
1
TEIE
0
1
UART Inte���pt
Req�est Flag
UARTF
UCR2 Registe�
UARTE
INTC2
Registe�
EMI
INTC0
Registe�
UART Interrupt Scheme
Address Detect Mode
Setting the Address Detect Mode bit, ADDEN, in the UCR2 register, enables this special mode.
If this bit is enabled then an additional qualifier will be placed on the generation of a Receiver
Data Available interrupt, which is requested by the RXIF flag. If the ADDEN bit is "
1
", then when
data is available, an interrupt will only be generated, if the highest received bit has a high value.
Note that the related interrupt enable control bit and the EMI bit must also be enabled for correct
interrupt generation. This highest address bit is the 9th bit if BNO bit is
"1
" or the 8th bit if BNO
bit is
"
0". If this bit is high, then the received word will be defined as an address rather than data. A
Data Available interrupt will be generated every time the last bit of the received word is set. If the
ADDEN bit is "0", then a Receiver Data Available interrupt will be generated each time the RXIF
flag is set, irrespective of the data last bit status. The address detect mode and parity enable are
mutually exclusive functions. Therefore if the address detect mode is enabled, then to ensure correct
operation, the parity function should be disabled by resetting the parity enable bit PREN to zero.
ADDEN
Bit 9 if BNO=1, Bit 8 if BNO=0
UART Interrupt Generated
0
0
√
1
√
1
0
×
1
√
ADDEN Bit Function