HT46R01/HT46R02/HT46R03
Oscillator
Various oscillator options offer the user a wide range of
functions according to their various application require-
ments. Four types of system clocks can be selected
while various clock source options for the Watchdog
Timer are provided for maximum flexibility. All oscillator
options are selected through the configuration options.
to the Appendix section for typical RC Oscillator vs.
Temperature and VDD characteristics graphics. Note
that only the OSC1 pin is used, which is shared with I/O
pin PA6, leaving pin PA5 free for use as a normal I/O
pin.
V
D
D
System Clock Configurations
R
O
S
C
There are four methods of generating the system clock,
using an external crystal/ceramic oscillator, an external
RC network, an internal RC clock source and a com-
bined internal RC clock source and Real Time Clock.
One of these four methods must be selected using the
configuration options.
O
S
C
1
4
7
0
p
F
O
S
C
2
S
Y
S
RC Oscillator
System Crystal/Ceramic Oscillator
After selecting the correct oscillator configuration op-
tion, for most crystal oscillator configurations, the simple
connection of a crystal across OSC1 and OSC2 will cre-
ate the necessary phase shift and feedback for oscilla-
tion, without requiring external capacitors. However, for
some crystal types and frequencies, to ensure oscilla-
tion, it may be necessary to add two small value capaci-
tors, C1 and C2. Using a ceramic resonator will usually
require two small value capacitors, C1 and C2, to be
connected as shown for oscillation to occur. The values
of C1 and C2 should be selected in consultation with the
crystal or resonator manufacturer¢s specification. In
most applications, resistor R1 is not required, however
for those applications where the LVR function is not
used, R1 may be necessary to ensure the oscillator
stops running when VDD falls below its operating range.
Internal System RC Oscillator
In addition to the external crystal/resonator or external
RC system clock configurations, the devices also in-
clude an internal RC oscillator. The internal oscillator
has three fixed frequencies of either 4MHz, 8MHz or
12MHz, the choice of which is indicated by the suffix
marking next to the part number of the device used. This
oscillator is fully integrated within the microcontroller
and requires no external components. Note that if this
internal system clock option is selected, as it requires no
external pins for its operation, I/O pins PA5 and PA6 are
free for use as normal I/O pins.
P
P
A
A
5
6
I
n
t
e
r
n
a
l
R
C
O
s
c
i
l
l
a
t
o
r
C
1
O
S
C
1
·
I
n
t
e
r
n
a
l
R
C
S
y
s
t
e
m
O
s
c
i
l
l
a
t
o
r
R
1
·
P
A
5
/
P
A
6
u
s
e
d
a
s
n
o
r
m
a
l
I
/
O
s
O
S
C
2
C
2
Internal System RC Oscillator with RTC
Crystal/Ceramic Oscillator
When the microcontroller enters the Power Down Mode,
the system clock is switched off to stop microcontroller
activity and to conserve power. However, in many
microcontroller applications it may be necessary to keep
the internal timers operational even when the
microcontroller is in the Power Down Mode. To do this,
another clock, independent of the system clock, must be
provided. To do this a configuration option exists to allow
the Internal System RC Oscillator to be used in conjunc-
tion with an Real Time Clock, RTC, oscillator. Here the
OSC1 and OSC2 pins, which are shared with I/O pins
PA6 and PA5 should be connected to a 32768Hz crystal
to implement this internal RTC oscillator. Additionally a
10pf capacitor should be connected between OSC1 and
ground.
More information regarding the oscillator is located in
Application Note HA0075E on the Holtek website.
External System RC Oscillator
After selecting the correct configuration option, using
the external system RC oscillator requires that a resis-
tor, with a value between 24kW and 1.5MW, is con-
nected between OSC1 and VDD, and a 470pF capacitor
is connected to ground. Although this is a cost effective
oscillator configuration, the oscillation frequency can
vary with VDD, temperature and process variations and
is therefore not suitable for applications where timing is
critical or where accurate oscillator frequencies are re-
quired. For the value of the external resistor ROSC refer
Rev. 1.00
41
September 21, 2007