不是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。
不知可否这样理解。感谢各位大师的帮助。
|