Microchip
直播中

邹俩珍

7年用户 1026经验值
私信 关注
[问答]

PIC18F47K40也无法将所有IO用作通用IO

我买了这个新的PIC18F47 K40为我的新的基于GSM的产品。现在我可以使用UART中断它,但我有一些问题,使用一些引脚作为输入和输出的微控制器。我已经尝试了MCC和研究的PPS,但没有结果。我已经附加了文件在其中我不能使用PurbButs.RB1作为输入引脚。蜂鸣器(PurcStudio.RC2)始终保持低位。欢迎任何帮助。谢谢。

以上来自于百度翻译


      以下为原文

    I have purchased this new PIC18F47K40 for my new GSM based product.
Now I am able to use UART with interrupt on it but I am having some problem on using some of the pins as Input and output of the microcontroller.
I have tried MCC and studied about PPS but no result.
I have attached the file in which I am not able to use PORTBbits.RB1 as input pin.. The buzzer (PORTCbits.RC2) always remains low.

Any help is most welcome.

Thanks
   Attachment(s)

temp.c (13.58 KB) - downloaded 217 times

回帖(2)

李天竹

2019-4-24 14:40:14
首先,我建议通过将探针直接插入PIN来检查信号是否到达引脚。然后我建议您制作一个非常小的程序,该程序只读取RB1并相应地点亮LED,而不做任何其他操作。这样你就可以判断它是芯片问题还是代码。

以上来自于百度翻译


      以下为原文

    The first, I would suggest checking if the signal ever gets to the pin by putting a probe directly to the pin.
 
Then I suggest you make a very small program which only reads RB1 and lights up a LED accordingly, and does nothing else. This way you'll be able to tell if it is the chip problem or your code.
举报

张丽雯

2019-4-24 15:01:33
谢谢大家解决的问题…我用Microchip代码配置器来配置iOS。编写到闩锁和从端口读取帮助…谢谢。

以上来自于百度翻译


      以下为原文

    Thankyou guys problem solved.. 
I used microchip code configurator to configure the IOs.
Writing to LAtch and reading from ports helped..
 
Thankyou
举报

更多回帖

发帖
×
20
完善资料,
赚取积分