Samsung KS57C2308 Manual page 181

Single-chip cmos microcontroller
Table of Contents

Advertisement

KS57C2308/P2308/C2316/P2316
AFTER
BEFORE
PCON.1 = 0
PCON.0 = 0
SCMOD.0 = 0 PCON.1 = 1
PCON.0 = 0
PCON.1 = 1
PCON.0 = 1
SCMOD.0 = 1
NOTES:
1.
Even if oscillation is stopped by setting SCMOD.3 during main system clock operation, the stop mode is not entered.
2.
Since the X
input is connected internally to V
IN
not set SCMOD.3 to "1" or STOP instruction when an external clock is used as the main system clock.
3.
When the system clock is switched to the subsystem clock, it is necessary to disable any interrupts which may occur
during the time intervals shown in Table 6-6.
4.
"N/A" means "not available".
5.
fx: Main–system clock, fxt: Sub–system clock, M/C: Machine Cycle.
When fx is 4.19 MHz, and fxt is 32.768 kHz.
+ +
PROGRAMMING TIP — Switching Between Main System and Subsystem Clock
1. Switch from the main system clock to the subsystem clock:
MA2SUB BITS
CALL
BITS
RET
DLY80
LD
DEL1
NOP
NOP
DECS
JR
RET
2. Switch from the subsystem clock to the main system clock:
SUB2MA BITR
CALL
CALL
BITR
RET
Table 6-6. Elapsed Machine Cycles During CPU Clock Switch
PCON.1 = 0 PCON.0 = 0 PCON.1 = 1 PCON.0 = 0 PCON.1 = 1 PCON.0 = 1
N/A
8 MACHINE CYCLES
16 MACHINE CYCLES
N/A
SCMOD.0
DLY80
SCMOD.3
A,#0FH
A
DEL1
SCMOD.3
DLY80
DLY80
SCMOD.0
SCMOD.0 = 0
1 MACHINE CYCLE
N/A
16 MACHINE CYCLES
N/A
to avoid current leakage due to the crystal oscillator in stop mode, do
SS
; Switches to subsystem clock
; Delay 80 machine cycles
; Stop the main system clock
; Start main system clock oscillation
; Delay 80 machine cycles
; Delay 80 machine cycles
; Switch to main system clock
OSCILLATOR CIRCUITS
1 MACHINE CYCLE
8 MACHINE CYCLES
N/A
fx/4fxt (M/C)
SCMOD.0 = 1
N/A
fx/4fxt
MACHINE
CYCLE
N/A
6-11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents