欢迎访问ic37.com |
会员登录 免费注册
发布采购

SN8F2250B 参数 Datasheet PDF下载

SN8F2250B图片预览
型号: SN8F2250B
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-Bit Micro-Controller]
分类和应用: 微控制器
文件页数/大小: 133 页 / 1554 K
品牌: SONIX [ SONIX TECHNOLOGY COMPANY ]
 浏览型号SN8F2250B的Datasheet PDF文件第83页浏览型号SN8F2250B的Datasheet PDF文件第84页浏览型号SN8F2250B的Datasheet PDF文件第85页浏览型号SN8F2250B的Datasheet PDF文件第86页浏览型号SN8F2250B的Datasheet PDF文件第88页浏览型号SN8F2250B的Datasheet PDF文件第89页浏览型号SN8F2250B的Datasheet PDF文件第90页浏览型号SN8F2250B的Datasheet PDF文件第91页  
SN8F2250B Series  
USB 2.0 Full-Speed 8-Bit Micro-Controller  
8.4.6 TC0 TIMER OPERATION SEQUENCE  
TC0 timer operation includes timer interrupt, event counter, TC0OUT and PWM. The sequence of setup TC0 timer is  
as following.  
)
)
Stop TC0 timer counting, disable TC0 interrupt function and clear TC0 interrupt request flag.  
B0BCLR  
B0BCLR  
B0BCLR  
FTC0ENB  
FTC0IEN  
FTC0IRQ  
; TC0 timer, TC0OUT and PWM stop.  
; TC0 interrupt function is disabled.  
; TC0 interrupt request flag is cleared.  
)
Set TC0 timer rate. (Besides event counter mode.)  
MOV  
B0MOV  
A, #0xxx0000b  
TC0M,A  
;The TC0 rate control bits exist in bit4~bit6 of TC0M. The  
; value is from x000xxxxb~x111xxxxb.  
; TC0 interrupt function is disabled.  
)
Set TC0 timer clock source.  
; Select TC0 internal / external clock source.  
B0BCLR  
FTC0CKS  
; Select TC0 internal clock source.  
; Select TC0 external clock source.  
or  
B0BSET  
FTC0CKS  
)
or  
)
Set TC0 timer auto-load mode.  
B0BCLR  
B0BSET  
FALOAD0  
FALOAD0  
; Enable TC0 auto reload function.  
; Disable TC0 auto reload function.  
Set TC0 interrupt interval time, TC0OUT (Buzzer) frequency or PWM duty cycle.  
; Set TC0 interrupt interval time, TC0OUT (Buzzer) frequency or PWM duty.  
MOV  
B0MOV  
B0MOV  
A,#7FH  
TC0C,A  
TC0R,A  
; TC0C and TC0R value is decided by TC0 mode.  
; Set TC0C value.  
; Set TC0R value under auto reload mode or PWM mode.  
; In PWM mode, set PWM cycle.  
B0BCLR  
B0BCLR  
FALOAD0  
FTC0OUT  
; ALOAD0, TC0OUT = 00, PWM cycle boundary is  
; 0~255.  
or  
B0BCLR  
B0BSET  
or  
FALOAD0  
FTC0OUT  
; ALOAD0, TC0OUT = 01, PWM cycle boundary is  
; 0~63.  
B0BSET  
B0BCLR  
or  
FALOAD0  
FTC0OUT  
; ALOAD0, TC0OUT = 10, PWM cycle boundary is  
; 0~31.  
B0BSET  
B0BSET  
FALOAD0  
FTC0OUT  
; ALOAD0, TC0OUT = 11, PWM cycle boundary is  
; 0~15.  
)
Set TC0 timer function mode.  
B0BSET  
B0BSET  
B0BSET  
FTC0IEN  
; Enable TC0 interrupt function.  
; Enable TC0OUT (Buzzer) function.  
; Enable PWM function.  
or  
or  
FTC0OUT  
FPWM0OUT  
)
Enable TC0 timer.  
B0BSET  
FTC0ENB  
; Enable TC0 timer.  
SONiX TECHNOLOGY CO., LTD  
Page 87  
Version 1.1  
 
 复制成功!