蛋疼呀,自己建的工程能编译,但不能下载不了 今天下载程序到PIC32MZ入门套件里遇到了一个很奇怪的问题。 工程是我自己配置的工程。工程目录如下:图 代码如下: #include "xc.h"
#pragma config FPLLIDIV = DIV_1, FPLLMULT =MUL_50, FPLLODIV = DIV_2 #pragma config FPLLRNG = RANGE_5_10_MHZ,FPLLICLK = PLL_FRC, FNOSC = SPLL #pragma config FSOSCEN = OFF, IESO = ON,POSCMOD = OFF, FCKSM = CSECMD #pragma config FDMTEN = OFF, DMTCNT =DMT31, FWDTEN = OFF, ICESEL = ICS_PGx2
#pragma config_alt JTAGEN = ON #define LED1_ON() LATHSET =(1<<0) // LATHSET?bit0??? #define LED2_ON() LATHSET =(1<<1) // LATHSET?bit1??? #define LED3_ON() LATHSET =(1<<2) // LATHSET?bit2???
int main (void ) { TRISHCLR |= (1 << 0)|(1 << 2)|(1 << 1);// //?????? PORTHCLR |= (1 << 0)|(1 << 2)|(1 << 1);// ??0
while(1) { LED2_ON();
LED3_ON();
LED1_ON(); } } 我是自己调用编译器的xc.h的头文件的,工程能成功编译,但下载不了,出现这样的错误Target Device ID (0x5127053) does not match expected Device ID(0x5126053).。如下图:
希望专家或大牛能帮我解决,看看是啥问题???
|