完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
HI有一个现有的硬件,那里没有连接到RC7,在软件中它被设置为数字输入。在复位之后,我读取PIN,它在我测试的五个设备上始终读取1。我能相信吗?有一个方便的头部连接到RC7,在那里我可以把一个跳线接在引脚上,但是一个跳跃将它连接到VCC上,并且没有上拉,所以如果没有跳线的话,我可以相信输入是1,那当然不错。当然,我可以在那里焊接一个电阻,但是如果我能的话,那就好了。我不需要。
以上来自于百度翻译 以下为原文 Hi I've got an existing hardware where there is nothing connected to RC7, in the software it set as digital input. Right after reset I read the pin and it consistently reads as 1 on five devices I tested. Can I trust this? Background. There is a convenient header attached to RC7 where I can put a jumper to ground the pin but a jump connect it to VCC and there is no pull up, so it would be nice if I could rely on the input being 1 if no jumper is in place. Of course I can solder a resistor there but would be nice if I did not have to. cheers Kusti |
|
相关推荐
7个回答
|
|
|
在PIC18F45 K50上,当GPIO引脚被配置为模拟输入时,数字输入缓冲器内部连接到VSS。因此,如果您不使用RC7作为数字输入或输出,则使用ANSELC寄存器配置PORTC位RC7作为模拟输入。
以上来自于百度翻译 以下为原文 On a PIC18F45K50 when a GPIO pin is configured for analog input the digital input buffer is internally connected to VSS. So if you are not using RC7 as a digital input or output then configured PORTC bit RC7 as an analog input using the ANSELC register. |
|
|
|
|
|
嗨,遵从工程格言,“如果有可能出问题,它会”,我只是把一个拉上针,并确保,跳线ON/OFF检测到100%。
以上来自于百度翻译 以下为原文 Hi, In deference to the engineering maxim, 'If something can go wrong, it will', Id just put a pull up on the pin and be sure, the jumper ON/OFF is detected 100% |
|
|
|
|
|
没有。在这个引脚上没有内部上拉,所以只是运气好,它们读得很高。这可能在不同的电源电压、环境温度或PIC批次上发生变化。安装电阻。PIC甚至在PORTC上没有一个弱的PLULUP选项(它在PORTB和一些其他端口引脚上),所以您可以。如果浮动的话,它肯定会读得很高。你也不应该把浮脚作为输入。
以上来自于百度翻译 以下为原文 No. There is no internal pullup on that pin, so it's just luck that they read high. This could change at different supply voltages, ambient temperatures, or PIC batches. Fit the resistor. That PIC doesn't even have a weak pulllup option on PORTC ( it does on PORTB, and some other port pins), so you can't be sure it will read high if floating. You also should NOT leave a floating pin as an input. |
|
|
|
|
|
您好,您不能依赖于一个浮动的(未连接的)数字输入状态。您可以观察到,对于许多设备家庭,未连接的输入通常会采取相同的状态,但不应依赖于此。如果您在周围环境中存在较多的EMC噪声,则其行为可能不同。如果你想使用输入来检测是否有跳线,应该有一个拉(或下拉)电阻,以确保一致的阅读。迈西尔
以上来自于百度翻译 以下为原文 Hi, You cannot rely on the state of a floating (unconnected) digital input. You may observe that for many device families, unconnected inputs will normally take the same state, but should not rely on that. If you get in a environment where there is more EMC noise around, it may behave different. There are horror stories around. If you want to use the input to sense if there is a jumper present, there should be a Pull-up (or pull-down) resistor, to ensure consistent reading. Mysil |
|
|
|
|
|
好的,恐怕你是对的,这是不可信的,谢谢你的确认。叹息。只是为了记录,输入是一致的0,不是1,正如我所说,但不能被信任。谢谢大家!
以上来自于百度翻译 以下为原文 Right, I'm afraid you are right it cannot be trusted, thanks for the confirmation. Sigh. Just for the record the input was consistently 0 not 1 as I stated, but cannot be trusted. Thanks everyone! |
|
|
|
|
|
你清理干净了吗?如果它处于默认(SET)状态,则无论引脚上的电压如何,都将读取零。
以上来自于百度翻译 以下为原文 Had you cleared ANSELC7? If it was in the default (set) state, you would always read zero regardless of the voltage on the pin. |
|
|
|
|
|
安塞尔是正确的,PIN作品(如果我把它拉起来,它读1,否则0)。wbr Kusti
以上来自于百度翻译 以下为原文 The ANSEL is correct and the pin works (if I put a pull up there it reads 1, otherwise 0). wbr Kusti |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475 浏览 0 评论
5794 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1124浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1098浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 13:22 , Processed in 0.822612 second(s), Total 84, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1008