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

SN8P26042A 参数 Datasheet PDF下载

SN8P26042A图片预览
型号: SN8P26042A
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-Bit Micro-Controller]
分类和应用: 微控制器
文件页数/大小: 101 页 / 733 K
品牌: SONIX [ SONIX TECHNOLOGY COMPANY ]
 浏览型号SN8P26042A的Datasheet PDF文件第82页浏览型号SN8P26042A的Datasheet PDF文件第83页浏览型号SN8P26042A的Datasheet PDF文件第84页浏览型号SN8P26042A的Datasheet PDF文件第85页浏览型号SN8P26042A的Datasheet PDF文件第87页浏览型号SN8P26042A的Datasheet PDF文件第88页浏览型号SN8P26042A的Datasheet PDF文件第89页浏览型号SN8P26042A的Datasheet PDF文件第90页  
SN8P2604A  
8-Bit Micro-Controller  
8.4.3 PWM PROGRAM EXAMPLE  
Example: Setup PWM1 output from TC1 to PWM1OUT (P5.3). The external high-speed oscillator clock is 4MHz.  
Fcpu = Fosc/4. The duty of PWM is 30/256. The PWM frequency is about 1KHz. The PWM clock source is  
from external oscillator clock. TC1 rate is Fcpu/4. The TC1RATE2~TC1RATE1 = 110. TC1C = TC1R = 30.  
MOV  
B0MOV  
A,#01100000B  
TC1M,A  
; Set the TC1 rate to Fcpu/4  
; Set the PWM duty to 30/256  
MOV  
A,#30  
B0MOV  
B0MOV  
TC1C,A  
TC1R,A  
B0BCLR  
B0BCLR  
B0BSET  
B0BSET  
FTC1OUT  
FALOAD1  
FPWM1OUT  
FTC1ENB  
; Set duty range as 0/256~255/256.  
; Enable PWM1 output to P5.3 and disable P5.3 I/O function  
; Enable TC1 timer  
’
Note: The TC1R is write-only register. Don’t process them using INCMS, DECMS instructions.  
Example: Modify TC1R registers’ value.  
MOV  
B0MOV  
A, #30H  
TC1R, A  
; Input a number using B0MOV instruction.  
INCMS  
NOP  
BUF0  
; Get the new TC1R value from the BUF0 buffer defined by  
; programming.  
B0MOV  
B0MOV  
A, BUF0  
TC1R, A  
’
Note: The PWM can work with interrupt request.  
SONiX TECHNOLOGY CO., LTD  
Page 86  
Version 0.3  
 复制成功!