完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我有红外开关与PIC10F204一起工作,编程后,我经常在输出GP2上获得脉冲信号,而不是正常的逻辑状态0或1(5V)。我不认为软件会导致这个问题,因为有些工作在同一个软件上工作得很好。在编程过程中,可能是坏的一批芯片或是出错了吗?
以上来自于百度翻译 以下为原文 I have IR switch working with PIC10F204 and after programming I very ofter get pulses signals on output GP2 instead normal logic states 0 or 1 (5V). I don't think software could cause that problem because some work fine wth the same software. Can be bad batch of chips or something goes wrong during programming? |
|
相关推荐
13个回答
|
|
更可能是代码中的错误。你有没有启用WDT?
以上来自于百度翻译 以下为原文 More likely a bug in your code. Do you have the WDT enabled? |
|
|
|
GP2也可以是比较器输出或OSC / 4输出。
以上来自于百度翻译 以下为原文 GP2 can also be the comparator output or osc/4 output. |
|
|
|
我使用KIT3进行编程,也许内部振荡器在编程过程中被正确地校准,因为我得到了一些关于它的信息,但是我不知道如何正确地设置它。
以上来自于百度翻译 以下为原文 I use Kit3 for programming and maybe internal oscilator is correctly calibrated during programming because I get some message about it but I don't know how to set it correctly |
|
|
|
这是一个疯狂的想法:发布你的代码,所有的。也许在那里你没有看到一个问题。
以上来自于百度翻译 以下为原文 Here's a crazy idea: post your code, ALL of it. Maybe there is an issue in there you do not see. |
|
|
|
谢谢你的忠告,但你能告诉我如何修理吗?我在Microchip论坛寻找解决方案,但我找不到直接的解释和明确的指南如何做。不幸的是,我没有一个源代码,但只有软件文件。正如我之前说过的。代码是正确的,因为它被使用了很长时间并且总是工作得很好。我确信使用我的PICTIT3编程有一些问题。通常我使用MPLAB IDE,但最近我尝试了从Microchip下载的新版本MPLAB,也许我已经改变了一些东西。
以上来自于百度翻译 以下为原文 Thank you for your great peace of advice but could you tell me how to fix it? I was looking for solution in Microchip Forum but I could not find straightforward explanation and clear guidelines how to do it. Unfortunately, I have not got a source code, but only software file. As I said before. Code is correct because it was used for long time and always worked fine. I am sure some issue with programming using my PiCkit3. Usually I used with it MPLAB IDE but recently I tried new version MPLAB downloaded from Microchip and maybe I have changed something |
|
|
|
我不能理解WDT与数字端口输出有关,它输出脉冲而不是由代码设置的恒定正常逻辑状态0或5V。该芯片在任何数字端口上都没有PWM发生器。
以上来自于百度翻译 以下为原文 I can not understand what is WDT to do with digital port output which gives away pulses instead of its constant normal logic state 0 or 5V set by code. This chip has not a pwm generator on any digital port |
|
|
|
当你看到这些脉冲时,你会离开PICTIT3连接到PIC吗?
以上来自于百度翻译 以下为原文 Are you leaving the pickit3 connected to the pic when you are seeing these pulses? |
|
|
|
不,PICTIT3只在编程时连接,因为我使用触摸编程连接器。所以,当我在输出上检查这些脉冲时,它就被连接起来。
以上来自于百度翻译 以下为原文 No, Pickit3 is connected only while programming because I use touch programming connector for it. So it is connected when I check those pulses on output. |
|
|
|
如果WDT周期性地踢,您的端口引脚将返回输入一段时间,然后再次输出,从而导致“毛刺”…
以上来自于百度翻译 以下为原文 If WDT kicks in periodically, your PORT pins will get back to input for a little time and then output again, thus causing "glitches"... |
|
|
|
您的意思是端口引脚可以周期性地将其模式从输出改变为输入,并且当它具有值0V时,它是输入。非常有趣。我从来没有这样想过。
以上来自于百度翻译 以下为原文 You mean port pin can change its mode from output to input periodically and when it has value 0V it is an input then. Very interesting. I have never thought like that. |
|
|
|
正如Cinzia所说,如果WDT正在开机,那么它将周期性地重置你的芯片,这会导致所有的引脚暂时返回到其上电状态。只有当WDT在PIC的配置字中启用时才会发生这种情况。如果你的软件没有特定的话,它通常会被禁用。经常写清楚,这可能不是你的问题,你需要检查你正在烧录的图像中的配置设置,看看WDT如何启用位设置。
以上来自于百度翻译 以下为原文 As Cinzia said, if the WDT is kicking in, then it will be periodically resetting your chip, which causes ALL pins to momentarily go back to their power up state. This can only happen if the WDT is enabled in the PIC's config words. It should normally be disabled if your software has not been specifically written to regularly clear it. This may not be your problem at all, you need to check the config setting in the image you are burning into the chips to see how the WDT enable bit is set. |
|
|
|
如果它是一个HEX文件,在过去已经工作,但现在不工作。你得到的是一个校准无效的消息,那就是问题所在。WDT只是一个不良校准的影响。修理它不是件容易的事。最好的办法是替换它。确保在MPLAB或IPE中启用校准(您没有指示您使用的是什么)
以上来自于百度翻译 以下为原文 If it is a hex file that has worked in the past but does not work now. And you are getting a calibration invalid message then that is the problem. The WDT is just an effect of the bad calibration. Fixing it is not easy. The best thing to do would be to replace it. Insure that preserve calibration is enabled in MPLab or IPE ( you did not indicate what you are using) |
|
|
|
如果它在“之前”和“现在”中起作用,那么它就不能准确地工作:列出“现在”和“之前”之间不同的所有东西,检查列表上的每个项目,以确定它是否是“不工作”的原因,如果你仍然没有找到问题,那么你可能没有列出任何不同的东西。格力。它可以被“固定”,但并不容易。
以上来自于百度翻译 以下为原文 If it worked "before" and "now" it does not work cerrectly then: List EVERYTHING that is different between "now" and "before" Check EACH item on the list to determine if it is the cause of "not working" If you still do not find the issue then you have probably NOT listed EVERYTHING that is different. Agree. it can be "fixed" but it is not easy. |
|
|
|
只有小组成员才能发言,加入小组>>
5184 浏览 9 评论
2005 浏览 8 评论
1932 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3179 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2230 浏览 5 评论
739浏览 1评论
626浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
511浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
637浏览 0评论
535浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-28 11:26 , Processed in 1.829646 second(s), Total 103, Slave 86 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号