
Rev. 1.10
126
March 02, 2020
Rev. 1.10
127
March 02, 2020
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
service routine is executed, as only the Multi-function interrupt request flags, MFnF, will be
automatically cleared, the individual request flag for the function needs to be cleared by the
application program.
It is recommended that programs do not use the “CALL” instruction within the interrupt service
subroutine. Interrupts often occur in an unpredictable manner or need to be serviced immediately.
If only one stack is left and the interrupt is not well controlled, the original control sequence will be
damaged once a CALL subroutine is executed in the interrupt subroutine.
Every interrupt has the capability of waking up the microcontroller when it is in the SLEEP or IDLE
Mode, the wake up being generated when the interrupt request flag changes from low to high. If it is
required to prevent a certain interrupt from waking up the microcontroller, then its respective request
flag should be first set high before enter SLEEP or IDLE Mode.
As only the Program Counter is pushed onto the stack, then when the interrupt is serviced, if the
contents of the accumulator, status register or other registers are altered by the interrupt service
program, their contents should be saved to the memory at the beginning of the interrupt service
routine.
To return from an interrupt subroutine, either a RET or RETI instruction may be executed. The RETI
instruction in addition to executing a return to the main program also automatically sets the EMI
bit high to allow further interrupts. The RET instruction however only executes a return to the main
program leaving the EMI bit in its present zero state and therefore disabling the execution of further
interrupts.
Configuration Options – BS83B04L
Configuration options refer to certain options within the BS83B04L that are programmed into the
device during the programming process. During the development process, these options are selected
using the HT-IDE software development tools. As these options are programmed into the device
using the hardware programming tools, once they are selected they cannot be changed later using
the application program. All options must be defined for proper system function, the details of which
are shown in the table.
No.
Options
Oscillator Option
1
HIRC frequency selection – f
HIRC
:
2MHz, 4MHz or 8MHz
Note: When the HIRC has been configured at a frequency shown in this table, the HIRC1~HIRC0
bits should also be setup to select the same frequency to achieve the HIRC frequency accuracy
specified in the A.C. Characteristics.