打印

使用ICD2烧写PIC16F676内置晶振内置MCLR的问题

[复制链接]
7750|11
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
stonejust|  楼主 | 2009-8-3 14:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
今天突然遇到个问题,首次同时使用PIC16F676内置振荡器和内置MCLR,编译没有错误,但烧写时显示ICDWarn0033: MPLAB ICD 2 does not support programming this device if both the internal oscillator and internal MCLR are selected.  You may continue programming, but you are encouraged to cancel, reconfigure y**ice, and try again.
ICD0200: Operation Aborted (Warning 33).
ICD0275:  Programming failed.
改为外置MCLR后问题解决,但满足不了我的要求。想问下有什么解决方法?别的烧写器有这个问题吗?由于手头只有ICD2没法实验,请高手告知。谢谢!
沙发
XIEYUANBIN| | 2009-8-3 21:15 | 只看该作者
这样设置只要你不调试,只是烧写没问题.

使用特权

评论回复
板凳
yewuyi| | 2009-8-4 08:42 | 只看该作者
LZ是不是选择了DEBUG模式下的芯片编程?!

使用特权

评论回复
地板
stonejust|  楼主 | 2009-8-4 09:42 | 只看该作者
不是DEBUG模式,开始我也是这么认为的,也试了下编程模式,还是不成的。刚看了下帮助,如下:
ICDWarn0033: You have selected Internal MCLR and Internal Oscillator in your configuration settings. If your code makes use of port pins that correspond to Clock and Data pins in programming mode, you may not be able to reprogram y**ice. See on-line help for this warning for more information. (OK/Cancel)

When Internal MCLR is used with MPLAB ICD 2 for programming, both Vpp and Vdd are powered together, and then Vpp is pulled high to Vihh to enter programming mode. This means that your code will be running before Vpp goes to Vihh. If that code makes use of port pins that correspond to Clock and Data pins in programming mode, there is a chance their values may not be 0, as necessary to enter programming mode. Therefore, the device could not be reprogrammed.

Click OK to continue programming or click Cancel to cancel the programming operation.

Work-Around

When External MCLR is used, this is not a problem, as Vpp can go directly to Vihh. Also, if External Oscillator is used, the external oscillator can be kept from running, thus keeping the code from running, until Vpp is at Vihh.

Please refer to the Programming Specification for y**ice to determine which port pins correspond to the Clock and Data pins used in device programming. E.g., for PIC16F627A, the pins are RB6 and RB7 respectively.

英文水平有限就不翻译了,我的理解就是由于上电复位时由于MCLR与VDD内部相连,编程及运行状态就不确定了,造成程序启动,所以PIC16F676是不能同时使用内置振荡和内置MCLR的,只能选择其他的IC,例如PIC16F627A。
不知可否这样理解。感谢各位大师的帮助。

使用特权

评论回复
5
yewuyi| | 2009-8-4 10:10 | 只看该作者
16F676没用过,但16F677是用过的,印象中没见此类要求。

使用特权

评论回复
6
yewuyi| | 2009-8-4 10:13 | 只看该作者
如下是我在16F690上的CONFIG配置,690和677基本上差不多,你可以参照DATASHEET对一下看看。
---------------------------------------------------------------------------------------------------------------
#ifdef               debug
__CONFIG(MCLRDIS&INTIO&WDTDIS&PWRTDIS&BORDIS&IESODIS&FCMDIS);
#else
__CONFIG(MCLRDIS&INTIO&WDTEN &PWRTEN &BOREN &IESODIS&FCMDIS&CP&CPD);
#endif
----------------------------------------------------------------
如上的配置是没有问题的。

使用特权

评论回复
7
headwolf_83| | 2009-8-4 11:24 | 只看该作者
ICD2烧双内部是有问题,0033就是这个意思。你换PK2或者PK3去烧吧.

使用特权

评论回复
8
leo-lin| | 2009-8-4 11:56 | 只看该作者
1# stonejust
PICkit2可以支持双内,价格也便宜。

使用特权

评论回复
9
stonejust|  楼主 | 2009-8-4 12:23 | 只看该作者
谢谢大家,一直想搞个PICKIT2玩玩,这下有机会了,再次感谢!

使用特权

评论回复
10
crazybee| | 2010-5-1 15:18 | 只看该作者
本帖最后由 crazybee 于 2010-5-1 15:19 编辑

如果是内部复位,外接振荡,这种情况编程就不受限制吗?奇怪外部晶振和内部RC有区别?

When External MCLR is used, this is not a problem, as Vpp can go directly to Vihh. Also, if External Oscillator is used, the external oscillator can be kept from running, thus keeping the code from running, until Vpp is at Vihh.

使用特权

评论回复
11
XIEYUANBIN| | 2010-5-2 08:46 | 只看该作者
只是在调试的时候,需要外部复位来控制单片机,

使用特权

评论回复
12
crazybee| | 2010-5-2 14:57 | 只看该作者
When External MCLR is used, this is not a problem, as Vpp can go directly to Vihh. Also, if External Oscillator is used, the external oscillator can be kept from running, thus keeping the code from running, until Vpp is at Vihh.

如何译?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

8

主题

72

帖子

1

粉丝