0
\$\begingroup\$

I am trying to program a PIC32mx110F016B with a PICkit 3 with the "Power target circuit from Pickit3" enabled at 3.25V.

When I am trying to program this small code

#ifdef __XC32
#include <xc.h>          /* Defines special funciton registers, CP0 regs  */
#endif

#include <plib.h>           /* Include to use PIC32 peripheral libraries           */
#include <stdint.h>         /* For uint32_t definition                        */
#include <stdbool.h>        /* For true/false definition                      */

#include "system.h"         /* System funct/params, like osc/periph config    */
#include "user.h"           /* User funct/params, such as InitApp             */
#pragma config   FNOSC = FRC
#pragma config   FPBDIV = DIV_1 // Peripheral Clock divisor

int32_t main(void) 
{ 
while(1)
{
}
}

it gives me this error message:

Target detected

Unable to connect to the target device. Failed to get Device ID

This is the schematic I have done Schematic

\$\endgroup\$
1
\$\begingroup\$

Assuming that the hardware is assembled according to your schematic everything looks ok.

This error can be caused by a slew of things. The error means that the pickit3 cannot talk to the chip. There could be open in the clock and data lines. There could be an open in the VCAP pin. The chip may not be receiving power correctly. The MCLR pin to the programming header could be open. Anything that interrupts communication to the chip will cause this error.

The things that can be verified is that the pickit3 is providing power and that there is no short in the 3.3v rail.

Here is a good video about pic programming errors.

\$\endgroup\$
  • 1
    \$\begingroup\$ Good suggestions. I'd also add a few points to look out for. The Vcore capacitor must be low esr and very close to the pic. If this was hand wired, did you reverse the pgc and pgd? Are all the grounds connected? Are all the vdds connected? \$\endgroup\$ – Mathieu L. Jan 23 '16 at 14:16
  • \$\begingroup\$ there was an error on the Vcap. I did not put a tantalum capacitor at the first time and now I have 10uF tantalum 2.5V. But now I am getting a memory mismatch error. Do you see any problem with the cap? \$\endgroup\$ – scuba Jan 23 '16 at 16:37
  • \$\begingroup\$ Bad Soldering. Solved. \$\endgroup\$ – scuba Jan 23 '16 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.