HT56R66 Holtek Semiconductor Inc., HT56R66 Datasheet - Page 72

no-image

HT56R66

Manufacturer Part Number
HT56R66
Description
Tinypower Tm A/d Type With Lcd 8-bit Otp Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
Multi-function Interrupt
An additional interrupt known as the Multi-function inter-
rupt is provided. Unlike the other interrupts, this interrupt
has no independent source, but rather is formed from
four or five other existing interrupt sources, namely the
A/D Converter interrupt, Time Base interrupt, Real Time
Clock interrupt, External Peripheral interrupt, the Timer
2 and Timer 3 overflow interrupt.
For a Multi-function interrupt to occur, the global interrupt
enable bit, EMI, and the Multi-function interrupt enable
bit, EMFI, must first be set. An actual Multi-function inter-
rupt will take place when the Multi-function interrupt re-
quest flag, MFF, is set. This will occur when either a Time
Base overflow, a Real Time Clock overflow, an A/D con-
version completion, an External Peripheral Interrupt, a
Timer 2 or a Timer 3 overflow interrupt is generated.
When the interrupt is enabled and the stack is not full,
and either one of the interrupts contained within the
Multi-function interrupt occurs, a subroutine call to the
Multi-function interrupt vector at location 018H will take
place. When the interrupt is serviced, the Multi-Function
request flag, MFF, will be automatically reset and the EMI
bit will be automatically cleared to disable other inter-
rupts. However, it must be noted that the request flags
from the original source of the Multi-function interrupt,
namely the Time-Base interrupt, Real Time Clock inter-
rupt, A/D Converter interrupt, External Peripheral inter-
rupt, Timer 2 or Timer 3 overflow interrupt will not be
automatically reset and must be manually reset by the
application program.
Rev. 1.10
Real Time Clock Control Register - RTCC
RTC Interrupt
72
Real Time Clock Interrupt
The Real Time Clock Interrupt is contained within the
Multi-function Interrupt.
For a Real Time Clock interrupt to be generated, the
global interrupt enable bit, EMI , Real Time Clock inter-
rupt enable bit, ERTI, and Multi-function interrupt enable
bit, EMFI, must first be set. An actual Real Time Clock
interrupt will take place when the Real Time Clock re-
quest flag, RTF, is set, a situation that will occur when
the Real Time Clock overflows. When the interrupt is en-
abled, the stack is not full and the Real Time Clock over-
flows, a subroutine call to the Multi-function interrupt
vector at location18H, will take place. When the Real
Time Clock interrupt is serviced, the EMI bit will be
cleared to disable other interrupts, however only the
MFF interrupt request flag will be reset. As the RTF flag
will not be automatically reset, it has to be cleared by the
application program.
Similar in operation to the Time Base interrupt, the pur-
pose of the RTC interrupt is also to provide an interrupt
signal at fixed time periods. The RTC interrupt clock
source originates from the internal clock source f
f
ratio of which is selected by programming the appropri-
ate bits in the RTCC register to obtain longer RTC inter-
rupt periods whose value ranges from 2
clock source that generates f
RTC interrupt period, can originate from three different
sources, the 32768Hz oscillator, 32K_INT oscillator or
S
input clock first passes through a divider, the division
HT56R66/HT56R666
S
, which in turn controls the
September 8, 2009
8
/f
S
~2
15
/f
S
S
. This
. The

Related parts for HT56R66