
26
EPSON
S1C63808 TECHNICAL MANUAL
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Oscillation Circuit)
4.3.4 Switching of CPU clock
The system clock can be selected between OSC1 and OSC3 with software (using the CLKCHG register).
The CPU clock should be switched using the following procedure. Pay special attention to the stability
waiting time for oscillation.
OSC1
→ OSC3
1. Set OSCC to "1". (OSC3 oscillation: off
→ on)
2. Wait 5 msec or more.
3. Set CLKCHG to "1". (CPU clock: OSC1
→ OSC3)
Note: It takes at least 5 msec from the time the OSC3 oscillation circuit goes on until the oscillation
stabilizes. Consequently, when switching the CPU operation clock from OSC1 to OSC3, do this
after a minimum of 5 msec have elapsed since the OSC3 oscillation went on.
Further, the oscillation stabilization time varies depending on the external oscillator characteristics
and conditions of use, so allow ample margin when setting the wait time.
OSC3
→ OSC1
1. Set CLKCHG to "0". (CPU clock: OSC3
→ OSC1)
2. Set OSCC to "0". (OSC3 oscillation: on
→ off)
Note: When switching the clock form OSC3 to OSC1, use a separate instruction for switching the OSC3
oscillation off. An error in the CPU operation can result if this processing is performed at the same
time by the one instruction.
4.3.5 Clock frequency and instruction execution time
Table 4.3.5.1 shows the instruction execution time according to each frequency of the system clock.
Table 4.3.5.1 Clock frequency and instruction execution time
Clock frequency
OSC1: 32.768 kHz
OSC3: 200 kHz
OSC3: 1.1 MHz
OSC3: 2 MHz
OSC3: 4 MHz
Instruction execution time (
sec)
1-cycle instruction
2-cycle instruction
3-cycle instruction
61
122
183
10
20
30
1.8
3.6
5.5
123
0.5
1
1.5