PICkit 3 frozen

Discussion in 'Embedded Systems and Microcontrollers' started by LutherBaker, Oct 6, 2012.

  1. LutherBaker

    Thread Starter New Member

    Sep 24, 2012
    13
    0
    So, I finally got my PICKit to work .... but now it seems broken.

    I got the hello LED lesson working, LED 7 was bright and shiny.

    But it is in a while loop - so I wasn't sure how to stop it. The IDE didn't seem to have an obvious stop bottom -- so I simply pulled the USB cable from the computer (to stop power).

    Now, I know you're not supposed to do this with USB sticks ... but is this also true with these programmers? All three LEDs are constantly on -- with status being RED/YELLO.

    Whenever I plug it in to a computer, the computer doesn't recognized it - and not like before. I'm running the PICkit 3 Programmer script and it says PICkit 3 not found. Check USB connections and use Tools->Check Communications to retry.

    Is it hosed? If I hold the PICkit's button down when I plug it in, the green power light is the only one that shows up --- but as soon as I let go of the button, all three lights are on. If I hold the button for a few minutes or so, nothing happens.
     
  2. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    I think u need to microwave it.
     
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    It sounds like it is a goner. Send it back to the shop and tell them that is was like this then you got it. If you are lucky you may get a refund
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    "Stop" can be done several ways. Turning off the power is not normally done, which is why you didn't find it right off. It's down the debugger menu in the Settings item.

    To stop the program you just hit the PAUSE button next to the RUN button on the icon buttons.

    Unplugging the USB side of the PICkit can cause minor reconnection problems. If you want to kill the target's power off the PICkit then unplug the PICkit from the board while leaving the USB on.

    Yeah it's OK, should not kill the PICkit. I've done it many times when the program hangs.

    Did you reboot? Did you try another USB cable? I've found my cheapo cables don't work so well with these devices, they need pretty good cables. The ones they come with have worked well.
     
  5. LutherBaker

    Thread Starter New Member

    Sep 24, 2012
    13
    0
    Thanks for the STOP suggestions - looking forward to trying it next time I get this running. Through some convoluted process (holding button, plugged into new computer, let go, counted to 30, stood on my head) ... one of the PICkits seemed to come back to life. The status button went dark and I could detect it via the PICkits scripts. I think that button has to do with switching between use with MPLAB and that PICkit3 script engine - but it quickly got to the same broken state when I (not running the app) passed the device back to the PC from the MAC. There seems to be something something wonky about changing the power supply. The problem is that ... I find that I need to use the PC first ... to run the GUI script (which seems to help by downloading an OS to the PIC kit) and then I need to pass it over to the MAC as that is the only place where the firmware download to the device actually works -- but I then tried to pass it back to the PC to actually develop against and now I've got the XBox / PS3 lights of death on the little red monster.

    So, is this something that most folks have to work through? My USB disk drive just always works. I must've pushed buttons and swapped cables and tried new computers last night for 5 hours trying to get this thing working. The PC IDE might even see the device it but couldn't finish downloading firmware to it ... until I loaded up MPLAB X on a mac -- which was the first to finish successfully.

    What a pain - I know that programming drivers can be difficult - but what a ridiculous toolset for a beginner. I just want something simple that plugs in and works. Is USB that finicky that some folks computers just work out of the box and other's don't? I don't really understand how that can be. My external USB drive and USB sticks works everywhere - I never have such "detection" problems. This gets back to the features vs quality debate. But this PICkit 3 has been out for several years now ... what a mess.

    Is it possible this is something related to PICkit 3? I mean, historically, does the PICkit 2 have similar posts here about getting it connected? What about Easy PIC ... I sure don't mind picking up something else to get started. What about other vendor programmers / dev boards? Is any company just known for making a setup the generally works well for everyone as soon as you plug it in.

    I mean, it should just plug in right? Or are most developer in this arena just used to things be tricky and difficult to get working. And ... is this something I'll always face ... or once I get past it, I'll always be able to get past it the same way.

    If this is a problem that all vendors face to a certain extent - if so, I don't want to purchase something else - I'd try to fix what I've got..... but I realize this toolset is free. Are the paid, high end kits better? Will the thing just work so I can spend time working lesson plans instead of working through failures to connect, failures to upload and crashing IDEs?

    I mean, am I really any better off with these kits from mikro?

    Gosh darn what a wasted night. I'm sure it is user error - but I sure don't know what is going on yet.
     
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    No PICKIT 3 is the best for Microchip MCUs. But your kind of problem has been reported before. Try this In the MPLAB menu. Go to configure->Select Device. And check that the setting match your PIC. If this do not help. Try Programmer-> settings->configuration. Then click Manual Download. But before you do this load a project file wich use the same PIC as you are using now. Your problem has been reported before. And it often happened with new PICKITs fresh out of the box. Take a look here for more info http://www.microchip.com/forums/m672011.aspx
    But this should cure your problems i hope. Most of the members here. Have good experience with PICKITs my self included.
     
  7. LutherBaker

    Thread Starter New Member

    Sep 24, 2012
    13
    0
    Hey --- got it working!

    If I plug the PICkit in during a power reset to the computer ... the lights go normal after the computer finishes booting. Now everything works! MPLAB IDE, MPLAB X and the Mac version.

    Question: I'm used to "starting" an app, and then "stopping" it.

    Now, I think, with the PIC stuff, things are a little different. If I build and then upload the program to the target ... the LED shows. But after simply clicking the STOP (Red button that says "Finish Debugger Session") button, the LED is still displaying on the target device.

    Now, I think I understand this - I've actually PUSHED the code to the chip ... and so, while it is powered up, the code will keep running forever, irrespective of the IDE that is managing it. And furthermore, the big red button is simply disconnecting the IDE from the currently running code.

    Is that correct?

    And so, maybe it doesn't matter, but if I wanted to actually "stop" the program from running on the device, I guess I need to actually REMOVE it from the target device, right?

    Is there a button for that?

    I've noticed that after disconnecting the IDE from the debug session (red LED is still lit up), if I click the "Hold In Reset" button (or sometimes it says "Release from Reset") in MPLAB X, the red LED stops shining and the status LED goes from red to green. What does that button do or mean ... and should I be actively using it when I build and deploy something to the chip?

    I tried this, hit "Hold in Reset", then press Play, then press Stop, the press "Release from Reset" .... and it seems to do the entire cycle I want. Is that how most folks work with these or is the some other established workflow that is the correct way to start and stop the program on the device.

    Thanks! So nice to see this thing working!
     
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    Glad you got this to work. Unfortunately the compiler has been upgraded since the tutorials were written (yeah I knew this but I didn't tell ya) <snucker> but they are kinda minor problems to go thru.

    STOP does just that: stops the code running in place. Like a PAUSE statement. When you STOP a program in the debugger you actually want the power to stay on... cause oft you will want to START it again from the same place. Keeping the power on keeps the RAM intact. To restart the program there is a reset button on that menu.

    BTW, I have yet to switch to MPLAB-X as MPLAB does everything I need and I don't have to relearn anything. I run it under XP and have no big issues, except for the occasional crash of MPLAB during debugguing: that needs MPLAB process to be killed and then restart MPLAB and all is well.

    When debugging I never hit the "Hold in Reset" or "Release from Reset", just leave it in release and let the RESET & START buttons do the heavy lifting.

    Have you tried to use any breakpoints yet? They stop on certain lines, and you can open the watch window to inspect and even change and memory or register location.
     
Loading...