完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
如何在PIC32 MX564 F128L中配置GPIO作为中断IO端口数据表,它们提到了用于输入更改通知(CN)的I/O端口的输入更改通知(CN)功能,使得PIC32设备响应状态O的改变而向处理器生成中断请求。n选择输入Pin。但是他们只提到了变更通知控制(CNCONX),没有关于其他寄存器IKECNPUX、CNPDx、CNENX/CNNEX、CNSTATX/CNFX的详细信息。我需要知道配置程序来配置GPIO中断,这有什么例子。
以上来自于百度翻译 以下为原文 How to configure GPIO in pic32mx564f128l as interrupt In IO port datasheet they mentioned as Registers for Input Change Notification (CN) The input Change Notification (CN) function of the I/O ports allows PIC32 devices to generate interrupt requests to the processor in response to a change-of-state on selected input pins. but they mentioned only about Change Notice Control (CNCONx), there is no details about other register like CNPUEx, CNPDx, CNENx/CNNEx, CNSTATx/CNFx. I need to know configuration procedure for Configure GPIO to interrupt, and is there any example for this . |
|
相关推荐
10个回答
|
|
你不是在使用Orthic和MPLAB和谐配置器(MHC)来安装你的应用程序吗?这些细节大部分是由HAMONI和MHC处理的。如果你使用的是和声和MHC,哪个版本?
以上来自于百度翻译 以下为原文 Are you not using Harmony and the MPLAB Harmony Configurator (MHC) to setup your application? Most of these details are handled by Hamony and MHC. If you are using Harmony and MHC, which version? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
这是从PIC32家庭参考手册部分的端口:122.6寄存器输入更改通知。I/O端口的输入更改通知(CN)功能允许PIC32设备响应于选择输入上的状态改变而向处理器生成中断请求。插脚。这个功能可以检测输入状态的变化,即使在睡眠模式下,当时钟被禁用时,五个控制寄存器与每个I/O端口的CN功能相关:改变通知启用(CNENX)改变通知状态(CNSTATX)。改变通知拔起启用(CNPUX)。更改通知PEn-Delabelnabl(CNPDX)·改变通知控制(CNCONX)CNEX寄存器包含CN中断启用控制位用于每个输入引脚。设置这些位中的任何一个都能为相应的引脚提供一个CN中断。CNSTATX寄存器指示在Poxx位的最后一次读取之后是否在相应的PIN上发生了变化。每个I/O引脚也具有弱的上拉和弱的下拉连接。上拉电流是一个电流源或汇源连接到引脚,并消除了需要外部电阻器时,按钮或键盘装置连接。使用CNUPX和CNPDX寄存器分别启用了上拉和下拉寄存器,这些寄存器包含每个引脚的控制位。设置任何一个控制位可以使相应的引脚的弱拉升和/或下拉。在寄存器12-1寄存器12-1:CNCONX:变更通知控制寄存器位15ON中显示一个附加的控制寄存器(CNCONX):对BIT1= CN的更改通知(CN)控制被允许0:CN不被禁用。E:在更改通知引脚上的上拉和下拉应该总是被禁用。您可以通过查阅覆盖目标处理器的数据表来获取这些寄存器的内存映射。在数据表的PDF中搜索“PORTA”或等价物。您可以在DrimtYC:程序文件(x86)Microchip xC32 V1.43PIC32 MXAcPro中找到处理器的头文件。在处理器的头文件中,再次搜索端口或等效项。您将发现数据结构,允许您直接为您的端口敲击特殊功能寄存器(SFRS)。例如,打开PORTA的更改通知:γ包含和lx.H.& gt;CNCONABITITS.ON=1;
以上来自于百度翻译 以下为原文 This is from the PIC32 Family Reference Manual section on the Ports: 12.2.6 Registers for Input Change Notification The input Change Notification (CN) function of the I/O ports allows the PIC32 devices to generate interrupt requests to the processor in response to a change-of-state on selected input pins. This feature can detect input change-of-states even in Sleep mode, when the clocks are disabled. Five control registers are associated with the CN functionality of each I/O port: •Change Notice Enable (CNENx) •Change Notice Status (CNSTATx) •Change Notice Pull-up Enable (CNPUEx) •Change Notice Pull-down Enable (CNPDx) •Change Notice Control (CNCONx) The CNENx registers contain the CN interrupt enable control bits for each of the input pins. Setting any of these bits enables a CN interrupt for the corresponding pins. The CNSTATx register indicates whether a change occurred on the corresponding pin since the last read of the PORTx bit. Each I/O pin also has a weak pull-up and a weak pull-down connected to it. The pull-ups act as a current source or sink source connected to the pin, and eliminate the need for external resistors when push-button or keypad devices are connected. The pull-ups and pull-downs are enabled separately using the CNPUEx and the CNPDx registers, which contain the control bits for each of the pins. Setting any of the control bits enables the weak pull-ups and/or pull-downs for the corresponding pins. An additional control register (CNCONx) is shown in Register 12-1. Register 12-1:CNCONx: Change Notice Control Register bit 15 ON: Change Notice (CN) Control ON bit 1 =CN is enabled 0 =CN is disabled Note: Pull-ups and pull-downs on change notification pins should always be disabled. You can get memory map for these registers by consulting the datasheet that covers your target processor. Search for "PORTA" or equivalent in the datasheet's PDF. You can find the header file for your processor in the directory C:Program Files (x86)Microchipxc32v1.43pic32mxincludeproc. In the header file for your processor, search again for PORTA or equivalent. You will find data structures that allow you to directly bit bang the Special Function Registers (SFRs) for your port. For example, to turn on Change Notification for PORTA: #include CNCONAbits.ON = 1; |
|
|
|
我在PIC32 MX564 F128L头上检查了以上细节,我发现CNCONBIT而不是CNCONABITS ORCNCONDBSI是新的,请帮助我配置GPIO引脚作为中断。我需要配置的PIN是83 PMD14/CN15/RD6在PICP32 MX564 F128L。
以上来自于百度翻译 以下为原文 I checked the above details in pic32mx564f128l header, i find only CNCONbits instead of CNCONAbits or CNCONDbits I am new to this please help me to configure GPIO pin as interrupt . the pin I need to configure is 83 PMD14/CN15/RD6 in pic32mx564f128l. |
|
|
|
对于PIC32 MX564 F128L,我不能找到CNCONABIT,我只在头上找到CNCONBIT。
以上来自于百度翻译 以下为原文 For pic32mx564f128l i cant find the CNCONAbits seperately, i find only CNCONbits in header |
|
|
|
|
|
|
|
我找不到PIC32 MX564 F128L报头中的cNCONABIT,我发现只有CNCONTITE
以上来自于百度翻译 以下为原文 I cant find the CNCONAbits in pic32mx564f128l header i find only CNCONbits |
|
|
|
HTTP:/WW1.MICCHIP.COM/DeLoSs/En/DeVICECD/OC0111120F.PDFDoc将有助于…
以上来自于百度翻译 以下为原文 http://ww1.microchip.com/downloads/en/DeviceDoc/60001120F.pdf This Doc will help... |
|
|
|
只有小组成员才能发言,加入小组>>
5145 浏览 9 评论
1993 浏览 8 评论
1921 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3162 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2218 浏览 5 评论
713浏览 1评论
601浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
484浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
613浏览 0评论
512浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-11 04:49 , Processed in 1.163086 second(s), Total 64, Slave 58 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号