English
Language : 

HT56R64 Datasheet, PDF (61/90 Pages) Holtek Semiconductor Inc – TinyPower A/D Type with LCD 8-Bit OTP MCU
HT56R64
b7
b0
L V D O Q O S C L V D C R T 2 R T 1 R T 0 R T C C R e g is te r
R T C In te r r u p t P e r io d
R T2 R T1 R T0
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
P e r io d
2 8/fS
2 9/fS
2 10/fS
2 11/fS
2 12/fS
2 13/fS
2 14/fS
2 15/fS
L o w V o lta g e D e te c to r C o n tr o l
1 : e n a b le
0 : d is a b le
R T C O s c illa to r Q u ic k - s ta r t
1 : d is a b le
0 : e n a b le
L o w V o lta g e D e te c to r O u tp u t
1 : lo w v o lta g e d e te c te d
0 : n o r m a l v o lta g e
N o t im p le m e n te d , r e a d a s " 0 "
Real Time Clock Control Register - RTCC
Time Base Interrupt
source configuration option.
The Time Base Interrupt is contained within the
Multi-function Interrupt.
For a Time Base Interrupt to be generated, the global in-
terrupt enable bit, EMI,Time Base Interrupt enable bit,
ETBI, and Multi-function interrupt enable bit, EMFI,
must first be set. An actual Time Base Interrupt will take
place when the Time Base Interrupt request flag, TBF, is
set, a situation that will occur when the Time Base over-
flows. When the interrupt is enabled, the stack is not full
and the Time Base overflows, a subroutine call to the
Multi-function interrupt vector at location18H, will take
place. When the Time Base Interrupt is serviced, the
EMI bit will be cleared to disable other interrupts, how-
ever only the MFF interrupt request flag will be reset. As
the TBF flag will not be automatically reset, it has to be
cleared by the application program.
The purpose of the Time Base function is to provide an
interrupt signal at fixed time periods. The Time Base in-
terrupt clock source originates from the Time Base inter-
rupt clock source originates from the internal clock
source fS. This fS input clock first passes through a di-
vider, the division ratio of which is selected by configura-
tion options to provide longer Time Base interrupt
periods. The Time Base interrupt time-out period ranges
from 212/fS~215/fS. The clock source that generates fS,
which in turn controls the Time Base interrupt period,
can originate from three different sources, the RTC os-
cillator, the 32K_INT internal oscillator or the System os-
cillator/4, the choice of which is determine by the fS clock
Essentially operating as a programmable timer, when
the Time Base overflows it will set a Time Base interrupt
flag which will in turn generate an Interrupt request via
the Multi-function Interrupt vector.
Programming Considerations
By disabling the interrupt enable bits, a requested inter-
rupt can be prevented from being serviced, however,
once an interrupt request flag is set, it will remain in this
condition in the INTC0, INTC1 and MFIC registers until
the corresponding interrupt is serviced or until the re-
quest flag is cleared by the application program.
It is recommended that programs do not use the ²CALL
subroutine² instruction within the interrupt subroutine.
Interrupts often occur in an unpredictable manner or
need to be serviced immediately in some applications. If
only one stack is left and the interrupt is not well con-
trolled, the original control sequence will be damaged
once a ²CALL subroutine² is executed in the interrupt
subroutine.
All of these interrupts have the capability of waking up
the processor when in the Power Down Mode.
Only the Program Counter is pushed onto the stack. If
the contents of the status or other registers are altered
by the interrupt service program, which may corrupt the
desired control sequence, then the contents should be
saved in advance.
fS Y S /4
fR T C
3 2 K _ IN T
fS S o u rc e
C o n fig u r a tio n
O p tio n
fS
C o n fig u r a tio n O p tio n
D iv id e b y 2 1 2 ~ 2 1 5
T im e B a s e In te r r u p t
2 12/fS ~ 2 15/fS
Time Base Interrupt
Rev. 1.40
61
September 8, 2009