SN8P26L38
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 92
Version 1.5
8.3.4 T1 TIMER OPERATION SEQUENCE
T1 timer operation sequence of setup T1 timer is as following.
Stop T1 timer counting, disable T1 interrupt function and clear T1 interrupt request flag.
B0BCLR
FT1ENB
; T1 timer.
B0BCLR
FT1IEN
; T1 interrupt function is disabled.
B0BCLR
FT1IRQ
; T1 interrupt request flag is cleared.
Set T1 timer rate.
MOV
A, #0xxx0000b
;The T1 rate control bits exist in bit4~bit6 of T1M. The
; value is from x000xxxxb~x111xxxxb.
B0MOV
T1M,A
; T1 timer is disabled.
Set T1 interrupt interval time.
MOV
A,#7FH
B0MOV
T1CL,A
; Set T1CL value.
MOV
A,#7FH
B0MOV
T1CH,A
; Set T1CH value.
Set T1 timer function mode.
B0BSET
FT1IEN
; Enable T1 interrupt function.
Enable T1 timer.
B0BSET
FT1ENB
; Enable T1 timer.