PIC编程器

[复制链接]
7223|7
 楼主| ysl5917 发表于 2010-10-16 13:42 | 显示全部楼层 |阅读模式
我使用的是PIC18F25k20单片机,买个编程器 ICD2.5 USB的,开发环境是MPLABv8.35,编译器是PICC18v8.05 ,写几行代码
#include <pic.h>
main ()
{
     TRISB = 0x00;
     while (1)
{    PORTB = 0xf;
}
}
编译出来:Executing: "C:\HT-PIC\BIN\PICC.EXE" -C -E"LED.cce" "LED.c" -O"LED.obj" -Zg9 -O -ASMLIST -Q -MPLAB -18F25K20
Halting build on first failure as requested.
BUILD FAILED: Sat Oct 16 13:41:19 2010
编程器连接不上:
ICDWarn0068:  This device has a VPP(max) below the minimum ICD2 VPP level of 12V.  Please ensure that external protection for MCLR is in place.  (Press the Help button for an example circuit or use AC164112 available from microchipDIRECT.com.)
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
ICDWarn0020: Invalid target device id (expected=0x103, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
... Failed Self Test.  See ICD2 Settings (Programmer->Settings) (status tab) for details.
MPLAB ICD 2 ready for next operation
各位,我这是什么情况,改了两天了,搞不定,请指点啊。还有就是programming―setting‐power-不能设置由ICD供电
NE5532 发表于 2010-10-16 22:09 | 显示全部楼层
有3个问题

1是程序编译不过,这个跟编程器无关,自己去找设置问题
2是ICD2没有连接好,打开自检信息看到底哪里没过
3是18是3.3V器件,ICD2是5V供电,自然不会允许你供电出去的。
headwolf_83 发表于 2010-10-17 13:38 | 显示全部楼层
1、环境应该是MPLAB IDEV8XX,目前最新为8.56。
2、C编译器应该是PICC18或者MCC18。MCC18最新为V3.36。PICC18,如果要支持25K20,我估计得9.50PL3或者更高版本。可能要要9.6x,你用PICC18-8.35是无论如何编译不通过的,不支持这个芯片。

3、目标板上个3.3V,应该就能认到25K20了。
 楼主| ysl5917 发表于 2010-10-29 14:55 | 显示全部楼层
楼上,请问什么地方能找到你所说的编译器呢?能编译18F25K20的呢?
mei326 发表于 2010-10-29 15:52 | 显示全部楼层
官网上大把的有!自己去找
兰天白云 发表于 2010-10-30 08:32 | 显示全部楼层
选择25K20算你有眼光,这是一个不错的芯片
whh217 发表于 2010-11-2 14:32 | 显示全部楼层
楼主的问题解决了吗?怎解决的?我现在和你一样的问题。
能不能说下解决方法。
环境:MPLAB8.53
编译器:PICC8.05
仿真器:icd2.5
芯片:pic18f25k20

打开工程后,
ICDWarn0068:  This device has a VPP(max) below the minimum ICD2 VPP level of 12V.  Please ensure that external protection for MCLR is in place.  (Press the Help button for an example circuit or use AC164112 available from microchipDIRECT.com.) Connecting to MPLAB ICD 2 ...Connected Setting Vdd source to target Target Device PIC18F25K20 found, revision = Rev 0x11 ...Reading ICD Product ID Running ICD Self Test ...Passed MPLAB ICD 2 ready for next operation

Clean: Deleting intermediary and output files. Clean: Deleted file "F:\pic\led\led.cce". Clean: Deleted file "F:\pic\led\led.mcs". Clean: Done. Executing: "C:\HT-PIC\BIN\PICC.EXE" -C -E"led.cce" "led.c" -O"led.obj" -Zg9 -O -ASMLIST -Q -MPLAB -18F25K20 Error[000]   : Unknown flag -18F25K20 Halting build on first failure as requested. BUILD FAILED: Mon Nov 01 20:24:21 2010
Mary_luo 发表于 2010-11-3 11:56 | 显示全部楼层
都用25K20啊,看来市场很好。呵呵!有需要的可以找我啊!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

22

帖子

2

粉丝
快速回复 在线客服 返回列表 返回顶部