Author Topic: Pickit 3 programming "Targed Device ID does not Expected Device ID"  (Read 11543 times)

0 Members and 1 Guest are viewing this topic.

Offline EddefletTopic starter

  • Newbie
  • Posts: 3
Hi there!

After Daves enthusiastic videos about electronics I decided to buy some components and dive in as a complete beginner. First plan: Blinking led on microcontroller. But I believe  got myself into some classic "trap for young players". I Got myself a pickit 3, a PIC16F628A and some more components. First built myself a little 5V circuit (standard 7805) and wired the rest up like this:

In practice it looks like this (also connected to pickit 3):



Thus pin1 of the pickit goes to P4, pin2 goes to P14, pin3 goes to P5, pin4 goes to P13, pin5 goes to P12, as the pickit documentation shows.

However when I try to programm the microchip I get the following error :( (mplab x with XC8 compiler)
Quote
Target detected
Target Device ID (0x30e0) does not match expected Device ID (0x1060).

The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x7ff

Programming...
program memory
Address: 0 Expected Value: 2ffe Received Value: 3ffe
Failed to program device
What is wrong? I rewired it all, but same error message.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: Pickit 3 programming "Targed Device ID does not Expected Device ID"
« Reply #1 on: July 26, 2014, 05:53:50 pm »
A few points.  PK3 needs to be set to the correct device and to power the device ? , the reset pin needs to be pulled high (vdd) 10k will do caution !!!! ... however the vPP will go to ~12v so run PK3 pin 1 through a 100R to the reset pin .   
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5135
  • Country: ro
  • .
Re: Pickit 3 programming "Targed Device ID does not Expected Device ID"
« Reply #2 on: July 26, 2014, 06:49:03 pm »
Pickit 3 pinout is this:

1 MCLR/VPP
2 VDD Target
3 VSS Ground
4 PGD (ICSPDAT)
5 PGC (ICSPCLK)
6 5PGM (LVP

Your PIC16F628 has the following:

4 VPP (MCLR)
14 VDD
5 VSS (Ground)
13 PGD
12 PGC

You have to make these connections and then you also have to connect a resistor that can be up to 10k between VDD and MCLR. I use 8.2 kohm or 10 kohm. That's missing in your layout.

Power your breadboard from 5v separately, don't enable powering your board from pickit 3, that's how I work.

The standalone Pickit 3 app supports the chip, select it from the combo box and try to read data from it, if the chip is working, you should be able to retrieve data from it. You can find the application towards the bottom of the page here: http://www.microchip.com/pagehandler/en-us/devtools/dev-tools-parts.html

« Last Edit: July 26, 2014, 06:50:57 pm by mariush »
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4278
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Pickit 3 programming "Targed Device ID does not Expected Device ID"
« Reply #3 on: July 26, 2014, 07:22:12 pm »
You should also put a decoupling capacitor between VDD and VSS, close to the PIC pins. Putting it on stilts a few inches away doesn't count.

Offline EddefletTopic starter

  • Newbie
  • Posts: 3
Re: Pickit 3 programming "Targed Device ID does not Expected Device ID"
« Reply #4 on: July 26, 2014, 07:29:10 pm »
Thanx for the help! I put a 10k resistor between pin 4 and 14. Tried powering from the board aswell as the pickit itself, both still give the same error. This is how I put the resistor, that is correct right?


I have MPLAB X installed, where can I find that read function you are talking about?

I realise now the 100nF cap wasn't in there when I powered it with the pickit, will try to put it closer.
 

Offline EddefletTopic starter

  • Newbie
  • Posts: 3
Re: Pickit 3 programming "Targed Device ID does not Expected Device ID"
« Reply #5 on: July 26, 2014, 08:05:20 pm »
Tried putting the 100nF cap directly over the PIC between Vss and Vdd, still the same error...
Reading the PIC did work though! Faulty badge of pics maybe?

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf