pickit 3 not working

Discussion in 'Embedded Systems and Microcontrollers' started by turo2003, Oct 14, 2011.

  1. turo2003

    Thread Starter New Member

    Oct 14, 2011
    12
    0
    hi,
    i'm using pickit 3 with mplab IDE v8.76 and dspic30f4011,
    when i'm trying to program my microcontroller i get the following message:

    Programming...
    The following memory regions failed to program correctly:
    Program Memory
    Address: 00000000 Expected Value: 00040100 Received Value: 00000000
    Programming failed

    what I have tried :
    - making sure the code protection was disabled in the configuration bits settings
    - erase the microcontroller with mplab while supplying the circuit with 5v
    - reinstall mplab, pickit 3 driver

    has anyone came across this problem ? or know how to fix this ?
    I hope someone can help, I'm clueless.
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    What is your setup. Do you use a microchip demo board. Or something else. Are you also able to do a blank check after erase
     
  3. turo2003

    Thread Starter New Member

    Oct 14, 2011
    12
    0
    I'm using Olimex prototype board pic-p40 which i have rewired to work with the dspic30f4011.
    I have programmed the dspic30f4011 before successfully, I mean, one minute I'm programming the dspic30f4011, then I changed some code lines and tried to program it again and since then all I'm getting is that fail msg.
    I have blank check, this is the result:

    Blank Checking...
    The following memory regions failed blank check:
    Program Memory
    Address: 00000000 Expected Value: 00ffffff Received Value: 00000000
    Blank check failed

    I think that there is something wrong with the microcontroller itself, maybe I'm not erasing it right ? maybe changing the microcontroller will solve this ?
     
  4. turo2003

    Thread Starter New Member

    Oct 14, 2011
    12
    0
    p.s.
    the last code I have programmed onto the dspic was to control a servo motor, if I connect the motor to the dspic, it still doing what the code says, so that must mean the the microcontroller itself is working fine, is it not?
     
  5. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Yes I think so.
     
  6. turo2003

    Thread Starter New Member

    Oct 14, 2011
    12
    0
    that is good to hear, but i still need to re-program my dspic, how to fix my problem ?

    maybe I'm not erasing it properly?
    I'm erasing it by choosing the erase option in mplab, while supplying the dspic with 5v from the pickit3, I have measured the ectual voltage entering the dspic, it's 4.75v ... is there something i'm missing ?

    p.s.
    thanks for your responses, after many hours and many forum threads, this is the only 1 that answered me..
     
  7. maxpower097

    Well-Known Member

    Feb 20, 2009
    795
    388
    The chip may have malfunctioned and is not taking a flash anymore. Do you have any other chips you can try to see if its the Chip, programmer, or code? With the PK2 I would find after lots of programming I'd have to do a reboot to get the pk2 fired up again. Are you programming in debug mode or release mode?
     
  8. turo2003

    Thread Starter New Member

    Oct 14, 2011
    12
    0
    I'm programming in release mode, i have another dspic but it's not nearby, I will access to it in a few days when I'll get back to my lab. the most strange thing is that it was working fine one second and on the next it was not.
    I will try to change the dspic and the pickit3, when i'll get back to my lab.
    the dspic itself is new, only been programmed for 30-40 times.. have you came across this problem before ? "Device ID mismatch"...
     
  9. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,387
    1,605
    "Device ID mismatch" for me usually means something very bad, failed PicKit, broken wire, blown device. It's the generic return when MPLAB doesn't get the right info back for the device ID (which it is reading out of the device first thing).

    I'm using a PIC now that I can reprogram 30-40 times a day and been using it off and on for over a year now. They are rated for at least 1,000 if not 10,000 re-flash cycles, and that number is quite conservative.
     
  10. turo2003

    Thread Starter New Member

    Oct 14, 2011
    12
    0
    well, thank you everyone, you all have been very helpful, I will try a different pickit and dspic, I will let you know what happened in a few days...
     
  11. turo2003

    Thread Starter New Member

    Oct 14, 2011
    12
    0
    Hi,
    I visited my laboratory and replaced the dspic, once that didn't work, I thought to start at the beginning and checked that the rewiring that I've made are correct, there I found the problem !! the was a shortage between 2 wires... one of them woved and touched the other, invisible to the naked eye, after I fixed that everything worked fine,
    I want to thank you all very much for your response, for taking the time to help me,

    THANK YOU t06afre , maxpower097 and ErnieM.
     
  12. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,387
    1,605
    I can't tell you how many times something similar has killed my work. :mad:

    Congratulations on finding it and best of luck in the future! :D
     
  13. SAMDMAN

    New Member

    Apr 24, 2012
    1
    0
    Do you mind telling me what windows your using? i'm having problems connecting my pickit3 device, on vista 64 of my toshiba satelite. it say's "No pickit3 detected".

    It works perfectly on win7 64 of my friends desktop.

    I tried both ways installing it. And it doesn't show any errors after installation, but it just wouldn't work on MPLAB. it keeps saying "No pickit3 detected".

     
Loading...