参数资料
型号: SN8P1603X
厂商: SONIX Technology Co., Ltd.
英文描述: 8-Bit Micro-Controller
中文描述: 8位微控制器
文件页数: 60/94页
文件大小: 540K
代理商: SN8P1603X
SN8P1600
8-bit micro-controller
SONiX TECHNOLOGY CO., LTD
Page 60
Revision 1.94
TC1 TIMER COUNTER OPERATION SEQUENCE
The TC1 timer’s sequence of operation can be following.
Set the TC1C initial value to setup the interval time.
Set the TC1ENB to be “1” to enable TC1 timer counter.
TC1C is incremented by one with each clock pulse which frequency is corresponding to TC1M selection.
TC1C overflow if TC1C from FFH to 00H.
When TC1C overflow occur, the TC1IRQ flag is set to be “1” by hardware.
Execute the interrupt service routine.
Users reset the TC1C value and resume the TC1 timer operation.
Example: Setup the TC1M and TC1C without auto-reload function.
B0BCLR
FTC1IEN
B0BCLR
FTC1ENB
MOV
A,#20H
B0MOV
TC1M,A
MOV
A,#74H
B0MOV
TC1C,A
B0BSET
FTC1IEN
B0BCLR
FTC1IRQ
B0BSET
FTC1ENB
Example: Setup the TC1M and TC1C with auto-reload function.
B0BCLR
FTC1IEN
B0BCLR
FTC1ENB
MOV
A,#20H
B0MOV
TC1M,A
MOV
A,#74H
B0MOV
TC1C,A
B0MOV
TC1R,A
B0BSET
FTC1IEN
B0BCLR
FTC1IRQ
B0BSET
FTC1ENB
B0BSET
ALOAD1
; To disable TC1 interrupt service
; To disable TC1 timer
;
; To set TC1 clock = fcpu / 64
; To set TC1C initial value = 74H
;(To set TC1 interval = 10 ms)
; To enable TC1 interrupt service
; To clear TC1 interrupt request
; To enable TC1 timer
; To disable TC1 interrupt service
; To disable TC1 timer
;
; To set TC1 clock = fcpu / 64
; To set TC1C initial value = 74H
; (To set TC1 interval = 10 ms)
; To set TC1R auto-reload register
; To enable TC1 interrupt service
; To clear TC1 interrupt request
; To enable TC1 timer
; To enable TC1 auto-reload function.
相关PDF资料
PDF描述
SN8P1604 8-Bit Micro-Controller
SN8P1604AK 8-Bit Micro-Controller
SN8P1604AP 8-Bit Micro-Controller
SN8P1604AQ 8-Bit Micro-Controller
SN8P1604AS 8-Bit Micro-Controller
相关代理商/技术参数
参数描述
SN8P1604 制造商:SONIX 制造商全称:SONIX 功能描述:8-Bit Micro-Controller
SN8P1604AK 制造商:SONIX 制造商全称:SONIX 功能描述:8-Bit Micro-Controller
SN8P1604AP 制造商:SONIX 制造商全称:SONIX 功能描述:8-Bit Micro-Controller
SN8P1604AQ 制造商:SONIX 制造商全称:SONIX 功能描述:8-Bit Micro-Controller
SN8P1604AS 制造商:SONIX 制造商全称:SONIX 功能描述:8-Bit Micro-Controller