1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,AllI配置的POTA 5,6,7作为IOC引脚。负触发器。使用带有ICD3的调试器,我注意到下面的内容,并且无法追踪为什么和怀疑MCC设置错误。我确实通过了MCC创建的中断管理器C和PixMealth.C来进行双重检查。当监视IOCAF标志寄存器时,调试窗口中发生以下情况。引脚7(H->L)和相应的IOCAF(7)设置正确,引脚6(H->L)和相应的IOCAF(6)设置正确。But销5(H->L)设置IOCAF引脚5、6和7。但是,如果我把引脚6,7拉到L,然后触发引脚5,IOCAF(5)正确设置。代码是从MCC所有标准我没有写任何东西。如果我看波尔塔(触发端口),这些比特对应于我正在切换的引脚。我已经附加了调试窗口的屏幕快照一旦中断发生。
以上来自于百度翻译 以下为原文 Hi All I configured PORTA 5,6,7 as IOC pins. Negative trigger. Using the Debugger with ICD3 I noticed the following and cant track down why and suspect MCC setup error. I did go through the interrupt_manager.c and pin_manager.c created by MCC to double check. The following is happening in the Debug window when monitoring IOCAF flag register. pin 7 (H ->L) and the corresponding IOCAF (7)is set correctly,pin 6 (H ->L) and the corresponding IOCAF (6) is set correctly. But pin 5 (H ->L) sets IOCAF pin 5,6 and 7. However if I pull pin 6,7 down to L, and then trigger pin 5, IOCAF (5) sets correctly. The code is all standard from MCC I have not written anything. If i look at PORTA (trigger port) the BITS correspond to what I am switching on the pin. I have attached a screen shot of the debug window as soon as the interrupt occur. Thanks in advance Attached Image(s) |
|
相关推荐
5个回答
|
|
你对输入有任何负担,还是浮动?这些输入将响应非常小和快速的瞬变,这可能导致它们触发时,相邻引脚切换。
以上来自于百度翻译 以下为原文 Do you have any load on the inputs or are they floating? These inputs will respond to very small and fast transients that could be causing them to trigger when adjacent pins are toggled. |
|
|
|
嗨,杰克,三个引脚都是一样的。4K7拉到5V,通过光耦合器被拉到地上。我认为IL现在尝试将所有8个引脚配置为IOC,并查看在旗标报告中的位置。
以上来自于百度翻译 以下为原文 Hi Jack, All three pins are connected the same. 4k7 pullup to 5V, being pulled down to ground via a optocoupler. I think what il try now is configure all 8 pins as IOC and see where that leads as far as flag reporting goes. |
|
|
|
把你的代码(所有的)都贴出来是一件好事,这样我们就能更好地了解正在发生的事情。
以上来自于百度翻译 以下为原文 It may be a good thing to post your code (all of it) so we can get a better idea of what is going on. |
|
|
|
在配置所有8个POTA作为IOC PIN之后,我发现了以下内容。7 IOCAF标志对应于它们各自的触发输入。只有IOCAF不能正确反映的PoTA引脚6。现在,所有8个引脚配置为IOC引脚6导致IOCAF的B’111111’00’一旦我进入中断。从数据表中,除了OSC2KLKOUT(禁用)之外,该引脚没有其他功能。再次报告iOCAF标志正确,如果我拉其他所有引脚接地。几乎就像IOCAF正在阅读PoTA。
以上来自于百度翻译 以下为原文 After configuring all 8 PORTA as IOC pins I found the following. 7 IOCAF flags corresponds to their respective trigger inputs. It is only PORTA pin 6 that does not reflect correctly on IOCAF. Now that all 8 pins are configured as IOC pin 6 results in a IOCAF of b'11111100' as soon as I enter the interrupt. from the datasheet this pin has no other functions except OSC2_clkout (which is disabled). Again it reports IOCAF flags correctly if I pull all the other pins to ground. Almost as if the IOCAF is reading PORTA. |
|
|
|
我结束了在ASM中重写代码,仍然在做同样的事情。所以不是MCC设置问题。勘误表里什么也没有。我现在唯一的解决方案是手动清除额外的IOCAF标志。
以上来自于百度翻译 以下为原文 I ended rewriting the code in ASM and still doing the same. So not a Mcc setup problem. Nothing in the errata sheets. My only solution for now is to clear the additional IOCAF flags manually. |
|
|
|
只有小组成员才能发言,加入小组>>
5242 浏览 9 评论
2031 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3207 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2256 浏览 5 评论
778浏览 1评论
669浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
596浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
678浏览 0评论
577浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 18:49 , Processed in 1.263316 second(s), Total 84, Slave 68 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号