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

SN8A1703AS 参数 Datasheet PDF下载

SN8A1703AS图片预览
型号: SN8A1703AS
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-Bit Micro-Controller]
分类和应用: 微控制器
文件页数/大小: 112 页 / 624 K
品牌: SONIX [ SONIX TECHNOLOGY COMPANY ]
 浏览型号SN8A1703AS的Datasheet PDF文件第74页浏览型号SN8A1703AS的Datasheet PDF文件第75页浏览型号SN8A1703AS的Datasheet PDF文件第76页浏览型号SN8A1703AS的Datasheet PDF文件第77页浏览型号SN8A1703AS的Datasheet PDF文件第79页浏览型号SN8A1703AS的Datasheet PDF文件第80页浏览型号SN8A1703AS的Datasheet PDF文件第81页浏览型号SN8A1703AS的Datasheet PDF文件第82页  
Preliminary  
SN8P1702A/SN8P1703A  
8-bit micro-controller build-in 12-bit ADC  
PWM PROGRAM DESCRIPTION  
Example: Setup PWM0 output from TC0 to PWM0OUT (P5.4). The external high-speed oscillator clock is  
4MHz. The duty of PWM is 30/256. The PWM frequency is about 1KHz. The PWM clock source is  
from external oscillator clock. TC0 rate is Fcpu/4. The TC0RATE2~TC0RATE1 = 110, TC0C = TC0R  
= 30, TC0X8 =0, TC0_Counter=8-bit  
B0BCLR  
MOV  
B0MOV  
MOV  
B0MOV  
MOV  
FTC0X8  
A,#01100000B  
TC0M,A  
A,#0x00  
TC0C,A  
; Set the TC0 rate to Fcpu/4  
;First Time Initial TC0  
A,#30  
; Set the PWM duty to 30/256  
B0MOV  
TC0R,A  
B0BCLR  
B0BSET  
B0BSET  
FTC0OUT  
FPWM0OUT  
FTC0ENB  
; Disable TC0OUT function.  
; Enable PWM0 output to P5.4 and disable P5.4 I/O function  
; Enable TC0 timer  
Note1: The TC0R and TC1R are write-only registers. Don’t process them using INCMS, DECMS  
instructions.  
Note2: Set TC0C at initial is to make first duty-cycle correct. After TC0 is enabled, don’t modify TC0R  
value to avoid duty cycle error of PWM output.  
Example: Modify TC0R/TC1R registers’ value.  
MOV  
B0MOV  
A, #30H  
TC0R, A  
; Input a number using B0MOV instruction.  
INCMS  
B0MOV  
B0MOV  
BUF0  
A, BUF0  
TC0R, A  
; Get the new TC0R value from the BUF0 buffer defined by  
; programming.  
Note2: That is better to set the TC0C and TC0R value together when PWM0 duty modified. It protects the  
PWM0 signal no glitch as PWM0 duty changing. That is better to set the TC1C and TC1R value together  
when PWM1 duty modified. It protects the PWM1 signal no glitch as PWM1 duty changing.  
Note3: The TC0OUT function must be set “0” when PWM0 output enable. The TC1OUT function must be  
set “0” when PWM1 output enable.  
Note4: The PWM can work with interrupt request.  
SONiX TECHNOLOGY CO., LTD  
Page 78  
Revision 0.5  
 复制成功!