I recently bought a pickit3, I have a development board for the dsPIC30f but it the pickit3 doesn't seem to be able to read the chip. When I try to connect to the chip, I have the error:

Target Device ID (0x0) does not match expected Device ID

At first, I had an error that the pickit couldn't detect a voltage on vdd. I fixed it by either powering the dev board with an external power supply or powering the devboard using the pickit (with the advanced settings). Unfortunately, the pickit doesn't seem to be able to power the device with 5v and I have to set a voltage below 4.75v.

After that, I have the problem with the device id that can't be detected... Now, I'd like to put my pic on a breadboard with the simplest schematic to program it.

That's what I have so far:


simulate this circuit – Schematic created using CircuitLab

It's quite difficult for me to get around the datasheets of microchip. I couldn't find anywhere why a resistor and a capacitor are required on vpp.

I guess the schematic I made might be wrong as the VPP pin should be able to power up to 13v.

Also, as I never succeeded to get the pickit3 working yet, any idea how to verify if the voltage emitted from VPP is right. As I understand, in order to get the dspic in programming mode, the pickit has to provide between 12v and 13.5 volts on the vpp/mclr pin. I tried to measure VPP with my multi metter but I guess my multimetter is too slow to pick the voltage right away.

Edit: New schematic with decoupled vss/vdd and 100ohm on vpp added.

  • \$\begingroup\$ Are you trying to program the device directly from Mplab? If you are try using the microchip integrated programming environment (IPE) application instead. From experience the latter gives far less trouble. \$\endgroup\$
    – Adam Z
    Commented May 4, 2016 at 14:42
  • \$\begingroup\$ I'm trying to use IPE at least. The schematic in the question is an updated version. My guess is that the dev board isn't designed for the pickit and icsp \$\endgroup\$ Commented May 4, 2016 at 15:14
  • \$\begingroup\$ I would test the PicKit on another circuit. If you have any DIP Pic and a breadboard you should be able to test it out fairly quickly. Also you mention that you are working on a dev board, check for any dip switches which might need to be set/unset to enable communication with the pic kit. \$\endgroup\$
    – Adam Z
    Commented May 4, 2016 at 15:20
  • \$\begingroup\$ @AdamZ yes, now that you talked about it... I looked once again to the schematic of the dev board... and now it's clear. I have to do it on a bread board. \$\endgroup\$ Commented May 4, 2016 at 15:43
  • \$\begingroup\$ @AdamZ I got it... I'll update the question! \$\endgroup\$ Commented May 4, 2016 at 16:09

3 Answers 3

  1. You really can't expect things like this to work without proper bypass caps in place.
  2. Make sure you have all the Vdd, AVdd, Vss, and AVss pins connected, and of course a bypass cap for each Vdd and AVdd pin.
  3. Try putting 100 Ω in series with the PGC and PGD lines physically close to the PIC.
  • \$\begingroup\$ Ok, hmm so the Avdd pin is also connected to the Vdd pin of the pickit right? I'll update my schematic later. Would the bypass capacitors of 100nf be enough? \$\endgroup\$ Commented May 4, 2016 at 13:40
  • \$\begingroup\$ ok no, I just tried with the schematic above on a breadboard but still have the same error. Device Id 0x00... \$\endgroup\$ Commented May 7, 2016 at 9:23

You don't need to connect the AVdd and AVss supplies to program the chip via ICSP. These pins supply analogue peripherals like the ADC and DAC (if there is one) and aren't required for FlashROM programming.


Thanks to Olin, the decoupling capacitors are probably the real reason why this wasn't working on the dev board. The dev board I have is a ET-dspic30f2010 V1. The datasheet is here: http://ett.co.th/download/06_PIC/06A06/Manual.pdf

enter image description here

We can see on that schematic that the ISCP pins (little squares) are located after the inverter 74S07.. for that reasons, the decoupling caps are not connected to those pins. Even if the prog switch is on. All I can say is that there is some current flowing on VPP because the PGM led is ligthing up.

My guess is that I could probably unsolder the inverter and put an ICSP connector in place there. The prog/run switch could be also removed to be put permantently in prog mode. Even with that, I'm not sure if the caps/resistors on the W(pins) are of the right value. because 100pf is quite small compared to 100nf.

That said, using this schematic should be a good start for anyone building a board for a dspic. It's just unfortunate that the "ICSP" like connector is wrongly placed.

Looking again to the schematic, it seems that the board is actually filtering the vdd pins with only 2 capactitors and an ferrite inductor to reduce noise I guess.

If the capacitors on the vdd pins are fine, then the problem is more likely related to the MCLR pin which should be somewhat filtered too but there is no capacitor and the resistance might be too weak too.

Finally, I got it to work on a breadboard. After reading the documentation on the pickit3, I found a few things that should help debug why the schematic isn't working.

  1. PGC/PGD pins should be as is without anything. Capacitors will prevent fast voltage changes, resistors are already in the pickit3 and diodes will prevent bidirectional communication with the chip and the pickit3.
  2. Vdd/Vss pins should have a capacitor of 100uf on each pair. It might not be necessary though.
  3. MCLR pin should not be connected to a capacitor. It will also prevent fast voltage change. A resistor betweeen 4.7k and 10k should connect vpp and vdd.
  4. Ideally, the schematic should be designed to have 2 power supply sources. The one for ICSP should be isolated from other devices as the power supplied by the pickit wouldn't be enough to power up everything.

That said, even though I can only output 4.75v on my usb ports. The dspic requires at least 4.5v on vdd.


simulate this circuit – Schematic created using CircuitLab

Here's the shematic that works for me.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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