M37221M4H/M6H/M8H/MAH–XXXSP/FP M37221EASP/FP
8.14 CLOCK GENERATING CIRCUIT
The built-in clock generating circuit is shown in Figure 8.13.3. When
the STP instruction is executed, the internal clock φ stops at HIGH.
At the same time, timers 3 and 4 are connected by hardware and
“FF16” is set in timer 3 and “0716” is set in the timer 4. Select f(XIN)/16
as the timer 3 count source (set bit 0 of the timer mode register 2 to
“0” before the execution of the STP instruction). Moreover, set the
timer 3 and timer 4 interrupt enable bits to disabled (“0”) before ex-
ecution of the STP instruction). The oscillator restarts when external
interrupt is accepted. However, the internal clock φ keeps its HIGH
until timer 4 overflows, allowing time for oscillation stabilization when
a ceramic resonator or a quartz-crystal oscillator is used.
Microcomputer
X
IN
XOUT
C
IN
COUT
When the WIT instruction is executed, the internal clock φ stops in
the HIGH but the oscillator continues running. This wait state is re-
leased when an interrupt is accepted (See note). Since the oscillator
does not stop, the next instruction can be executed at once.
When returning from the stop or the wait state, to accept an interrupt,
set the corresponding interrupt enable bit to “1” before executing the
STP or the WIT instructions.
Fig. 8.14.1 Ceramic Resonator Circuit Example
Microcomputer
Note: In the wait mode, the following interrupts are invalid.
• VSYNC interrupt
X
IN
• OSD interrupt
• Timer 2 interrupt using external clock input from TIM2 pin as count
source
• Timer 3 interrupt using external clock input from TIM3 pin as count
source
Vcc
Vss
External oscillation circuit
• Timer 4 interrupt using f(XIN)/2 as count source
• Timer 1 interrupt using f(XIN)/4096 as count source
• f(XIN)/4096 interrupt
• Multi-master I2C-BUS interface interrupt
Fig. 8.14.2 External Clock Input Circuit Example
A circuit example using a ceramic resonator (or a quartz-crystal os-
cillator) is shown in Figure 8.14.1. Use the circuit constants in accor-
dance with the resonator manufacture’s recommended values. A cir-
cuit example with external clock input is shown in Figure 8.14.2. In-
put the clock to the XIN pin, and open the XOUT pin.
Interrupt request
Reset
S
R
Q
Q
S
R
Interrupt disable
flag I
S
R
Q
Reset
WIT
STP
instruction
STP instruction
instruction
Selection gate :
Connected to black
side at reset.
T34M :
Timer 34 mode register
Internal clock φ
1/8
1/2
Timer 3
Timer 4
T34M0
T34M2
X
IN
XOUT
Fig. 8.14.3 Clock Generating Circuit Block Diagram
Rev.1.00 Oct 01, 2002 page 76 of 110
REJ03B0134-0100Z