REJ03B0160-0122 Rev.1.22 Mar 13, 2009
page 99 of 100
7546 Group
Notes on Clock Generating Circuit
1. Switch of ceramic and RC oscillations
After releasing reset, the oscillation mode selection bit (bit 5 of
CPU mode register (address 003B16)) is “0” (ceramic oscillation
selected). When the RC oscillation is used, after releasing reset,
set this bit to “1”.
2. Double-speed mode
The double-speed mode can be used only when a ceramic oscilla-
tion is selected. Do not use it when an RC oscillation is selected.
3. CPU mode register
Oscillation mode selection bit (bit 5), processor mode bits (bits 1
and 0) of CPU mode register (address 003B16) are used to select
oscillation mode and to control operation modes of the microcom-
puter. In order to prevent the dead-lock by erroneously writing (ex.
program run-away), these bits can be rewritten only once after re-
leasing reset. After rewriting, it is disabled to write any data to the
bit. (The emulator MCU “M37542RSS” is excluded.)
Also, when the read-modify-write instructions (SEB, CLB, etc.) are
executed to bits 2 to 4, 6 and 7, bits 5, 1 and 0 are locked.
4. Clock division ratio, XIN oscillation control, on-chip oscillator
control
The state transition shown in Fig. 82 can be performed by setting
the clock division ratio selection bits (bits 7 and 6), XIN oscillation
control bit (bit 4), on-chip oscillator oscillation control bit (bit 3) of
CPU mode register. Be careful of notes on use in Fig. 82.
5. On-chip oscillator operation
When the MCU operates by the on-chip oscillator for the main
clock, connect XIN pin to VCC through a 1 k to 10 k resistor and
leave XOUT pin open.
The clock frequency of the on-chip oscillator depends on the sup-
ply voltage and the operation temperature range.
Be careful that this margin of frequencies when designing applica-
tion products.
6. Ceramic resonator
When the ceramic resonator is used for the main clock, connect
the ceramic resonator and the external circuit to pins XIN and
XOUT at the shortest distance. Externally connect a damping resis-
tor Rd depending on the oscillation frequency. A feedback resistor
is built-in.
Use the resonator manufacturer’s recommended value because
constants such as capacitance depend on the resonator.
7. RC oscillation
When the RC oscillation is used for the main clock, connect the
XIN pin and XOUT pin to the external circuit of resistor R and the
capacitor C at the shortest distance.
The frequency is affected by a capacitor, a resistor and a micro-
computer.
So, set the constants within the range of the frequency limits.
Notes on Oscillation Control
1. Oscillation stop detection circuit
(1) When the stop mode is used, set the oscillation stop detection
function to “invalid”.
(2) When the ceramic or RC oscillation is stopped by the XIN oscil-
lation control bit (bit 4 of CPU mode register (address
003B16)), set the oscillation stop detection function to “invalid”.
2. Stop mode
(1) When the stop mode is used, set the oscillation stop detection
function to “invalid”.
(2) When the stop mode is used, set “0” (STP instruction enabled)
to the STP instruction function selection bit of the watchdog
timer control register (bit 6 of watchdog timer control register
(address 003916)).
(3) The oscillation stabilizing time after release of STP instruction
can be selected from “set automatically ”/“not set automati-
cally” by the oscillation stabilizing time set bit after release of
the STP instruction (bit 0 of MISRG (address 003816)). When
“0” is set to this bit, “0116” is set to timer 1 and “FF16” is set to
prescaler 1 automatically at the execution of the STP instruc-
tion. When “1” is set to this bit, set the wait time to timer 1 and
prescaler 1 according to the oscillation stabilizing time of the
oscillation. Also, when timer 1 is used, set values again to
timer 1 and prescaler 1 after system is returned from the stop
mode.
(4) Do not execute the STP instruction during the A/D conversion.
Notes on On-chip Oscillation Division Ratio
When the clock division ratio is switched from f(XIN) to on-chip
oscillator by the clock division ratio selection bits (bits 7 and 6 of
CPU mode register (address 003B16)), the on-chip oscillator divi-
sion ratio (bits 1 and 0 of on-chip oscillation division ratio
selection register (address 003716)) is “102” (on-chip oscillator
middle-speed mode (ROSC/8)).
8. External clock
When the external signal clock is used for the main clock, connect
the XIN pin to the clock source and leave XOUT pin open.
Select “0” (ceramic oscillation) to oscillation mode selection bit.
9. Count source (Timer 1, Timer A, Timer B, Timer X, Serial I/O,
Serial I/O2, A/D converter, Watchdog timer)
The count sources of these functions are affected by the clock di-
vision selection bit of the CPU mode register.
The f(XIN) clock is supplied to the watchdog timer when selecting
f(XIN) as the CPU clock.
The on-chip oscillator output is supplied to these functions when
selecting the on-chip oscillator output as the CPU clock.
However, the watchdog timer is also affected by the function set
ROM.