Rev. 1.20
140
�an�a�� 2�� 201�
Rev. 1.20
141
�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
LVD Interrupt
An LVD Interrupt request will take place when the LVD Interrupt request flag, LV
D
F, is set, which
occurs when the Low Voltage Detector function detects a low power supply voltage. To allow the
program to branch to its respective interrupt vector address, the global interrupt enable bit, EMI, and
Low Voltage Interrupt enable bit, LV
D
E, must first be set. When the interrupt is enabled, the stack is
not full and a low voltage condition occurs, a subroutine call to the LVD Interrupt vector, will take
place. When the Low Voltage Interrupt is serviced, the LVDF flag will be automatically cleared and
the EMI bit will be automatically cleared to disable other interrupts.
Touch Key Interrupt
For a Touch Key interrupt to occur, the global interrupt enable bit, EMI, and the Touch Key interrupt
enable TKME must be first set. An actual Touch Key interrupt will take place when the Touch Key
request flag. TKMF, is set, a situation that will occur when the time slot counter overflows. When
the interrupt is enabled, the stack is not full and the Touch Key time slot counter overflow occurs, a
subroutine call to the relevant timer interrupt vector, will take place. When the interrupt is serviced,
the Touch Key interrupt request flag, TKMF, will be automatically reset and the EMI bit will be
automatically cleared to disable other interrupts.
I
2
C Interrupt
A
n
I
2
C Interrupt request will take place when the I
2
C Interrupt request flag, IICF, is set, which occurs
when an address match occurs, or an I
2
C communication time-out occurs, or a byte of data has
been received or transmitted by the I
2
C interface. To allow the program to branch to its respective
interrupt vector address, the global interrupt enable bit, EMI, and the I
2
C Interface Interrupt
enable bit, IICE, must first be set. When the interrupt is enabled, the stack is not full and any these
conditions are created, a subroutine call to the respective interrupt vector, will take place. When the
I
2
C Interface Interrupt is serviced, the I
2
C interrupt request flag, IICF, will be automatically cleared
and the EMI bit will be automatically cleared to disable other interrupts.
UART Interrupt
Several individual UART conditions can generate a UART interrupt. When these conditions exist,
a low pulse will be generated to get the attention of the microcontroller. These conditions are a
transmitter data register empty, transmitter idle, receiver data available, receiver overrun, address
detect and an RX pin wake-up. To allow the program to branch to the respective interrupt vector
addresses, the global interrupt enable bit, EMI, and UART interrupt enable bit, UAR
T
E, must first
be set. When the interrupt is enabled, the stack is not full and any of these conditions are created,
a subroutine call to the UART Interrupt vector will take place. When the interrupt is serviced, the
UART Interrupt flag, UAR
T
F, will be automatically cleared. The EMI bit will also be automatically
cleared to disable other interrupts. However, the USR register flags will be cleared automatically
when certain actions are taken by the UART, the details of which are given in the UART section.
Содержание BS82B12A-3
Страница 33: ...Rev 1 20 33 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...
Страница 34: ...Rev 1 20 34 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...
Страница 35: ...Rev 1 20 35 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...