完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
在我将新固件上传到PIC12HV615之后,ADC似乎不起作用。我在汇编程序中工作,一段时间我没有做PIC编程。这是我第一次使用MPLAB X IDE,我用的是PICKIT 3。如果我删除,然后重新连接电源线,它就工作了,但是它有点F。ReStress必须记住每次都这样做,很好地知道为什么ADC在点击“制作和程序设备”按钮后,它最初的工作是不正常的,因为它的微观行为是奇怪的。也有人知道是否有更简单的方法来控制皮卡3而不必进入项目属性,例如打开和关闭电源,如果使用模拟器调试选项,返回到PICKIT 3。在MPLAB 8升级之后,我感觉我的工作流程中缺少了一些东西。
以上来自于百度翻译 以下为原文 The ADC doesn't appear to work after I upload new firmware to a PIC12HV615. I am working in assembler, I haven't done PIC programming for a while this is the first time I've used the MPLAB X ide and I'm using the PICkit 3. If I remove and then reconnect the power line then it works but its a little frustrating having to remember to do that each time and it would be nice to know why the ADC doesn't work initially after hitting the 'Make and Programme Device' button as its strange behaviour for a Micro. Also dose anyone know if there is an easier way of controlling the PICkit 3 without having to going in to the project properties, to turn the power on and off for example and to get back to the PICkit 3 if you use the simulator debugging option. I feel like I'm missing something's in my workflow after upgrading from MPLAB 8. |
|
相关推荐
5个回答
|
|
如何知道ADC是否工作?当你认为ADC不工作时,PIC实际上是在运行吗?
以上来自于百度翻译 以下为原文 How do you know if the ADC is working or not? Is the PIC actually running at all when you think the ADC is not working? |
|
|
|
PIC绝对运行,因为我有一个闪光的LED控制TMR0。我已经把它缩小到了iTCON和/或opTythReg的设置。当皮卡3完成编程时,它是什么样的重置?这会影响ITCN和选项寄存器吗?用这么小的IO就很棘手。
以上来自于百度翻译 以下为原文 The PIC is definitely running as I have a flashing LED controlled by TMR0. I've narrowed it down to the set up of INTCON and/or OPTION_REG. What kind of reset is it when the PICkit 3 has finished programming? could this effect the INTCON and OPTION registers? Its tricky with such a small amount of IO. |
|
|
|
你还记得阿德雷斯的银行吗?这是在一个不同的银行比阿德雷什。
以上来自于百度翻译 以下为原文 Did you remember the banksel on ADRESL? It is in a different bank than ADRESH. |
|
|
|
你正在准确地问我打算去哪里看。格林先生:编程操作在设备上执行MCLR复位。大多数寄存器在MCLR复位后没有复位,所以很有可能您有一些控制寄存器,或者可能是通用程序RAM中的变量,在一个不幸的状态下,在编程操作后的前一次运行中遗留下来。请注意,所有寄存器和RAM将重置上电复位(POR)。因此,两种重置类型之间的差异似乎与您所看到的症状相匹配。在初始化代码中初始化所有关键变量和寄存器是很重要的,以避免这些类型的问题。
以上来自于百度翻译 以下为原文 You are questioning precisely where I was going to suggest looking. mr green: Programming operations perform a MCLR reset on the device. Most registers are NOT reset after an MCLR reset, so it is very possible that you have some control registers, or perhaps variables in general purpose RAM, in an unfortunate state, left over from your previous run after the programming operation? Note that all registers and RAM will be reset on a power-on-reset (POR). So the difference between the two reset types seems to match the symptoms you are seeing. It is important to initialize all critical variables and registers in your initialization code to avoid these types of issues. |
|
|
|
我查看了各种重置条件,整理了我的代码,问题就消失了,ADC现在工作得很可靠。我仍然不知道到底是什么引起了这个问题,但有一次或两次,当它在编程之后工作,这使我相信它是MU。ST在复位后一直处于某种未定义状态。我已经提到了初始化关键变量的重要性,所以我在SFRS的设置中更加明确。不管怎样,现在一切都很好,所以谢谢你们的建议,它确实帮助了很多。
以上来自于百度翻译 以下为原文 I looked at the various reset conditions and tidied up my code and the problem has gone away and the ADC is now working reliably. I still don't know exactly what was causing the problem but there were one or two occasions before when it did work after programming which leads me to believe that it must have been some kind of undefined state after reset. I've taken your point about the importance of initializing critical variables and so I have been more explicit in the set up of the SFRs. Anyway everything works great now so thanks for all your advice, it really helped a lot. |
|
|
|
只有小组成员才能发言,加入小组>>
5248 浏览 9 评论
2036 浏览 8 评论
1956 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3217 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2264 浏览 5 评论
786浏览 1评论
677浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
602浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
684浏览 0评论
581浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-27 01:50 , Processed in 1.696684 second(s), Total 87, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号