完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我是微控制器和微芯片产品的新用户。我正在研究一个使用DSPIC33微控制器来控制无刷直流电动机的项目。当试图使用外部中断为我的3个霍尔效应传感器生成中断时,我遇到了一个问题。控制器上似乎只有2个外部中断输入是可重用的。这些是It1和It2。IMT0被映射到“故障重置”,据我所知,不能重新映射。我使用的数据表为我的确切微控制器,并说,在其中,国际货币基金组织不能重新映射。有什么我错过了吗?我知道微芯片为无刷直流电机制造这些控制器,所以我肯定是做错了。任何反馈或建议都非常感谢!微控制器:DSPIC33 EP256MC506DEV板:DSPICDEM - 2 MCLVDePLANER:真实ICCOMPER:MPLAB XKPATEL0US
以上来自于百度翻译 以下为原文 Hello All, I am a new user of microcontrollers and microchip products. I am working on a project to commuate a BLDC motor using the dsPIC33E microcontroller. I am running into an issue when trying to generate interrupts for my 3 hall effect sensors using external interrupts. It seems that there are only 2 external interrupt inputs on the controller that are remappable. These are INT1 and INT2. INT0 is mapped to "FAULT RESET" and cannot, to my knowledge, be remapped. I am using the data sheet for my exact microcontroller and it says in it that INT0 cannot be remapped. Is there something that I am missing? I know microchip makes these controllers for BLDC motors so I must be doing something wrong. Any feedback or advice is greatly appreciated! Microcontroller: dsPIC33EP256MC506 Dev Board: dsPICDEM -2 MCLV Programmer: Real ICE Compiler: MPLAB X Kpatel0 USA |
|
相关推荐
14个回答
|
|
不可恢复意味着它是RB7,不能映射到另一个PIN。另外两个可以移到不同的PiSi看不到“故障重置”的数据表。
以上来自于百度翻译 以下为原文 Not Remapable means it is RB7 and can not be mapped to another pin. The other two can moved to different pins I do not see "FAULT RESET" in the data sheet. |
|
|
|
谢谢你的回复。对不起,我正在看“外部运放PIM信息表”。关于PIM示意图和表格.http://ww1.micro..com/downloads/en/DeviceDoc/.%20op%20amp%20pim%20info%20sheet.pdf您是说我可以使用INT0作为霍尔效应传感器输入吗?
以上来自于百度翻译 以下为原文 Thanks for the reply. Sorry, I was looking at the "External Op Amp PIM Info Sheet". On the PIM schematic and table. http://ww1.microchip.com/downloads/en/DeviceDoc/external%20op%20amp%20pim%20info%20sheet.pdf Are you saying that I can use INT0 as a hall effect sensor input? |
|
|
|
你可以随意使用INT0。如果信号叫做“FAULT RESET”,那么这个示例板就是碰巧使用的。正如Neil所说,PIC数据表是你的主要参考,那个PIM板只是一个示例用法。
以上来自于百度翻译 以下为原文 You can use INT0 for whatever you like. That example board just happens to use if for a signal called "FAULT RESET". As Neil said, the PIC datasheet is your main reference, that PIM board is just an example usage. |
|
|
|
好的,那么我可以用It0做我想在那个示例板上的任何东西吗?外部运算放大器pim信息表指的是dsPICDEM-MCLV2,它是我正在结合dsPIC33EP256MC506使用的板。我想知道我是否能够在这个dsPICDEM MCLV-2板上使用INT0作为我的HALL-A的输入。它被列为“故障重置”?我目前的想法是RB7(无法重新映射)直接连接到开发板“故障重置”。我希望我适当地传达我的担心/想法。再次感谢反馈。
以上来自于百度翻译 以下为原文 Ok, so can I use INT0 for whatever I'd like on that example board? The external op amp pim info sheet is referring to the dsPICDEM - MCLV2 which is the board that I'm currently using in conjunction with the dsPIC33EP256MC506. I'm wondering if it's possible on this dsPICDEM MCLV -2 board if I can use the INT0 as an input for my HALL - A. Is this possible even though it's listed as "FAULT RESET"? My current thoughts are that RB7 (which cannot be remapped) is connected to the dev board "FAULT RESET" directly. I hope that I properly communicated my worries/thoughts. Thanks again for the feedback. |
|
|
|
如果EVE板不适合你的需要,可以修改,那么你需要做一个板。
以上来自于百度翻译 以下为原文 If the Eval Board does not suit your needs and can be modified, then you will need to make a board that does. |
|
|
|
http://www. McCux.com/…p;utMyCase=文章
以上来自于百度翻译 以下为原文 http://www.microchip.com/...p;utm_campaign=Article |
|
|
|
http://ww1.micro..com/downloads/en/AppNotes/BLDC%20MC%2000957a.pdf看起来他们在使用霍尔传感器的更改通知。这是一个选项。
以上来自于百度翻译 以下为原文 http://ww1.microchip.com/downloads/en/AppNotes/BLDC%20MC%2000957a.pdf It looks like they are using change notification for the Hall Sensors. That is an option. |
|
|
|
谢谢尼尔!我会尝试使用改变通知方法为我的大厅。
以上来自于百度翻译 以下为原文 Thanks Neil! I will try to use the change notification method for my Halls. |
|
|
|
有没有办法同时访问多个端口?我在查看您发布的AN957文档,在示例代码中,它们访问PORTB以获得HallValue,但是它们的管脚都在PORTB中。电路板的插脚在所有单独的端口上。AN957我的端口是PORTA PORTC PORTF,我想屏蔽RA8(大厅A)、RC6(大厅B)、RFO(大厅C)。你知道我能把不同的港口掩盖在一起吗?再次感谢。
以上来自于百度翻译 以下为原文 Is there a way to access multiple ports at the same time? I'm looking at the AN957 doc that you posted and in the sample code they access PORTB to get the HallValue, but their pins are all in PORTB. The pins for my board are on all separate ports. AN957 void _ISR _CNInterrupt(void) { IFS0bits.CNIF = 0; // clear flag HallValue = PORTB & 0x0038; // mask RB3,4 & 5 HallValue = HallValue >> 3; // shift right 3 times OVDCON = StateLoTable[HallValue]; } My ports are PORTA PORTC PORTF and I want to mask RA8 (Hall A), RC6 (Hall B), RFO (Hall C). Do you know a way for me to mask the different ports together? Thanks again. |
|
|
|
没有单独的汇编指令来收集引脚,所以编译器必须生成代码来合并所有位。
以上来自于百度翻译 以下为原文 There's no single assembler instruction to gather pins together, so the compiler will have to generate code to merge all the bits. Something like: HallValue = (RA8 << 2) | (RC6 << 1) | (RF0 << 0); |
|
|
|
非常感谢QHB!我试着把它们单独设置,结果结束了。但我想把它们排成一行,谢谢。
以上来自于百度翻译 以下为原文 Thanks so much qhb! I tried setting them individually and that ended up working. But I'd like to set them in one line so thanks for that. |
|
|
|
请注意,让它们在一行上并不能使其成为原子操作。
以上来自于百度翻译 以下为原文 Just be aware that having them on one line does not make it an atomic operation. GP. |
|
|
|
是的,但是对于大多数“人类”应用来说,“一起”应该足够多。
以上来自于百度翻译 以下为原文 Yeah, but for most "human" applications that "together" should be together enough |
|
|
|
谢谢你们所有人的帮助!感谢大家给我的反馈。我正经历着一个问题,正确设置我的PWM信号。对于DSPIC33 EP256MC506,在ICONCOX寄存器中处理PWM配置。我感兴趣的配置是PMOD、POLH和轮询。PMOD有4种配置,00、01、10、11。POLH表示PWMH侧引脚是激活高还是激活低。POLL表示PWML侧引脚是激活高还是激活低。0=激活高,1=激活低。我所期望的配置是创建冗余的PWM信号,以便当不重写时,高侧跟随下侧。这是必要的,因为我的H桥驱动器对于Vdd的连接是活动的高,对于Gnd的连接是活动的低。我已经尝试在所有16种可能的组合中以10KHz的频率配置我的PWM信号,这就是我所遇到的。http://imgur.com/a/J1NrNNote:In t当推挽配置没有错误时,信号非常嘈杂,频率仅为5KHz,而不是所有其他配置中预期的10KHz。此外,这种配置的占空比是25%,而不是像其他配置的50%。注意:引用的错误是完全关闭所有PWM输出和微控制器发出的听起来像错误蜂鸣的电噪声。计算输出中实际冗余的PWM信号,以及为什么IOCONx寄存器的特定配置会导致错误状态?这样的信息不会出现在文档中吗?再次感谢大家的帮助。
以上来自于百度翻译 以下为原文 Thanks for all of your guy's assistance! Appreciate the feed back everyone has given me. I'm experiencing an issue with properly setting up my PWM signals. For the dsPIC33EP256MC506 the PWM configuration is handled in the IOCONx registers. The configurations that I'm interested in setting are the PMOD, POLH and POLL. PMOD has 4 configurations, 00, 01, 10, 11. POLH indicates if the PWMH side pin will be active high or active low. POLL indicates if the PWML side pin will be active high or active low. 0 = Active High, 1 = Active Low My desired configuration would be to create PWM signals that are redundant so that the high side follows the low side when not overridden. This is necessary because my H-bridge drives are active high for the connection to Vdd and active low for the connection to Gnd. I've attempted to configure my PWM signals at a frequency of 10KHz in all the 16 possible combinations and this is what I've encountered. Here is a picture of a table I made with the modes since I could not post it in here or as a picture. http://imgur.com/a/J1NrN http://imgur.com/a/J1NrN Note: In the push-pull configuration when it was not erroring, the signals were very noisy and the frequency was only 5KHz instead of the expected 10KHz of all other configurations. Also, the duty cycle for this configuration was 25% instead of 50% like the other configurations. Note: The error's that are being referenced completely turn off all PWM outputs and an electric noise emmits from the microcontroller that sounds like an error buzz. My question is how can I properly configure a PWM signals that is actually redundant in output and why would particular configurations of the IOCONx registers result in error states? Wouldn't information like this appear in the documentation? Thanks again for everyone's help. kpatel0 |
|
|
|
只有小组成员才能发言,加入小组>>
5171 浏览 9 评论
2001 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3176 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
635浏览 0评论
531浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 23:55 , Processed in 1.631993 second(s), Total 111, Slave 90 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号