
Rev. 1.10
122
March 02, 2020
Rev. 1.10
123
March 02, 2020
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
the correct interrupt edge type must be selected using the INTEG register to enable the external
interrupt function and to choose the trigger edge type. As the external interrupt pin is pin-shared
with I/O pin, it can only be configured as external interrupt pin if its external interrupt enable bit
in the corresponding interrupt register has been set and the external interrupt pin is selected by the
corresponding pin-shared function selection bits. The pin must also be setup as an input by setting
the corresponding bit in the port control register.
When the interrupt is enabled, the stack is not full and the correct transition type appears on the
external interrupt pin, a subroutine call to the external interrupt vector, will take place. When the
interrupt is serviced, the external interrupt request flag, INTF, will be automatically reset and the
EMI bit will be automatically cleared to disable other interrupts. Note that any pull-high resistor
selections on the external interrupt pins will remain valid even if the pin is used as an external
interrupt input.
The INTEG register is used to select the type of active edge that will trigger the external interrupt.
A choice of either rising or falling or both edge types can be chosen to trigger an external interrupt.
Note that the INTEG register can also be used to disable the external interrupt function.
EEPROM Interrupt
The EEPROM Write Interrupt is an individual interrupt source with its own interrupt vector. An
EEPROM Write Interrupt request will take place when the EEPROM Write Interrupt request flag,
DEF, is set, which occurs when an EEPROM Write cycle ends. To allow the program to branch to
its respective interrupt vector address, the global interrupt enable bit, EMI, and EEPROM Write
Interrupt enable bit, DEE, must first be set. When the interrupt is enabled, the stack is not full and an
EEPROM Write cycle ends, a subroutine call to the respective interrupt vector will take place. When
the EEPROM Write Interrupt is serviced, the DEF flag will be automatically cleared and the EMI bit
will also be automatically cleared to disable other interrupts.
Timer/Event Counter Interrupt
An actual Timer/Event Counter interrupt will take place when the Timer/Event Counter request flag,
TF, is set, which occurs when the Timer/Event Counter overflows. To allow the program to branch
to its respective interrupt vector address, the global interrupt enable bit, EMI, and the Timer/Event
Counter Interrupt enable bit, TE, must first be set. When the interrupt is enabled, the stack is not
full and the Timer/Event Counter overflows, a subroutine call to its interrupt vector, will take place.
When the interrupt is serviced, the Timer/Event Counter Interrupt flag, TF, will be automatically
cleared. The EMI bit will also be automatically cleared to disable other interrupts.
I
2
C Interrupt
An I
2
C interrupt request will take place when the I
2
C Interrupt request flag, I2CF, is set, which
occurs when a byte of data has been received or transmitted by the I
2
C interface, or an I
2
C slave
address match occurs, or an I
2
C bus time-out occurs. To allow the program to branch to its respective
interrupt vector address, the global interrupt enable bit, EMI, and the Serial Interface Interrupt
enable bit, I2CE, must first be set. When the interrupt is enabled, the stack is not full and any of
the above described situations occurs, a subroutine call to the respective Interrupt vector, will take
place. When the interrupt is serviced, the Serial Interface Interrupt flag, I2CF, will be automatically
cleared. The EMI bit will also be automatically cleared to disable other interrupts.
Time Base Interrupt
The function of the Time Base Interrupt is to provide regular time signal in the form of an internal
interrupt. It is controlled by the overflow signals from their respective timer functions. When it