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

SN8P27411SDG 参数 Datasheet PDF下载

SN8P27411SDG图片预览
型号: SN8P27411SDG
PDF下载: 下载PDF文件 查看货源
内容描述: [ADC, OP-amp, Comparator 8-Bit Micro-Controller]
分类和应用:
文件页数/大小: 136 页 / 3074 K
品牌: SONIX [ SONIX TECHNOLOGY COMPANY ]
 浏览型号SN8P27411SDG的Datasheet PDF文件第78页浏览型号SN8P27411SDG的Datasheet PDF文件第79页浏览型号SN8P27411SDG的Datasheet PDF文件第80页浏览型号SN8P27411SDG的Datasheet PDF文件第81页浏览型号SN8P27411SDG的Datasheet PDF文件第83页浏览型号SN8P27411SDG的Datasheet PDF文件第84页浏览型号SN8P27411SDG的Datasheet PDF文件第85页浏览型号SN8P27411SDG的Datasheet PDF文件第86页  
SN8P2740 Series  
ADC, OP-amp, Comparator 8-Bit Micro-Controller  
8.3.3 PULSE WIDTH MODULATION (PWM)  
TC0 timer builds in PWM function controlled by PWM0OUT bit. PWM output pin is shared with GPIO. When  
PWM0OUT=1, the PWM function is enabled and GPIO pin is switched from GPIO to PWM output status. When  
PWM0OUT=0, PWM output pin returns to GPIO last status. PWM signal is generated from the result of TC0C, TC0R  
and TC0D comparison. When PWM0OUT=1 or TC0C counts from 0xFF to 0x00 (overflow), the PWM outputs high  
status which is the PWM initial status. TC0C is loaded new data from TC0R register to decide PWM cycle and  
resolution. TC0C keeps counting, and the system compares TC0C and TC0D. When TC0C=TC0D, the PWM output  
status exchanges to low. TC0C keeps counting. When TC0 timer overflow occurs, and one cycle of PWM signal  
finishes. TC0C is reloaded from TC0R automatically, and PWM output status exchanges to high for next cycle. TC0D  
decides the high duty duration, and TC0R decides the resolution and cycle of PWM. TC0R can‟t be larger than TC0D,  
or the PWM signal is error. The PWM output phase can be selected through TC0DIR bit. When TC0DIR = 0, PWM‟s  
phase is high pulse and low idle status. When TC0DIR = 1, PWM‟s phase is low pulse and high idle status.  
Enable TC0 and PWM.  
TC0C is loaded from TC0R.  
PWM outputs high status.  
TC0C overflows from 0xFF to 0x00.  
TC0C is loaded from TC0R.  
PWM exchanges to high status.  
TC0C = TC0D.  
PWM exchanges to low status.  
TC0R  
TC0R  
+2  
TC0D  
-2  
TC0D  
-1  
TC0R  
+1  
TC0R  
+2  
TC0R  
+1  
...  
TC0D  
...  
0xFD  
0xFE  
0xFF  
TC0R  
...  
TC0C  
PWM Output  
TC0DIR=0  
One complete cycle of PWM.  
One complete cycle of PWM.  
Next cycle.  
Next cycle.  
PWM Output  
TC0DIR=1  
The resolution of PWM is decided by TC0R. TC0R range is from 0x00~0xFF. If TC0R = 0x00, PWMs resolution is  
1/256. If TC0R = 0x80, PWMs resolution is 1/128. TC0D controls the high pulse width of PWM for PWMs duty. When  
TC0C = TC0D, PWM output exchanges to low status. TC0D must be greater than TC0R, or the PWM signal keeps low  
status. When PWM outputs, TC0IRQ still actives as TC0 overflows, and TC0 interrupt function actives as TC0IEN = 1.  
But strongly recommend be careful to use PWM and TC0 timer together, and make sure both functions work well.  
The PWM output pin is shared with GPIO and switch to output PWM signal as PWM0OUT=1 automatically. If  
PWM0OUT bit is cleared to disable PWM, the output pin exchanges to last GPIO mode automatically. It easily to  
implement carry signal on/off operation, not to control TC0ENB bit.  
PWM Output  
TC0DIR=0  
PWM0OUT=0.  
PWM0OUT=0.  
PWM0OUT=0.  
PWM0OUT=0.  
PWM0OUT=0.  
PWM0OUT=0.  
PWM0OUT=1.  
PWM0OUT=1.  
PWM0OUT=1.  
PWM0OUT=1.  
PWM0OUT=1.  
PWM0OUT=1.  
PWM0OUT=1. The pin exchanges to output  
mode and outputs PWM signal automatically.  
PWM0OUT=0. The pin exchanges  
to last GPIO mode (output low).  
PWM Output  
TC0DIR=0  
PWM0OUT=1. The pin exchanges to output  
mode and outputs PWM signal automatically.  
PWM0OUT=0. The pin exchanges  
to last GPIO mode (output high).  
High impendence (floating)  
PWM Output  
TC0DIR=0  
PWM0OUT=1. The pin exchanges to output  
mode and outputs PWM signal automatically.  
PWM0OUT=0. The pin exchanges  
to last GPIO mode (input).  
PWM Output  
TC0DIR=1  
PWM0OUT=1. The pin exchanges to output  
mode and outputs PWM signal automatically.  
PWM0OUT=0. The pin exchanges  
to last GPIO mode (output low).  
PWM Output  
TC0DIR=1  
PWM0OUT=1. The pin exchanges to output  
mode and outputs PWM signal automatically.  
PWM0OUT=0. The pin exchanges  
to last GPIO mode (output high).  
High impendence (floating)  
PWM Output  
TC0DIR=1  
PWM0OUT=1. The pin exchanges to output  
mode and outputs PWM signal automatically.  
PWM0OUT=0. The pin exchanges  
to last GPIO mode (input).  
SONiX TECHNOLOGY CO., LTD  
Page 82  
Version 2.0  
 复制成功!