EasyManua.ls Logo

SONIX SN8P2501D - Operating Mode Control Macro

Default Icon
96 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SN8P2501D
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD Page 50 Version 1.5
5.6 OPERATING MODE CONTROL MACRO
Sonix provides operating mode control macros to switch system operating mode easily.
Macro
Length
Description
SleepMode
1-word
The system insets into Sleep Mode (Power Down Mode).
GreenMode
3-word
The system inserts into Green Mode.
SlowMode
2-word
The system inserts into Slow Mode and stops high speed oscillator.
Slow2Normal
5-word
The system returns to Normal Mode from Slow Mode. The macro
includes operating mode switch, enable high speed oscillator, high
speed oscillator warm-up delay time.
Example: Switch normal/slow mode to power down (sleep) mode.
SleepMode
; Declare SleepMode macro directly.
Example: Switch normal mode to slow mode.
SlowMode
; Declare SlowMode macro directly.
Example: Switch slow mode to normal mode (The external high-speed oscillator stops).
Slow2Normal
; Declare Slow2Normal macro directly.
Example: Switch normal/slow mode to green mode.
GreenMode
; Declare GreenMode macro directly.
Example: Switch normal/slow mode to green mode and enable T0 wake-up function.
; Set T0 timer wakeup function.
B0BCLR
FT0IEN
; To disable T0 interrupt service
B0BCLR
FT0ENB
; To disable T0 timer
MOV
A,#20H
;
B0MOV
T0M,A
; To set T0 clock = Fcpu / 64
MOV
A,#74H
B0MOV
T0C,A
; To set T0C initial value = 74H (To set T0 interval = 10 ms)
B0BCLR
FT0IEN
; To disable T0 interrupt service
B0BCLR
FT0IRQ
; To clear T0 interrupt request
B0BSET
FT0ENB
; To enable T0 timer
; Go into green mode
GreenMode
; Declare GreenMode macro directly.
Example: Switch normal/slow mode to green mode and enable T0 wake-up function with RTC.
CLR
T0C
; Clear T0 counter.
B0BSET
FT0TB
; Enable T0 RTC function.
B0BSET
FT0ENB
; To enable T0 timer.
; Go into green mode
GreenMode
; Declare GreenMode macro directly.

Table of Contents

Related product manuals