SN8P2711A
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 58
Version 0.1
¾
Example: Switch normal/slow mode to green mode and enable TC0 wake-up function.
; Set T0 timer wakeup function.
B0BCLR
FTC0IEN
; To disable TC0 interrupt service
B0BCLR
FTC0ENB
; To disable TC0 timer
MOV
A,#20H
;
B0MOV
TC0M,A
; To set TC0 clock = Fcpu / 64
MOV
A,#74H
B0MOV
TC0C,A
; To set TC0C initial value = 74H (To set TC0 interval = 10
ms)
B0BCLR
FTC0IEN
; To disable TC0 interrupt service
B0BCLR
FTC0IRQ
; To clear TC0 interrupt request
B0BSET
FTC0GN
; To enable TC0 timer wake-up function.
B0BSET
FTC0ENB
; To enable TC0 timer
; Go into green mode
B0BCLR
FCPUM0
;To set CPUMx = 10
B0BSET
FCPUM1
Note: During the green mode with TC0 wake-up function, the wakeup pins and TC0 can wakeup the
system back to the last mode. TC0 wake-up period is controlled by program and TC0GN must be set.
0D8H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
T0M
- - - -
TC1X8
TC0X8
TC0GN
-
Read/Write
- - - -
R/W
R/W
R/W
-
After
reset
- - - - 0 0 0 -
Bit 1
TC0GN:
TC0 green mode wake-up function control bits.
0 = Disable.
1 = Enable.