Rev. 1.20
1�6
�an�a�� 2�� 201�
Rev. 1.20
1�7
�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
INT Pin
To�ch Ke� Mod�le
INTF
TKMF
INTE
TKME
EMI
04H
EMI
24H
28H
Inte���pt
Name
Req�est
Flags
Enable
Bits
Maste�
Enable
Vecto�
EMI a�to disabled in ISR
P�io�it�
High
Low
CTM0 A
CTMA0F
CTMA0E
xxE
Enable Bits
xxF
Req�est Flag� a�to �eset in ISR
Legend
EMI
08H
I
2
C
IICF
IICE
EMI
10H
EMI
14H
Time Base 1
TB1F
TB1E
Time Base 0
TB0F
TB0E
EMI
0CH
EEPROM
DEF
DEE
EMI
18H
1CH
CTM0 P
CTMP0F
CTMP0E
EMI
20H
PTM0 P
PTMP0F
PTMP0E
EMI
PTM0 A
PTMA0F
PTMA0E
EMI
EMI
2CH
UART
UARTF
UARTE
EMI
�0H
LVD
LVDF
LVDE
Interrupt Structure
External Interrupt
The external interrupt is controlled by signal transitions on the pin INT. An external interrupt
request will take place when the external interrupt request flag, INTF, is set, which will occur
when a transition, whose type is chosen by the edge select bits, appears on the external interrupt
pin. To allow the program to branch to its respective interrupt vector address, the global interrupt
enable bit, EMI, and respective external interrupt enable bit, INTE, must first be set. Additionally
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. 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 pin 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.
Содержание 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 ...