我使用的是PIC12F508,但是一直无法用ICD2对其编程,请求您的指点。 我用的MPLAB IDE 版本是8.33,最新下载的。Configure里也正确选择了芯片型号。 硬件线路请看附图。其中VDD和VSS之间连接的是去耦电容。 上电次序是按文档里说的:先查ICD2的USB头,确认没有power target from ICD2,然后开目标扳的5V电源,最后Programmer/connect。 我而且检查了附图中的电路连接,证明确实无误,没有接触不良,目标板的5V电源也确实加到单片机上了。单片机是从未用过的新片子。
但是,IDE上不断出现警告信息。下面的内容就是从IDE的窗口里截下来的,汉字是我的操作:
打开目标板的电源,然后Programmer/connect,出现下面的警告: ICDWarn0044: Target has an invalid calibration memory value (0x0). Continue? 我点OK ...Reading ICD Product ID Running ICD Self Test ...Passed MPLAB ICD 2 ready for next operation 我做Programmer/read操作,欲读入单片机里的内容,出现下面两个警告 Reading... ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation 我明明选对了芯片型号,怎么还是“cannot validate a target device”?我还是点了OK ICDWarn0038: When using auto-calculate write range, reads cover the entire memory range. Do you wish to continue? 我继续点OK ...Program Memory (0x0 - 0x1FF) .. Config Memory ...User ID Memory ...Read Succeeded MPLAB ICD 2 ready for next operation读完了。打开Program Memory 窗口一看,全是0
神哪,让我疯吧!!
|