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
    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 " !!!
    *****************************************

  2. #2
    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.

  3. #3
    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

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    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

  5. #5
    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.

  6. #6
    Join Date
    Jan 2010
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    OK, back to square one. Here's what I have. Obviously there is some interference with the signals.

    My programming pins are connected to the appropriate terminals. RA5, RB6 and RB7 are being used, but they are being used as inputs, so they have a 10k pull-up resistor on them which gets pulled to ground when the tactile button is pressed (RA5), or the optocoupler is activated on the other pins (RB6 and 7).

    When I try programming my pic on the completed board, it fails. When I program it on the board with just the PIC and header pins, it programs just fine. Is one of the components causing the interference? Anyway to isolate this or just redesign the board to not use those pins other than for programming?

    Thanks,
    Tony

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: I'm at a loss

    I don't know if its a typo but the 10k resistors on RB6 and RB7 are in series to isolate external circuitry. See 32028a, 91016b, 51474a etc.

    George

Similar Threads

  1. Power loss - Brown out?
    By clocks in forum General
    Replies: 5
    Last Post: - 25th October 2010, 11:56
  2. Strange pic 16f877a memory loss
    By DavyJones in forum General
    Replies: 23
    Last Post: - 6th July 2009, 21:27
  3. Memory Loss??
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th October 2006, 12: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, 16: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