完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我在PIC32 MX264F256设备上配置PIN 33和34的问题。具体来说,我不能启用拖发器,将它们设置为输出,或者为任一引脚设置锁存器。这些引脚多路复用与二次振荡器,我已经确定禁用。调试显示对控制寄存器的写入不会改变这些引脚上的位。我检查过的其他引脚工作正常。我已经在2个独立的设备上验证了这个行为。有没有人知道配置这些引脚有什么诀窍吗?
以上来自于百度翻译 以下为原文 I'm having issues configuring pins 33 & 34 on a PIC32MX274F256 device. Specifically, I cannot enable the pull ups, set them as outputs, or set the latch for either pin. These pins are multiplexed with the secondary oscillator which I have made sure is disabled. Debugging shows writes to the control registers do not change the bits on these pins. Other pins I have checked are working as expected. I have verified this behavior on 2 separate devices. Does anyone know if there is a trick to configuring these particular pins? |
|
相关推荐
5个回答
|
|
准确记录你所做的事情以确保它被禁用是有帮助的。
以上来自于百度翻译 以下为原文 It would be helpful to document exactly what you did to make sure it is disabled. |
|
|
|
准确地记录你做了什么来确保它被禁用是有帮助的。我使用的是和声(V2.05)。我确保FSCOSEN在时钟图和配置位设置中都关闭。我还使用CIPIT3在调试器中运行它,并检查了OsCon Reg中的FSoScript和SoScript在SyssiPosisInIrimalIZE()执行之前都是0。当我通过该函数时,可以看到它写入端口控制寄存器,但是对于A4和B4引脚都忽略了写。对TIS、LAT、OCD、CNPU和CNPD的写入都被忽略了这2个引脚。我能写的唯一的寄存器是CNEN。据我所知,其他的PIN都是正确的。如果SoSC被启用,我不确定写是否会被阻止,这只是我对正在发生的事情的第一个假设。
以上来自于百度翻译 以下为原文 It would be helpful to document exactly what you did to make sure it is disabled. I'm using harmony (v2.05). I made sure FSOSCEN is off in both the clock diagram and configuration bit settings. I also ran it in debugger using pickit3 and checked that both FSOSCEN and SOSCEN in the OSCCON reg are both 0 before SYS_PORTS_Initialize() executes. As I step through that function I can see it writes to the port control registers, but the writes are ignored for both pins A4 and B4. Writes to TRIS, LAT, OCD, CNPU, and CNPD are all ignored for those 2 pins. The only register I can write to is CNEN. From what I can tell every other pin is working correctly. I'm not sure if writes would normally be blocked like that if sosc was enabled, that was just my first assumption of what's going on. |
|
|
|
因为没有代码要审查,而且我不使用和声(对我来说它非常不和谐),所以我只能指向页面底部的注释,引用OSCCon寄存器:注释:写入这个寄存器需要一个解锁序列。请参阅第42节。“增强型PLL振荡器”(DS600 01250)在“PIC32系列参考手册”中详细介绍。
以上来自于百度翻译 以下为原文 Since there is no code to review, and I don't use harmony (to me it is very unharmonious), I can only point to the note at the bottom of the page referring to the OSCCON register: Note: Writes to this register require an unlock sequence. Refer to Section 42. “Oscillators with Enhanced PLL” (DS60001250) in the “PIC32 Family Reference Manual” for details. |
|
|
|
我知道解锁顺序。在配置振荡器时,和声需要注意。但是正如前面提到的,我的问题不是写在OsCon Reg上。我的问题是写入端口控制寄存器。问题是,是否有人知道配置RA4和RB4 IO引脚的特殊程序,或者是否有人实际使用这些引脚中的任一个作为输出。
以上来自于百度翻译 以下为原文 I'm aware of the unlock sequence. Harmony takes care of that when configuring the oscillator. But as stated earlier my problem is not with writing to the OSCCON reg. My problem is writing to the port control registers. The question was whether or not anyone is aware of a special procedure for configuring RA4 and RB4 IO pins, or if anyone has actually used either of these pins as outputs. |
|
|
|
我与PIN 33和34有同样的问题,我不能用作为输出。我在某处发红,这些插脚只能作为输入程序。
以上来自于百度翻译 以下为原文 I have the same problem with pin 33 and 34, I can not use as an output. I red somewhere that those pins can program ONLY as inputs. |
|
|
|
只有小组成员才能发言,加入小组>>
4814 浏览 9 评论
1823 浏览 8 评论
1743 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
2949 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2055 浏览 5 评论
452浏览 1评论
1107浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
355浏览 0评论
260浏览 0评论
LAN9252使用SQI通信,进行数字复位后读BYTE_TEST异常
1777浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-20 00:09 , Processed in 1.208339 second(s), Total 76, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号