![](http://datasheet.mmic.net.cn/Renesas-Electronics-America/UPD78F0394GC-8EA-A_datasheet_99854/UPD78F0394GC-8EA-A_142.png)
CHAPTER 6 CLOCK GENERATOR
User’s Manual U17473EJ2V0UD
140
(2) Example of setting procedure when using the external main system clock
<1> Setting frequency (OSCCTL register)
Using AMPH, set the frequency to be used.
AMPH
Note
Operating Frequency Control
0
1 MHz
≤ fXH ≤ 10 MHz
1
10 MHz < fXH
≤ 20 MHz
Note
Set AMPH before setting the peripheral functions after a reset release. The value of AMPH can
be changed only once after a reset release. The clock supply to the CPU is stopped for the
duration of 160 external clocks after AMPH is set to 1.
Remark
fXH: High-speed system clock oscillation frequency
<2> Setting P121/X1 and P122/X2/EXCLK pins and selecting operation mode (OSCCTL register)
When EXCLK and OSCSEL are set to 1, the mode is switched from port mode to external clock input
mode.
EXCLK
OSCSEL
Operation Mode of High-
Speed System Clock Pin
P121/X1 Pin
P122/X2/EXCLK Pin
1
External clock input mode
I/O port
External clock input
<3> Controlling external main system clock input (MOC register)
When MSTOP is cleared to 0, the input of the external main system clock is enabled.
Cautions 1. Do not change the value of EXCLK and OSCSEL while the external main system clock is
operating.
2. Set the external main system clock after the supply voltage has reached the operable
voltage of the clock to be used (see CHAPTER 30 ELECTRICAL SPECIFICATIONS).
(3) Example of setting procedure when using high-speed system clock as CPU clock and peripheral
hardware clock
<1> Setting high-speed system clock oscillation
Note
(See 6.6.1 (1) Example of setting procedure when oscillating the X1 clock and (2) Example of
setting procedure when using the external main system clock.)
Note The setting of <1> is not necessary when high-speed system clock is already operating.
<2> Setting the high-speed system clock as the main system clock (MCM register)
When XSEL and MCM0 are set to 1, the high-speed system clock is supplied as the main system clock
and peripheral hardware clock.
Selection of Main System Clock and Clock Supplied to Peripheral Hardware
XSEL
MCM0
Main System Clock (fXP)
Peripheral Hardware Clock (fPRS)
1
High-speed system clock (fXH)
Caution If the high-speed system clock is selected as the main system clock, a clock other than
the high-speed system clock cannot be set as the peripheral hardware clock.
<R>