![](http://datasheet.mmic.net.cn/130000/M34506M4-XXXFP_datasheet_5008350/M34506M4-XXXFP_59.png)
1-46
HARDWARE
4506 Group User’s Manual
Fig. 40 Switch to ceramic resonance/RC oscillation
Fig. 41 Handling of XIN and XOUT when operating ring oscillator
Fig. 42 Ceramic resonator external circuit
Fig. 43 External RC oscillation circuit
Execute the CMCK instruc-
tion in program.
Note: Externally connect a damping
resistor Rd depending on the
oscillation frequency.
(A feedback resistor is built-in.)
Use the resonator manu-
facturer’s recommended value
because constants such as ca-
pacitance depend on the
resonator.
(1) Selection of source oscillation (f(XIN))
The ceramic resonator or RC oscillation can be used for the source
oscillation of the MCU.
After system is released from reset, the MCU starts operation by
the clock output from the ring oscillator which is the internal oscilla-
tor.
When the ceramic resonator is used, execute the CMCK instruc-
tion. When the RC oscillation is used, execute the CRCK
instruction. The oscillation circuit by the CMCK or CRCK instruction
can be selected only at once. The oscillation circuit corresponding
to the first executed one of these two instructions is valid. Other os-
cillation circuit and the ring oscillator stop.
Execute the CMCK or the CRCK instruction in the initial setting rou-
tine of program (executing it in address 0 in page 0 is
recommended). Also, when the CMCK or the CRCK instruction is
not executed in program, the MCU operates by the ring oscillator.
(2) Ring oscillator operation
When the MCU operates by the ring oscillator as the source oscil-
lation (f(XIN)) without using the ceramic resonator or the RC
oscillator, connect XIN pin to VSS and leave XOUT pin open (Figure
41).
The clock frequency of the ring oscillator depends on the supply
voltage and the operation temperature range.
Be careful that variable frequencies when designing application
products.
(3) Ceramic resonator
When the ceramic resonator is used as the source oscillation
(f(XIN)), connect the ceramic resonator and the external circuit to
pins XIN and XOUT at the shortest distance. Then, execute the
CMCK instruction. A feedback resistor is built in between pins XIN
and XOUT (Figure 42).
(4) RC oscillation
When the RC oscillation is used as the source oscillation (f(XIN)),
connect the XIN pin to the external circuit of resistor R and the ca-
pacitor C at the shortest distance and leave XOUT pin open. Then,
execute the CRCK instruction (Figure 43).
The frequency is affected by a capacitor, a resistor and a micro-
computer. So, set the constants within the range of the frequency
limits.
*
Reset
Ring oscillator
operation
CMCK instruction
CRCK instruction
Ceramic resonator valid
Ring oscillator stop
RC oscillation stop
RC oscillation valid
Ring oscillator stop
Ceramic resonator stop
4506
XIN
XOUT
*
Do not use the CMCK instruction
and CRCK instruction in program.
4506
XIN
XOUT
Rd
CIN
COUT
4506
XIN
XOUT
R
C
*
Execute the CRCK
instruction in program.
FUNCTION BLOCK OPERATIONS