PIC18f- "Target Device ID (0x0) does not match expected Device ID

Discussion in 'Embedded Systems and Microcontrollers' started by talkcircuit, Dec 16, 2015.

  1. talkcircuit

    Thread Starter New Member

    Dec 16, 2015
    6
    0
    PIC18f- "Target Device ID (0x0) does not match expected Device ID"

    hi everyone,

    im new here but i read a similar topic about programming and erasing with pickit3 and a flash pic18f and was hoping some one could help me get these pic18f to read and program again.

    i got a few development boards with pic18f flash micro controllers on them. they work fine but I want to use them for something else.

    when i try to read or erase them with the pickit3 and MPLAB IPE it keeps telling me "Target Device ID (0x0) does not match expected Device ID"
    I even took them off and put them in a socket to dip to isolate any problems.

    I tried all voltages from 4v-5v in MPLAB IPE and tried erasing at all voltages even tried LVP. I tried to fill in the entire memory and erase again but all attempts to program fail.

    I not sure where the BULK ERASE function is but im pretty sure the erase button i used is sufficent.


    Does any one know how I can erase or reset this microchip pic18f chips so I can program them?
     
  2. Picbuster

    Member

    Dec 2, 2013
    374
    50
    Hi man, You have a problem.
    the message Target Device ID (0x0) does not match expected Device ID" indicates that programmer is not getting an answer or not able to talk into the pic18
    Please follow the following steps.
    A:check connection chip pgd to pin4 from pickit 3
    B:check connection chip pgc to pin5 from pickit 3
    C; check if mclr pin is not connected direct to a cap. ( minimum 1K between cap and mclr pin.
    d: vdd to pin 2 of pickit ( check if this is feeding the chip normaly you have to switch powersup on)
    e: gnd pin 3
    carefull with voltage via pickit some pic18F go @ vdd=5V+ to microchips heaven.

    If all fail: sit in the corner and cry.
    clean your face and keep us posted for futher help.
     
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    Look at the target ID number: 0x0 is zero, and indicated the programmer did not find your target device, it found nothing.

    Check the connects. Check them again. My favorite way to screw it up is to swap the data and clock lines.
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    Windoze can also do this to you with cute little apps that prevent the USB ports from working correctly. In my case it was a piece of Dell crapware called SyncUp that hosed my USB ports. I used CCleaner to remove it from the Startup process and have not had a problem since.
     
    JohnInTX likes this.
  5. talkcircuit

    Thread Starter New Member

    Dec 16, 2015
    6
    0
    Thank all for the tips,

    Let me also add that I bought a new pic18f device chip and i can read and program it fine with the Pickit3 setup so I believe my whole setup is working fine. Like I said I am using a socket with dip direct to the pickit3, so I dont think I need to add caps and resistors as it already works just find with another pic18f device chip.

    I read on other forums that locked pic chips seem to not read or report no id until you do a full erase or fill them up or do something special things to get to to unlock. Im not sure. Im sure this is a locked pic i just want to erase it and use it for something else.

    Also a different question. Does any one know if there is any program to convert a hex from one microchip pic device to another without modifying all the config hex bits?
     
  6. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    That would be a really tall order. How would you fix something if it was wrong?
     
  7. JohnInTX

    Moderator

    Jun 26, 2012
    2,347
    1,029
    The config bits are appended to the end of the Intel HEX file. You can use a text editor to delete those. Import the .HEX into MPLAB 8.x with the new processor selected. Set the config bits manually in the project then export the .HEX to a new file.

    All of this is of limited use since different PICs have different memory maps etc. but I've used the procedure to update old .hex files to a newer, compatible chip that has extended config bits.
     
  8. talkcircuit

    Thread Starter New Member

    Dec 16, 2015
    6
    0
    what do you mean tall order?

    the microchip PIC chip converter or resetting the protected pic18f chip so you can program it again?

    I read that all the pic with the letter F should be re-programmable unlimited times but it appears as if I have 3 here that work in circuit but are completely locked. Peoples stories dont add up.
     
  9. JohnInTX

    Moderator

    Jun 26, 2012
    2,347
    1,029
    (F)lash PICs can be reprogrammed many but not unlimited times. The typical number is in the databook for your PIC.
    A write-protected PIC can be erased and reprogrammed (but not read) using a suitable Microchip programmer. You need to know if the config bits are set for Low Voltage Programming for ICSP but in a socket, you should be able to use HighVoltage programming (apply Vpp to MCLR/) - for most chips.. and if your programmer supports it.
    If you have specific questions about your particular PIC18Fxxx, download the Programming Specification for your chip.
    But first, as the others say, you have to fix the 'Target is 0x00' message. That means no communication between programmer and chip - for the reasons listed above. If you get a 'Target 0xdddd does not match..." that means that you are connected, comms are good but the programmer is expecting a different chip.
    As far as moving a .HEX file to another 18F chip, like PB says, its a tall order i.e. it could be relatively easy or impossible, depending on the chip you want to move it to. Not all 18F are the same inside. Which PIC do you have the code for and which one do you want to move it to?

    What happened to the source code?
     
  10. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    The tall order is having a .hex file for one type of PIC, and a database of all PICs or maybe just PICs from the same family so you could apply an algorithm to read in in a .hex file, analyze what the file is doing, look for things that won't work and, write out a result with new config bits.

    I agree that you can do this by hand pretty quickly. Automating the process is still in my estimation a tall order. I was responding to the last line in the original post.
     
  11. talkcircuit

    Thread Starter New Member

    Dec 16, 2015
    6
    0
    I understand,

    I was just inquiring about possible converter software. It seems I never know everything about whats out there.

    I understand these pic chips are very different and have very different config settings and options so its not really easy to convert. I just asked and it really does not matter.


    The real problem is this pic18f that wont unlock and keeps reading as device 0x0 . This is quite odd to me because the new pic18f i bought from mouser works perfect in my pickit3 programmer setup.

    I don't know why its not working.
     
    Last edited: Dec 17, 2015
  12. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    I'm not certain that you are interpreting the evidence correctly. As has been mentioned, getting a return code of 0x0, is different than preventing you from reading the contents. The usual meaning of "locked" is that you are prevented from reading the contents of Program(Code) memory and/or non-volatile data memory. The property of being locked says nothing about being able to identify the chip. In any case you can always erase a chip that you cannot read. That achieves the security objective of the original maker. Your problem is fundamentally different.
     
Loading...