Datasheet
FS98O22
Rev. 1.6 131/146
14. Halt and Sleep Modes
FS98O22 supports low power working mode. When the user want FS98O22 to do nothing and just stand by,
FS98O22 could be set to Halt mode or Sleep mode to reduce the power consumption by stopping the CPU
core working. The two modes will be described below.
z Halt Mode
After CPU executes a Halt command, CPU Program Counter (PC) stops counting until an interrupt command is
issued. To avoid program errors caused by Interrupt Return, it is suggested to add a NOP command after Halt
to guarantee the program’s normal execution when turning back.
z Sleep Mode
After CPU executes Sleep command, all oscillators stop working until an external interrupt command is issued
or the CPU is reset. To avoid program errors caused by Interrupt return, it is suggested to add a NOP command
after Sleep to guarantee the program’s normal execution. The sleep mode power consumption is about 3 uA.
To make sure that CPU consumes minimum power in Sleep mode, it is necessary to close all power blocks and
analog circuits before issuing the Sleep command, and make sure that all I/O Ports are in VDD or VSS voltage
levels.
It is recommended that users execute the following program before issuing the Sleep command:
CLRF NETA ; As Reset state
CLRF NETB ; As Reset state
CLRF NETC ; As Reset state
CLRF NETD ; As Reset state
CLRF NETE ; As Reset state
CLRF NETF ; As Reset state
CLRF PT1PU ; Pull up resistor is disconnected
CLRF PT1EN ; PT1[7:0] is assigned to be input ports.
CLRF AINENB ; Set PT1 as Analog Input Pin
MOVLW 01h
MOVWF PT2PU ; PT2 Pull up resistor is disconnected except port 0(external
interrupt)
MOVLW 0Feh
MOVWF PT2EN ; PT2 ports are assigned to be output ports except port 0
CLRF PT2 ; Set PT2 [7:1] Output Low
CLRF INTF ; Clear the interrupt flags
MOVLW 081h
MOVWF INTE ; Enable the external interrupt
SLEEP ; Set the FS98O22 into Sleep mode
NOP ; Guarantee that the program works normally when CPU
wakes up.
FORTUNE'
Properties
For Reference Only