I'm at a loss


Closed Thread
Results 1 to 17 of 17

Thread: I'm at a loss

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Posts
    88

    Default I'm at a loss

    Hello,

    OK, can't seem to figure this one out. I have a PIC16F628A that I have written code for. I try to program it and I get this, "Target Device does not match selected device". Now, the funny part is this...I have the microcontroller device ID entered correctly, as well as the ICSP pins connected correctly.

    When I've made a mistake in the past on other chips and clicked program, the above message occurred immediately. What's happening now is the status bar runs about 3 times and then I get the message. It looks like it's going to program, but then it fails. Any thoughts? It's not my programmer because it'll program other chips, but as soon as I try to program the 628A, it fails after 3 status bar sweeps. Thoughts?

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    Please post your code & a picture of MCS if you can. I will assume you have selected the appropriate PIC in MCS, yes?
    Are you using MCS Plus? Does it support ICD for that chip?
    Last edited by Archangel; - 10th November 2013 at 04:45.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    Hmm, you usually get that message immediately not after three sweeps. Is that message showing when the programmer is doing the verification? Try to use programming only without verification. Are you using the diode in the Vpp chip pin?
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    If you are programming in system, try doing it with the target power turned on. Maybe the PICKIT is unable to support the current drain. I've seen similar, but only when powered by the PICKIT-II or III. If you're programming the chip stand-alone, I don't know. Maybe a short video showing the problem will help diagnosis.

  5. #5
    Join Date
    Jun 2004
    Location
    Michigan
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    Sounds like you have some capacitance on one of the programming lines delaying a signal.
    Chuck Hellebuyck
    Electronic Products
    http://www.elproducts.com
    [email protected]

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    Quote Originally Posted by ERMEGM View Post
    Hello,

    OK, can't seem to figure this one out. I have a PIC16F628A that I have written code for. I try to program it and I get this, "Target Device does not match selected device". Now, the funny part is this...I have the microcontroller device ID entered correctly, as well as the ICSP pins connected correctly.

    When I've made a mistake in the past on other chips and clicked program, the above message occurred immediately. What's happening now is the status bar runs about 3 times and then I get the message. It looks like it's going to program, but then it fails. Any thoughts? It's not my programmer because it'll program other chips, but as soon as I try to program the 628A, it fails after 3 status bar sweeps. Thoughts?
    I always get such a message when I forget to enable power to the target with my PK2 or 3 ...

    moreover, the Pickit current capacity is limited ... sooo, couldn't your board draw too much current ??? ( as you talk about ICSP ...)

    and in the end, I remember a Microchip errata sheet about this subject for some series of those programmers ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    I'm not familiar with the Pickit but I have gotten a similar message when I haven't properly isolated the programming pins. I usually put a switch in the circuit to disconnect the rest of the circuit. If you look in the manual it recommends some minimum values when connecting your circuit.

  8. #8
    Join Date
    Jan 2010
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    Thanks for the replies guys, but I am not using a Pickit. I have setup my boards to match the pin layout of my U2 programmer. I just use a wire harness from the U2 to my boards. It's quick and easy that way.

    What I meant about the sweeps is the status bar indicator. It usually fills about 3 times and then it would fail.

    I don't know what the problem was, but I placed another 628A on another board and tried programming it. That worked. I removed the first PIC on the first board and replaced it with the second PIC. Tried to program the second PIC on the first board and it failed immediately, however, I found a very tiny solder joint between 2 pins and I removed it. Now it works fine.

    Don't know if something was wrong with the first PIC or if there was a tiny solder joint, but I'll have to play with that PIC later. Don't know why it would run through it's sequence and then fail.

    I'd post some code, but it's over 1000 lines. But with respect to errors in the code, the PIC would still be programmed with the faulty code and fail on run, not programming.

    And yes, the correct PIC was listed in both programs.

    Thanks again guys.

    Tony

  9. #9
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    I figure it can erase and program just fine with the solder jumper, but then fails on the verify. Most likely why you see the status bar fill a few times then fail.

    Robert
    AKA Captain Obvious

  10. #10
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    More likely it screws up the erase, and the programming as well, but doesn't know that until it tries to verify.

Similar Threads

  1. Power loss - Brown out?
    By clocks in forum General
    Replies: 5
    Last Post: - 25th October 2010, 10:56
  2. Strange pic 16f877a memory loss
    By DavyJones in forum General
    Replies: 23
    Last Post: - 6th July 2009, 20:27
  3. Memory Loss??
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th October 2006, 11:10
  4. 8 port Signal Loss Detector, possible to use a pic?
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th March 2006, 15:59

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts