Thank you to the guys at HEGE supporting Badcaps [ HEGE ] [ HEGE DEX Chart ]

Announcement

Collapse
No announcement yet.

Questions about PicKit 3.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #41
    Re: Questions about PicKit 3.

    Originally posted by mariushm View Post
    PIC16F628A is a relatively weak microcontroller, it has very few features, little memory and ram, there's much better chips out there with more built in features like hardware i2c and spi, which could be useful.

    My favourite goto for tests is PIC16F1519 : http://www.digikey.com/product-detai...2FP-ND/2651374

    It's wide dip so it's easy to put on prototyping board, it's dip40 so it has lots of i/o pins, has 28 KB of flash (16 kwords because each word is 14 bits) so you can just code without worrying about optimizations to reduce program size, built in 16 mhz oscillator so you don't need to use external oscillator to go above 4 Mhz (as it happens with your chosen pic)

    It's kinda hard to damage a pic just by programming it with bad code. MPLAB-X is pretty good about spotting mistakes so it would be kinda hard to create a broken binary and have mplab program it to a pic and damage the pic.
    Thanks for the response! I agree, the PIC16F628A is kinda limited. It's what the original developer chose though so I'm kinda stuck with it for this design. I will be upgrading it though. I want to use some motors, probably stepper motors, with my project and I'll need more pins. I'm already having trouble using this programmer though. I insert the PIC16F628A into the ZIF (there's no ICSP headers on the actual circuit board) and I set all the jumpers correctly. Then, I hook up the PicKit3 to the PC. The MPLAB X program recognizes the PicKit3. I select a basic program and then I try to read the hex file from the chip. I select the drop down menu and choose Read device memory to file. I hit okay. It pops up a warning message:
    Code:
    [FONT="Times New Roman"]
    CAUTION: Check that the device selected in MPLAB IDE (PIC16F628A) is the same
    one that is physically attached to the debug tool. Selecting a 5V device when a
    3.3V device is connected can result in damage to the device when the debugger
    checks the device ID. Do yo wish to continue?
    [/FONT]
    and then it fails with:
    Code:
    [FONT="Times New Roman"]
    *****************************************************
    
    Connecting to MPLAB PICkit 3...
    
    Currently loaded firmware on PICkit 3
    Firmware Suite Version.....01.40.05
    Firmware type..............Midrange
    
    Target device was not found (could not detect target voltage VDD). You must connect to a target device to use PICkit 3.
    [/FONT]
    When they say the debug tool, they're talking about the PicKit3, right? And not one of those debug headers or whatever they're called? I've also tried plugging the ZIF directly into the PicKit3 instead of using the cable they provided me with, to rule out problems there. I'm wondering if I don't have the chip in the ZIF socket properly or something.
    -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

    Comment


      #42
      Re: Questions about PicKit 3.

      I have J1 set to #2 and I have J2 - J7 set to 2-3. Here's a picture of how I have the PIC installed in the ZIF socket. I've verified the right pins from the ZIF socket are going into the right sockets on the PicKit3, I didn't want to plug it in backwards and risk frying stuff.
      Attached Files
      -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

      Comment


        #43
        Re: Questions about PicKit 3.

        pin1 on the jumpers has a square pad on the other side,

        the no-power thing is a classic for people who dont download the pdf.

        you need to go to the "power-tab" in the programmer options and enable the power output from the pickit.
        Attached Files

        Comment


          #44
          Re: Questions about PicKit 3.

          a bit more on that,
          the programmer is designed to program parts fitted to a project,
          so it's assumed the pic is being powered by some other source.
          powering it from the actual programmer is an option you need to enable.

          hence the "could not detect target voltage" message.

          Comment


            #45
            Re: Questions about PicKit 3.

            Originally posted by stj View Post
            pin1 on the jumpers has a square pad on the other side,

            the no-power thing is a classic for people who dont download the pdf.

            you need to go to the "power-tab" in the programmer options and enable the power output from the pickit.
            Yes, I figured that out. I believe the PicKit2 would auto-detect whether there was voltage or not on the pin and if there wasn't, it would just supply it. I've made sure the power button was checked and I verify with the datasheet that the voltage was good (5v). I get a different error now:
            Code:
            Connecting to programmer...
            The programmer could not be started: Could not connect to tool hardware: PICkit3PlatformTool, com.microchip.mplab.mdbcore.PICKit3Tool.PICkit3DbgToolManager
            I know my J1 is good, but my J2 through J7 jumpers, do they look correct? Or do I need to move them all over to the other side?

            I also get a warning but I don't think this one is a problem because it's well within the range of the PIC I'm trying to program:
            Code:
            PICkit 3 is trying to supply 5.000000 volts from the USB port, but the target VDD is measured to be 4.625000 volts. This could be due to the USB port power capabilities or the target circuitry affecting the measured VDD.
            
            The target circuit may require more power than the debug tool can provide. An external power supply might be necessary.
            Connection Failed.
            -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

            Comment


              #46
              Re: Questions about PicKit 3.

              Originally posted by stj View Post
              a bit more on that,
              the programmer is designed to program parts fitted to a project,
              so it's assumed the pic is being powered by some other source.
              powering it from the actual programmer is an option you need to enable.

              hence the "could not detect target voltage" message.
              Thanks for explaining that! Was I wrong in remembering the PicKit 2 could auto-detect if the VDD voltage was present or not and if it wasn't, it'd auto-detect it? I thought, when I was researching it (before the PicKit3 came out), I almost remember MPLab being able to auto-detect the PIC that was being programmed. I seem to have to select the PIC that I want from a drop down list. I don't mind at all, it's not a problem, just wondering why they did away with those other features or if I'm just remembering it wrong.
              -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

              Comment


                #47
                Re: Questions about PicKit 3.

                Damn it all. I found the problem. The pins inside the PicKit3 aren't soldered. They move and if I push a little bit up on the ZIF socket, I can refresh the PicKit3 in the IDE and it'll recognize the PIC and all of that and I can successfully read the PIC. But if I don't press up on it, it doesn't work. So now it's a matter of whether I should try to take it apart without breaking it to resolder them or should I send it back to China and wait a long time to get a new one. What do you guys think I should do?
                -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                Comment


                  #48
                  Re: Questions about PicKit 3.

                  what pins?
                  the usb port?

                  Comment


                    #49
                    Re: Questions about PicKit 3.

                    Originally posted by stj View Post
                    what pins?
                    the usb port?
                    No, the ones that plug into the ICSP header. I took it apart and thought they were loose but they're not. If I click on refresh debug tool status, maybe one out of 10 times it'll populate correctly, the other 9 times it says Connection failed. If I can refresh debug tool status successfully, if I try to read the firmware, maybe 1 out of 6 times or so it'll actually read, otherwise the error message. There's something wrong. I think it's with the PicKit3 and not the ZIF socket but it's hard to tell because I can only test the PicKit3 with the ZIF socket.

                    You know the part on the PicKit3, the 6-pin female header, where you plug the pins in, I think that's messed up.
                    -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                    Comment


                      #50
                      Re: Questions about PicKit 3.

                      When it's not working correctly, in the IDE, under Debug Tool, it lists PICkit3: DEFAULT_PK3. When it's working correctly, it lists the nice name I gave it (Ken's PicKit3)
                      -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                      Comment


                        #51
                        Re: Questions about PicKit 3.

                        I think I should try maybe sending it back. The lights that light up keep changing too. Right now, Power, Active and Status are all lit up, but a few minutes ago, Just Power and Active were lit up.
                        -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                        Comment


                          #52
                          Re: Questions about PicKit 3.

                          It's not detected in MPLab at all now. And when I unplug it and plug it back into the PC, it doesn't even daling like it used too. There's something seriously wrong with this. I don't even have the ZIF hooked up anymore. Just the device.
                          -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                          Comment


                            #53
                            Re: Questions about PicKit 3.

                            try a different usb cable and use the port on the back of the motherboard, not a case-mounted one.
                            incase there is excessive volt-drop

                            btw, the issue is unlikely to be the 6pin strip, because the programmer should detect without a pic connected.
                            it's 100% surfacemount and easy to check with a magnifying glass, so my supspects are the usb cable/supply and the usb socket on the pk3

                            i have had a lot of shit with those small sockets on portable harddrives.
                            Last edited by stj; 12-07-2015, 11:16 PM.

                            Comment


                              #54
                              Re: Questions about PicKit 3.

                              Originally posted by stj View Post
                              try a different usb cable and use the port on the back of the motherboard, not a case-mounted one.
                              incase there is excessive volt-drop

                              btw, the issue is unlikely to be the 6pin strip, because the programmer should detect without a pic connected.
                              it's 100% surfacemount and easy to check with a magnifying glass, so my supspects are the usb cable/supply and the usb socket on the pk3

                              i have had a lot of shit with those small sockets on portable harddrives.
                              Okay, I'll try a different USB cable. The one they sent, on the packaging, it says high quality, but it seems kind of chinsy. It's a laptop running Windows 10 so that could be some of the issues there as well. I'll try a different USB cable and a different port. I could also try installing MPLab X on my OpenSUSE installation and see if we get the same issue.

                              When I start a new project, under PicKit3, it shows my device. It's just when I go to Refresh Debug Tool Status that I almost always get the Connection Failed. I believe that only works when the PIC is connected to the PicKit3. It's really weird. I believe the three lights staying on was do to the fact that I had the PIC connected to the PicKit3 when plugging it in. When the PIC isn't connected and I plug in the device, it seems to daling. But as soon as I hook up the PIC to the PicKit3, whenever I go to Refresh Debug Tool Status or try to read the PIC (to dump the contents), it errors out with Connection failed. When the Refresh Debug Tool Status does work, this is the values that get filled in under Debug tool:

                              Code:
                              Debug Tool
                              PICKit3: DEFAULT_PK3
                              Firmware Suite Version: 01.40.05
                              Algorithm Plugin Version: 01.14.33
                              OS Version: 01.21.01
                              I want to say I remember DEFAULT_PK3 getting replaced a few times with my friendly name, Ken's PicKit3.

                              Are those Firmware, Algorithm and OS versions the latest? I can't seem to find any information on what's the lastest firmware, OS and algorithm versions anywhere on the net. I'm wondering if I can force an update somehow and see if that fixes the problem.
                              -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                              Comment


                                #55
                                Re: Questions about PicKit 3.

                                Also, when I hit Refresh Debug Tool Status, in the output window, when it fails, it always says:
                                Code:
                                Currently loaded firmware on PICkit 3
                                Firmware Suite Version.....01.40.05
                                Firmware type..............Midrange
                                
                                PICkit 3 is trying to supply 5.000000 volts from the USB port, but the target VDD is measured to be 4.625000 volts. This could be due to the USB port power capabilities or the target circuitry affecting the measured VDD.
                                
                                The target circuit may require more power than the debug tool can provide. An external power supply might be necessary.
                                Connection Failed.
                                It's showing the firmware version on the PicKit3 is 1.40.05. Wouldn't that imply that the computer is successfully communicating with the PicKit3 but the PicKit3 for one reason or another is not successfully communicating with the PIC? Thanks for all the help Stj. Really appreciate it. I like this little guy and if I could get it work all the time, that'd be wonderful!
                                -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                Comment


                                  #56
                                  Re: Questions about PicKit 3.

                                  well firstly i would make a littlle programming board up on stripboard with an 18pin socket and a 6pin strip - just to eliminate problems with the zif-socket adaptor.

                                  the firmware uploads into the pk3 from mplab-x, so if you have the latest mplab-x then it's probably good.
                                  win10 may be an issue, mplab-x is written in Java and i dont know if the usb drivers are 10 compatable.
                                  go look on microchip's forum - see if anybody is having similar problems and 10 is mentioned.

                                  Comment


                                    #57
                                    Re: Questions about PicKit 3.

                                    Originally posted by stj View Post
                                    well firstly i would make a littlle programming board up on stripboard with an 18pin socket and a 6pin strip - just to eliminate problems with the zif-socket adaptor.

                                    the firmware uploads into the pk3 from mplab-x, so if you have the latest mplab-x then it's probably good.
                                    win10 may be an issue, mplab-x is written in Java and i dont know if the usb drivers are 10 compatable.
                                    go look on microchip's forum - see if anybody is having similar problems and 10 is mentioned.
                                    Okay. We're making progress Stj, thanks for all the help! First off, the USB cable wasn't great. If I wiggled it at the port on the PC (no matter what USB port), it'd dling. So we replaced it. That fixed that problem. Now, this is where it gets weird and this is what makes me think maybe it's a problem with the device or windows 10. When no ZIF socket is plugged in, if I plug in the PicKit3 to the PC, if all three lights are and Status doesn't go off, the PC never recognizes the PicKit3. If I plug it in and the status light goes off, it recognizes the PicKit3. I haven't been able to get the status light to go off yet so I don't know if when the PicKit3 is recognized if it'll always recognize the PIC now or not, seeing how we're using a different USB cable.

                                    It seems if I leave the PicKit3 unplugged for a while, when I plug it back in, the Status light will go off. Like maybe it's keeping a charge somewheres and not properly restarting.
                                    -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                    Comment


                                      #58
                                      Re: Questions about PicKit 3.

                                      One more update. Now, twice in a row, when I plugged it in and the Status light turned off, the computer dinged, it successfully recognized the PIC! If I can just figure out why sometimes the Status light doesn't turn off and sometimes it does, then this unit I think would be good. I'll check into the Microchip forums like you suggested. The USB drivers work, at least some of time. Doesn't mean they're not the problem though. I wished I had a laptop with 7 on it right now.
                                      -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                      Comment


                                        #59
                                        Re: Questions about PicKit 3.

                                        I've refreshed the Debug Tool Status multiple times when it's plugged in with the new USB cable and it always recognizes the PIC. That means the USB cable is definitely faulty! Perhaps the Status light issue is just a design flaw. Wonder if I could somehow solder one of those bleeder resistors somewheres on the unit. Thanks so much for helping me figure this out Stj! You're truly a great friend and extremely helpful!
                                        -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                        Comment


                                          #60
                                          Re: Questions about PicKit 3.

                                          status led only changes when the programmer software does something.

                                          on the forum there was a couple of interesting things.

                                          1: dont run the IDE and IPE (programming) apps at the same time - they will both try to mess with the pk3 and could clash.

                                          2: win10 may need a reg patch unless your using the latest mplab-x version which is 3.10 or higher.

                                          Comment

                                          Working...
                                          X