HT49C50
16
August 18, 1999
viced. Once the interrupt request flags (RTF,
TBF, T0F, T1F, EIF1, EIF0) are all set, they re-
main in the INTC1 or INTC0 respectively until
the interrupts are serviced or cleared by a soft-
ware instruction.
Itisrecommendedthataprogramnotusethe CALL
subroutine within the interrupt subroutine. Its
becauseinterruptsoftenoccurinanunpredictable
manner or require to be serviced immediately in
someapplications.Atthistime,ifonlyonestackis
left, and enabling the interrupt is not well con-
trolled, operation of the call in the interrupt
subroutine may damage the original control se-
quence.
Oscillator configuration
The HT49C50 provides two oscillator circuits
for system clocks, i.e., RC oscillator and crystal
oscillator, determined by mask option. No mat-
ter what type of oscillator is selected, the signal
is used for the system clock. The HALT mode
stops the system oscillator and ignores external
signal to conserve power.
Of the two oscillators, if the RC oscillator is
used, an external resistor between OSC1 and
VSS is required, and the range of the resistance
should be from 51k
to 1M . The system clock,
divided by 4, is available on OSC2 with
pull-high resistor, which can be used to syn-
chronize external logic. The RC oscillator pro-
vides the most cost effective solution. However,
the frequency of the oscillation may vary with
VDD, temperature, and the chip itself due to
process variations. It is therefore, not suitable
for timing sensitive operations where accurate
oscillator frequency is desired.
On the other hand, if the crystal oscillator is se-
lected, a crystal across OSC1 and OSC2 is
needed to provide the feedback and phase shift
required for the oscillator, and no other exter-
nal components are required. A resonator may
be connected between OSC1 and OSC2 to re-
place the crystal and to get a frequency refer-
ence, but two external capacitors in OSC1 and
OSC2 are required.
There is another oscillator circuit designed for
the real time clock. In this case, only the
32.768kHz crystal oscillator can be applied.
The crystal should be connected between OSC3
and OSC4, and two external capacitors along
with one external resistor are required for the
oscillator circuit in order to get a stable fre-
quency.
The RTC oscillator circuit can be controlled to
oscillate quickly by setting the QOSC bit (bit
4 of RTCC). It is recommended to turn on the
quick oscillating function upon power on, and
turn it off after 2 seconds.
The WDT oscillator is a free running on-chip
RC oscillator, and no external components are
required. Although the system enters the
power down mode, the system clock stops, and
the WDT oscillator still works with a period of
approximately 78 s. The WDT oscillator can be
disabled by mask option to conserve power.
'
$
RTC oscillator
1 + < + / < <
+ / < <
#
$
, & &
System oscillator