English
Language : 

HT45R37_10 Datasheet, PDF (57/100 Pages) Holtek Semiconductor Inc – TinyPower C/R-F Type 8-Bit OTP MCU
HT45R37
fS Y S /4
32768H z
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
Time Base Interrupt
T im e B a s e In te r r u p t
2 12/fS ~ 2 15/fS
flows. When the interrupt is enabled, the stack is not full
and the Time Base overflows, a subroutine call to the
Multi-function Interrupt 1 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 MF1F 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 32768Hz
oscillator, the 32K_INT internal oscillator or the System
oscillator/4, the choice of which is determine by the fS
clock source configuration option.
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 1 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, MFIC0 and MFIC1 reg-
isters until the corresponding interrupt is serviced or un-
til the request flag is cleared by the application program.
Note that if a specific interrupt uses a Multi-function In-
terrupt vector then its interrupt request flag will not be
automatically reset when the program enters the inter-
rupt service routine. Only the Multi-function interrupt re-
quest flag will be automatically reset.
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.
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
Rev. 1.10
57
January 29, 2010