System configuration register (sc), Power-down modes, Atar862-4 – Rainbow Electronics ATAR862-4 User Manual
Page 29
29
ATAR862-4
4552B–4BMCU–02/03
System Configuration
Register (SC)
Primary register address: "3"hex
Power-down Modes
The sleep mode is a shut-down condition which is used to reduce the average system
power consumption in applications where the microcontroller is not fully utilized. In this
mode, the system clock is stopped. The sleep mode is entered via the SLEEP instruc-
tion. This instruction sets the interrupt enable bit (I) in the condition code register to
enable all interrupts and stops the core. During the sleep mode the peripheral modules
remain active and are able to generate interrupts. The microcontroller exits the sleep
mode by carrying out any interrupt or a reset.
The sleep mode can only be kept when none of the interrupt pending or active register
bits are set. The application of the $AUTOSLEEP routine ensures the correct function of
the sleep mode. For standard applications use the $AUTOSLEEP routine to enter the
power-down mode. Using the SLEEP instruction instead of the $AUTOSLEEP following
an I/O instruction requires to insert 3 non-I/O instruction cycles (for example NOP NOP
NOP) between the IN or OUT command and the SLEEP command.
The total power consumption is directly proportional to the active time of the microcon-
troller. For a rough estimation of the expected average system current consumption, the
following formula should be used:
I
total
(V
DD
,f
syscl
) = I
Sleep
+ (I
DD
´
t
active
/t
total
)
I
DD
depends on V
DD
and f
syscl
Bit 3
Bit 2
Bit 1
Bit 0
SC: write
BOT
–
OS1
OS0
Reset value: 1x11b
BOT
B
rown-
O
ut
T
hreshold
BOT = 1, low brown-out voltage threshold (1.7 V)
BOT = 0, high brown-out voltage threshold (2.0 V)
OS1
O
scillator
S
elect
1
OS0
O
scillator
S
elect
0
Mode
OS1
OS0
Input for SUBCL
Selected Oscillators
1
1
1
C
in/
16
RC-oscillator 1 and external input clock
2
0
1
C
in
/16
RC-oscillator 1 and RC-oscillator 2
3
1
0
C
in
/16
RC-oscillator 1 and 4-MHz crystal
oscillator
4
0
0
32 kHz
RC-oscillator 1 and 32-kHz crystal
oscillator
Note:
If bit CCS = 0 in the CM-register, the RC-oscillator 1 always stops.