完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
有没有人知道,如果提高PTCON.PTEN重置主时基计数器,还是只是从它的当前值开始运行?我把自己放在一个角落里,我只需要使用地图到一个PWM模块,而不是一个OC。我可以让它工作,如果我可以重置PMW计数器在需要时0,但文件不清楚。任何其他基于代码的重新计算PMW计数的方法也会有效,但是没有外部同步的IO。谢谢,I.B.。
以上来自于百度翻译 以下为原文 Does anyone know if raising PTCON.PTEN resets the master timebase counter or does it just start running from it's current value? I've gotten myself in a corner in that the pin I need to use only maps to a PWM module and not an OC. I can make it work if I can reset the PMW counter to 0 when needed but documentation is unclear on that. Any other code based method of rertarting the PMW count would work as well, but don't have IO for an external sync. Thanks, I.B. |
|
相关推荐
4个回答
|
|
它只是启用模块。不写别的,不做别的。如果有人喜欢从非零值开始,这也是可能的。否则……
以上来自于百度翻译 以下为原文 It is just enabling the module. Nothing else is written, nothing else is done. If somebody prefers to start with a non-zero value, this is possible as well. Otherwise ..... |
|
|
|
谢谢你的信息,这正是我所期待的。我需要零主PWM计数器每当它被重新启用后禁用。第一脉冲的时序在这个应用程序中是关键的。有办法这样做吗?我理解用OC代替PWM是微不足道的,但是此时需要IO引脚开关和电路板的修改,如果可能的话,我希望避免。
以上来自于百度翻译 以下为原文 Thanks for the info, that is what I expected. I need to zero the master PWM counter every time it is re-enabled after a disable. Timing of the first pulse is critical in this app. Is there a way to do that? I understand that it is trivial with an OC instead of the PWM but that would require an IO pin switch and board revision at this point which I hope to avoid if possible. |
|
|
|
问:你真的需要PWM还是输出比较(OC)功能完全满足你的需要?关于第一脉冲的定时:不需要将PWM计数器归零。你可以从任何一个值开始,它允许控制第一个脉冲的时间。但是,根据你的应用,这个方案可能变得“非常棘手”。因此,如果OC完全满足你的需要,重新设计可能是可行的。或者-如果适用于你的衍生工具和设计-映射一个OC功能到这个引脚通过PPS。
以上来自于百度翻译 以下为原文 Question: Do you really need PWM or would the output compare (OC) function completely satisfy your needs ? Regarding the timing of the first pulse: there is no need to zero the PWM counter. You may start with any value, which allows to control the timing of the first pulse. Though - depending on your application - this scheme might become 'really tricky'. Thus, if OC completely satisfies your needs, a redesign might be feasible. Or - if applicable for your derivative and design - to map an OC function to this pin by means of PPS. |
|
|
|
谢谢你的回复。OC做我需要的一切,在这种情况下比PWM更好,因为在一个模式中,我需要一个镜头和PWM在另一个模式。问题是OC不映射到被指定用于功能的PIN。我们已经决定进行电路板的修改,并使用带有OC映射的管脚。我想了解如果PWM模块中的第一个脉冲之前已经启用,那么如何控制时间。(供以后参考)我还没有看到将PWM模块中的计数器设置回0或读取它的值以知道如何将延迟设置为第一脉冲的方法。不过您不需要为此投入更多的时间。我感谢你以前的回答。
以上来自于百度翻译 以下为原文 Thanks for the reply. OC does everything I need, and in this case better than the PWM, since in one mode I need a one shot and PWM in another mode. Problem is that OC does not map to the pin that was designated for the functionality. We've decided to go with the board revision and use a pin with OC mapping. I would like to understand how it would be possible to control the time before the first pulse in the PWM module if it has been previously enabled though. (for future reference) I haven't seen a way to set the counter in the PWM module back to 0 or read it's value to know how to set a delay to first pulse. No need for you to put more time into this though. I appreciate your previous responses. |
|
|
|
只有小组成员才能发言,加入小组>>
5184 浏览 9 评论
2005 浏览 8 评论
1932 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3179 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2230 浏览 5 评论
740浏览 1评论
626浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
512浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
638浏览 0评论
536浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-28 17:25 , Processed in 1.295190 second(s), Total 83, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号