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

SN8P2742SDB 参数 Datasheet PDF下载

SN8P2742SDB图片预览
型号: SN8P2742SDB
PDF下载: 下载PDF文件 查看货源
内容描述: [ADC, OP-amp, Comparator 8-Bit Micro-Controller]
分类和应用:
文件页数/大小: 136 页 / 3074 K
品牌: SONIX [ SONIX TECHNOLOGY COMPANY ]
 浏览型号SN8P2742SDB的Datasheet PDF文件第83页浏览型号SN8P2742SDB的Datasheet PDF文件第84页浏览型号SN8P2742SDB的Datasheet PDF文件第85页浏览型号SN8P2742SDB的Datasheet PDF文件第86页浏览型号SN8P2742SDB的Datasheet PDF文件第88页浏览型号SN8P2742SDB的Datasheet PDF文件第89页浏览型号SN8P2742SDB的Datasheet PDF文件第90页浏览型号SN8P2742SDB的Datasheet PDF文件第91页  
SN8P2740 Series  
ADC, OP-amp, Comparator 8-Bit Micro-Controller  
8.3.9 TC0 TIMER OPERATION EXPLAME  
TC0 TIMER CONFIGURATION:  
; Reset TC0 timer.  
CLR  
TC0M  
; Clear TC0M register.  
; Set TC0 rate.  
MOV  
A, #0nnn0000b  
B0MOV  
TC0M, A  
; Set TC0 clock source.  
B0BCLR  
FTC0CKS  
FTC0CKS  
; TC0 clock source is Fcpu.  
; TC0 clock source is Fhosc.  
; or  
B0BSET  
; Set TC0C and TC0R register for TC0 Interval time.  
MOV  
B0MOV  
B0MOV  
A, #value  
TC0C, A  
TC0R, A  
; TC0C must be equal to TC0R.  
; Clear TC0IRQ  
B0BCLR  
FTC0IRQ  
; Enable TC0 timer and interrupt function.  
B0BSET  
B0BSET  
FTC0IEN  
FTC0ENB  
; Enable TC0 interrupt function.  
; Enable TC0 timer.  
TC0 PWM CONFIGURATION:  
; Reset TC0 timer.  
CLR  
TC0M  
; Clear TC0M register.  
; Set TC0 rate.  
MOV  
A, #0nnn0000b  
B0MOV  
TC0M, A  
; Set TC0 clock source.  
B0BCLR  
FTC0CKS  
FTC0CKS  
; TC0 clock source is Fcpu.  
; TC0 clock source is Fhosc.  
; or  
B0BSET  
; Set TC0C and TC0R register for PWM cycle.  
MOV  
B0MOV  
B0MOV  
A, #value1  
TC0C, A  
TC0R, A  
; TC0C must be equal to TC0R.  
; Set TC0D register for PWM duty.  
MOV  
A, #value2  
; TC0D must be greater than TC0R.  
B0MOV  
TC0D, A  
; Set PWM output phase.  
B0BCLR  
FTC0DIR  
FTC0DIR  
; High pulse and low idle status.  
; Low pulse and high idle status.  
; or  
B0BSET  
; Enable PWM and TC0 timer.  
B0BSET  
B0BSET  
FPWM0OUT  
FTC0ENB  
; Enable PWM.  
; Enable TC0 timer.  
SONiX TECHNOLOGY CO., LTD  
Page 87  
Version 2.0  
 复制成功!