English
Language : 

SN8F2270B Datasheet, PDF (71/111 Pages) SONiX Technology Company – 8-Bit Micro-Controller
SN8F2270B Series
USB 2.0 Low-Speed 8-Bit Micro-Controller
8.2.4 T0 TIMER OPERATION SEQUENCE
T0 timer operation sequence of setup T0 timer is as following.
) Stop T0 timer counting, disable T0 interrupt function and clear T0 interrupt request flag.
B0BCLR
B0BCLR
B0BCLR
) Set T0 timer rate.
FT0ENB
FT0IEN
FT0IRQ
; T0 timer.
; T0 interrupt function is disabled.
; T0 interrupt request flag is cleared.
MOV
A, #0xxx0000b
B0MOV
T0M,A
) Set T0 interrupt interval time.
;The T0 rate control bits exist in bit4~bit6 of T0M. The
; value is from x000xxxxb~x111xxxxb.
; T0 timer is disabled.
MOV
B0MOV
A,#7FH
T0C,A
; Set T0C value.
) Set T0 timer function mode.
B0BSET
FT0IEN
) Enable T0 timer.
B0BSET
FT0ENB
; Enable T0 interrupt function.
; Enable T0 timer.
SONiX TECHNOLOGY CO., LTD
Page 71
Version 1.2