完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
亲爱的鲁宾,我在Simulink开发了一个获得正弦PWM的模型。我将正弦曲线的期望频率插入到常数中,这将在查找表索引中进行变换。在查找表中有正弦波的值。在Simulink中运行仿真,我得到了预期的结果:三个正弦波从120个移动到另一个正弦波。然后,如果我设置50MIPS和0.001的固定步长(配置time1)和I编程设备,我得到同样的东西。当我改变MIPS或固定步长(Time1)时,在SIMULINK中,仍然得到一个50Hz的正弦波(如预期的那样),而当我编程时,我得到一个非常低的频率:在5到7赫兹之间或多或少。PPN。在50MIPS和0.001固定步长下,我得到4Hz,如果我改变这些值,LED闪烁在非常低的频率。我不明白问题在哪里。你有什么建议吗?谢谢你。
以上来自于百度翻译 以下为原文 Dear Lubin, I have developed in Simulink the model to obtain a sinusoidal PWM. I insert in the constant the desired frequency of the sinusoid, this will be transformed in the lookup table index. In the lookup table there are the values of a sinusoid. Running the simulation in Simulink, I obtain what expected: three sinusoids shifted of 120 degree one from the other. Then, if I set 50MIPS and 0.001 of fixed step size (that configure Timer1) and I program the device, I obtain the same thing that I obtain in Simulink. Whenever I change the MIPS or the fixed step size (Timer1), in Simulink I still obtain a 50Hz sinusoid (as expected), while when I program the device I obtain a very low frequency: more or less between 5 - 7 Hz. Also, I have put an LED with 4Hz frequency and the same thing happen. With 50MIPS and 0.001 fixed step size I obtain 4Hz and if I change these values the LED blinks at a very low frequency. I cannot understand where is the problem. Do you have suggestions? Thank you. Best regards, Filippo Attached Image(s) |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475 浏览 0 评论
5795 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1125浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1098浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 22:22 , Processed in 1.188657 second(s), Total 70, Slave 53 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1342