
Rev. 1.00
113 of ���
�an�a�� 1�� �01�
Standard 8051 8-Bit Flash MCU
HT85F2260/HT85F2270/HT85F2280
Interrupts
Interrupts
A/D Converter Interrupt
The A/D Converter Interrupt is controlled by the termination of an A/D conversion process. An
A/D Converter Interrupt request will take place when the A/D Converter Interrupt request flag,
IADC, is set, which occurs when the A/D conversion process finishes. To allow the program to
branch to its respective interrupt vector address, the global interrupt enable bit, EAL, and A/D
Interrupt enable bit, EADC, must first be set. When the interrupt is enabled, the stack is not full
and the A/D conversion process has ended, a subroutine call to the A/D Converter Interrupt vector,
will take place. When the interrupt is serviced, the A/D Converter Interrupt flag, IADC, will be
automatically cleared. The EAL bit must be cleared by the application program to disable other
interrupts.
Timer/Counter Interrupt
For a Timer Counter interrupt to occur, the global interrupt enable bit, EAL, and the corresponding
timer interrupt enable bit, ETn, must first be set. An actual Timer Counter interrupt will take place
when the Timer Counter request flag, TFn, is set, a situation that will occur when the relevant
Timer Counter overflows. When the interrupt is enabled, the stack is not full and a Timer Counter
n overflow occurs, a subroutine call to the relevant timer interrupt vector, will take place. When the
interrupt is serviced, the timer interrupt request flag, TFn (n=0, 1, 3), will be automatically reset,
while the TF2 bit must be cleared by the application program, and the EAL bit must also be cleared
using the application program to disable other interrupts.
Time Base Interrupts
The function of the Time Base Interrupt is to provide a regular time signal in the form of an
internal interrupt. It is basically a simple timer whose interrupt is generated when it overflows.
When this happen its respective interrupt request flag, TBF will be set. To allow the program to
branch to its respective interrupt vector address, the global interrupt enable bit, EAL and Time
Base enable bit, ETB, must first be set. When the interrupt is enabled, the stack is not full and the
Time Base overflows, a subroutine call to its respective vector locations will take place. When the
interrupt is serviced, the respective interrupt request flag, TBF, will be automatically reset but the
EAL bit must be cleared by the application program to disable other interrupts.
The purpose of the Time Base Interrupt is to provide an interrupt signal at fixed time periods. Their
clock sources originate from the internal clock source f
TBC
. This f
TBC
input clock passes through a
divider, the division ratio of which is selected by programming the appropriate bits in the TBCR
register to obtain longer interrupt periods. The clock source that generates f
TBC
, which in turn controls
the Time Base interrupt period, can originate from the system clock, LIRC or LXT oscillator.
Time Base Inte���pt
f
TBC
÷
�
8
~�
1�
f
SYS
/4
TBCK[1:0]
TBS[�:0]
f
3�K
f
SYS
/1�8
M
U
X
Time Base Clock Source Select