Samsung KS57C2308 Manual page 203

Single-chip cmos microcontroller
Table of Contents

Advertisement

KS57C2308/P2308/C2316/P2316
+ +
PROGRAMMING TIP — Reducing Power Consumption for Key Input Interrupt Processing
The following code shows real-time clock and interrupt processing for key inputs to reduce power consumption. In
this example, the system clock source is switched from the main system clock to a subsystem clock and the LCD
display is turned on:
KEYCLK
DI
CALL
SMB
LD
LD
LD
LD
SMB
BITR
BITR
BITS
BITS
CLKS1
CALL
BTSTZ
JR
CALL
subroutine
EI
RET
CIDLE
IDLE
NOP
NOP
NOP
JPS
You must program at least three NOP instructions after IDLE and STOP instructions, to avoid flowing
of leakage current due to the floating state in the internal bus.
MA2SUB
15
EA,#00H
P2,EA
A,#3H
IMOD2,A
0
IRQW
IRQ2
IEW
IE2
WATDIS
IRQ2
CIDLE
SUB2MA
CLKS1
; Main system clock
; All key strobe outputs to low level
; Select KS0–KS7 enable
; Execute clock and display changing subroutine
; Subsystem clock
; Engage idle mode
NOTE
POWER-DOWN
subsystem clock switch subroutine
main system clock switch
8-5

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents