1. PRS

    Thread Starter Well-Known Member

    Aug 24, 2008
    989
    35
    Has anyone in here used PicKit 3? I'm a newbie to this debugger-programmer, and I'm stuck on the examples in the included files from Microchip. Can anyone in here help me get me going?
     
  2. maxpower097

    Well-Known Member

    Feb 20, 2009
    795
    388
    What are you trying to program? A chip or dev board?
     
  3. PRS

    Thread Starter Well-Known Member

    Aug 24, 2008
    989
    35
    A dev board with a particular MCU. This is a PIC18f45k20. When I add an outside source, the LEDs act like a neon sign that goes from one end to the other and recycles. I'm using 3.25 volts external to do this. But when I run the above program, nothing changes. And the output error says that debug was not ready and that I should check my configuration files.
     
  4. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    I don't think it will hurt the PICkit but it won't DEBUG if it is trying to power the board with the USB while the board also has external power.

    And I think that the Dev board (bundled with PK3) schematics and other documentation are on the Microchip Web Site.

    The LEDs might need nearly 3 Volts but I don't think that too low of a voltage is your problem.

    Try to run the board from the USB. If the USB is not up to the standard power level then try using a powered hub.
     
  5. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,005
    Did you run through the sample code to light the lights on the demo board? Did that work?

    You can remove JP1 and use the same program to turn your light on and off but you need to be sure you don't exceed the current capacity of the output pins.


    If you want to debug you need to set the compiler to debug, build the project and the program the chip with the debug programmer.
     
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    which example are you referring to?
     
  7. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,005
    To which post are you referring? :)
     
  8. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    I have a PICKit 3 and the 44 Pin Demo Board.

    It sounds like you are running the default program, powered by the PICKi 3 where the LEDs run from 0-7, speed adjusts with the pot, and direction changes with the button, is this correct?

    What code are you trying to load that doesn't work?
     
  9. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    The system the OP use. Come with several lessons(12). We may help better if the OP tell us which lesson he is stuck on.
    Some questions to the OP. Are you using PICKIT 3 to power your circuit, or an external power supply. I hope you read this document http://ww1.microchip.com/downloads/en/DeviceDoc/41370C.pdf
    Refer FIGURE 3-10B IF you use an external power supply. You shall NOT select power target from PK3
     
  10. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,005
    Thought maybe you were responding to my post where I asked the OP a question. :)


    What happened to the OP?
     
  11. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    By accident he set up his PICKIT to generate 325 volt instead of 3.25 volt and get zapped:p
     
  12. PRS

    Thread Starter Well-Known Member

    Aug 24, 2008
    989
    35
    You're right, now that I've got the thing to work and have learned more about it, it's a sure thing I was running the default program.

    At first I couldn't get it to run the simple Lesson 1 program to turn on an LED. I read documentation and eventually found out why: Before anything else, you've got to write the program into the device! I found I could do this using <Debug> then <Program>

    After that simple discovery, I went through the rest of the lessons up to lesson 8. I'll do that and the rest of them tomorrow. Thanks for the reply. I'm bound to have a lot of questions for you.
     
  13. PRS

    Thread Starter Well-Known Member

    Aug 24, 2008
    989
    35
    I was stuck on lesson 1 simply because I didn't realize I had to program the device before debugging it. I know that's just logical, but at the time I wrote the OP the solution was not obvious. I dug into the supporting literature and figured it out. Thanks.
     
  14. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Yes, I've discovered that actually putting my code into the controller improves results dramatically. ;)

    Imagine how the people who built a programmer feel when they don't know if the programmer is working or not since they can't get anything to work right!

    This is the reason I suggest going with a PICKit 2 or 3 and working from there. They are way more than just a programmer, and very affordable as well.
     
  15. PRS

    Thread Starter Well-Known Member

    Aug 24, 2008
    989
    35
    As I told those above you, my problem is behind me now. I wasn't programming the device before debugging it. Thanks for the reply. Since you all seem to know about PicKit 3, I'm sure I'll be asking you more questions in the future. I sure appreciate it.
     
  16. PRS

    Thread Starter Well-Known Member

    Aug 24, 2008
    989
    35
    What is obvious now was not obvious from the get go. Not to me anyway. When my PicKit 3 arrived I was totally confused. It took weeks of reading the literature in my spare time in order to get to where I am now: Lesson 8.

    Now that I have this awesome power, I need a mini lathe and mill to make machines, LOL!
     
  17. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,005
    I have also found that it really helps if you apply power to the chip to get tit to work. :)
     
  18. PRS

    Thread Starter Well-Known Member

    Aug 24, 2008
    989
    35
    I figured that out, too. I made a dedicated variable supply in a hobby box with the old LM317 and I have it set at 3.25 volts. The first time I connected it to the experimenter board the 8 LEDs began to skitter across and recycle. Eureka! Then I tried to get lesson 1 to run and nothing changed until I figured out I had to program the MCU before it could change its trick. Thanks.
     
  19. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,884
    1,005
    Congratulations! It is very rewarding when you get something to work like that. :)
     
  20. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    Not so easy for many people to understand. A microcontroller doesn't start out as easy to use as an Op Amp or 555 timer but once you get a handle on programming it makes some of the more complicated circuitry avoidable which makes fairly advanced projects easier and affordable in terms of time and money.

    Hundreds of pages of reference materials does equal weeks of lead in.
     
    blueroomelectronics likes this.
Loading...