Controlling Clock; Controlling High-Speed System Clock - NEC 78K0 Series User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0 Series:
Table of Contents

Advertisement

Remark While the microcontroller is operating, a clock that is not used as the CPU clock can be stopped via
software settings.
stopped by executing the STOP instruction (see (4) in 6.6.1 Example of controlling high-speed
system clock, (3) in 6.6.2 Example of controlling internal high-speed oscillation clock, and (4) in
6.6.3 Example of controlling subsystem clock).

6.6 Controlling Clock

6.6.1 Controlling high-speed system clock

The following two types of high-speed system clocks are available.
• X1 clock:
• External main system clock: External clock is input to the EXCLK pin.
When the high-speed system clock is not used, the X1/P121 and X2/EXCLK/P122 pins can be used as I/O port
pins.
Caution The X1/P121 and X2/EXCLK/P122 pins are in the I/O port mode after a reset release.
The following describes examples of setting procedures for the following cases.
(1) When oscillating X1 clock
(2) When using external main system clock
(3) When using high-speed system clock as CPU clock and peripheral hardware clock
(4) When stopping high-speed system clock
(1) Example of setting procedure when oscillating the X1 clock
<1> Setting frequency (OSCCTL register)
Using AMPH, set the gain of the on-chip oscillator according to the frequency to be used.
Note
AMPH
1 MHz ≤ f
0
1
10 MHz < f
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. When AMPH is set to 1, the clock supply to the CPU
is stopped for 5
Remark f
: High-speed system clock oscillation frequency
XH
<2> Setting P121/X1 and P122/X2/EXCLK pins and selecting X1 clock or external clock (OSCCTL register)
When EXCLK is cleared to 0 and OSCSEL is set to 1, the mode is switched from port mode to X1
oscillation mode.
EXCLK
OSCSEL
0
<3> Controlling oscillation of X1 clock (MOC register)
If MSTOP is cleared to 0, the X1 oscillator starts oscillating.
CHAPTER 6 CLOCK GENERATOR
The internal high-speed oscillation clock and high-speed system clock can be
Crystal/ceramic resonator is connected across the X1 and X2 pins.
Operating Frequency Control
≤ 10 MHz
XH
≤ 20 MHz
XH
µ
s (MIN.).
Operation Mode of High-
Speed System Clock Pin
1
X1 oscillation mode
Preliminary User's Manual U17260EJ3V1UD
P121/X1 Pin
P122/X2/EXCLK Pin
Crystal/ceramic resonator connection
153

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents