电子发烧友App

硬声App

0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示
电子发烧友网>电子资料下载>电源技术>PIC18F4550_PWM_FUNCTIONS

PIC18F4550_PWM_FUNCTIONS

2014-06-12 | pdf | 5KB | 次下载 | 3积分

资料介绍

PWM FUNCTIONS 
Original by F.Zia, rewritten for the PIC18F4550 by M.F.v.Lieshout, March 2006 
Information sources: 
The information in this document is obtained from the following Microchip manuals: 
- PIC18F4550 Datasheet 
- PICmicro® 18C MCU Family Reference Manual 
- MPLAB C18 C Compiler Libraries 
Function Prototypes: 
For a detailed description of these functions, please see: 
Section 2.7 Pulse-Width Modulation Functions, in MPLAB C18 C Compiler Libraries manual. 
 
The PIC18F4550 has 2 PWM channels available, so x is 1 or 2 in this case. 
 
#include  
void OpenPWMx ( char PR2 ); // Configure PWM channel x. 
void SetDCPWMx ( unsigned int dutycycle ); // Write a new duty cycle value to 
PWM channel x. 
void ClosePWMx ( void ); // Disable PWM channel x. 
Notes: 
1. PR2 can be any value from 0x00 to 0xff. This value determines the PWM frequency by 
using the following formula: 
PWM period =[(PR2) + 1] x 4 x TOSC x TMR2 prescaler 
2. The value of dutycycle can be any 10-bit number. Only the lower 10-bits of dutycycle are 
written into the duty cycle registers. The duty cycle determines the high time of the PWM 
waveform. 
3. PWM uses TIMER2 for time base. In addition to opening the PWM, TIMER2 must also be 
opened with an OpenTimer2(...) statement before the PWM will operate. See the other 
manual for the timer functions. 
4. TIMER2 postscaler is not used in the determination of the PWM frequency. TIMER2 
postscaler could be used to generate TMR2 interrupts at a different frequency than the PWM 
output. 
5. On the PIC18F4550, also an enhanced PWM can be used. The enhanced PWM can be 
used for motor driving: half-bridge and full-bridge (forward and reverse). See the MPLAB C18 
C Compiler Libraries manual for the functions. 
下载该资料的人也在下载 下载该资料的人还在阅读
更多 >

评论

查看更多

下载排行

本周

  1. 1飞利浦D8714收录机说明书
  2. 6.50 MB   |  7次下载  |  10 积分
  3. 2MBRD3060CT TO-252肖特基二极管规格书
  4. 0.65 MB   |  次下载  |  免费
  5. 3MBRD30100CT TO-252肖特基二极管规格书
  6. 0.65 MB   |  次下载  |  免费
  7. 4MBRD30150CT TO-252肖特基二极管规格书
  8. 0.65 MB   |  次下载  |  免费
  9. 5AIWA Z-D3100维修手册
  10. 2.24 MB   |  次下载  |  10 积分
  11. 6爱华707维修手册
  12. 14.08 MB   |  次下载  |  5 积分
  13. 7CG65140DAA_datasheet_V1
  14. 2.36 MB  |  次下载  |  免费
  15. 8st7565p数据手册
  16. 0.85 MB   |  次下载  |  免费

本月

  1. 1元宇宙深度解析—未来的未来-风口还是泡沫
  2. 6.40 MB  |  241次下载  |  免费
  3. 2元宇宙底层硬件系列报告
  4. 13.42 MB  |  184次下载  |  免费
  5. 32022 年展望報告 – 半導體產業
  6. 1.43 MB  |  136次下载  |  免费
  7. 4晶振与滤波器应用电路《电子工程师必备:元器件应用宝典》
  8. 1.57 MB  |  90次下载  |  免费
  9. 5汽车电子行业深度解析:智能化与电动化方兴未艾
  10. 6.47 MB  |  71次下载  |  免费
  11. 6中国DPU行业白皮书
  12. 23.80 MB  |  37次下载  |  免费
  13. 7晶科鑫代理线-微盟电子2021年度产品目录选型手册
  14. 14.75 MB  |  27次下载  |  免费
  15. 8SJK晶振产品目录-简化版-2022
  16. 13.77 MB  |  20次下载  |  免费

总榜

  1. 1matlab软件下载入口
  2. 未知  |  935137次下载  |  10 积分
  3. 2开源硬件-PMP21529.1-4 开关降压/升压双向直流/直流转换器 PCB layout 设计
  4. 1.48MB  |  420064次下载  |  10 积分
  5. 3Altium DXP2002下载入口
  6. 未知  |  233089次下载  |  10 积分
  7. 4电路仿真软件multisim 10.0免费下载
  8. 340992  |  191425次下载  |  10 积分
  9. 5十天学会AVR单片机与C语言视频教程 下载
  10. 158M  |  183352次下载  |  10 积分
  11. 6labview8.5下载
  12. 未知  |  81602次下载  |  10 积分
  13. 7Keil工具MDK-Arm免费下载
  14. 0.02 MB  |  73822次下载  |  10 积分
  15. 8LabVIEW 8.6下载
  16. 未知  |  65991次下载  |  10 积分