PicKit3

Thread Starter

PRS

Joined Aug 24, 2008
989
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?
 

Thread Starter

PRS

Joined Aug 24, 2008
989
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.
 

Potato Pudding

Joined Jun 11, 2010
688
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.
 

spinnaker

Joined Oct 29, 2009
7,830
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.
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.
 

thatoneguy

Joined Feb 19, 2009
6,359
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.
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?
 

t06afre

Joined May 11, 2009
5,934
To which post are you referring? :)
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
 

spinnaker

Joined Oct 29, 2009
7,830
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
Thought maybe you were responding to my post where I asked the OP a question. :)


What happened to the OP?
 

Thread Starter

PRS

Joined Aug 24, 2008
989
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?
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.
 

Thread Starter

PRS

Joined Aug 24, 2008
989
which example are you referring to?
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.
 

thatoneguy

Joined Feb 19, 2009
6,359
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>
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.
 

Thread Starter

PRS

Joined Aug 24, 2008
989
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.
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.
 

Thread Starter

PRS

Joined Aug 24, 2008
989
Yes, I've discovered that actually putting my code into the controller improves results dramatically. ;)
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.

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.
Now that I have this awesome power, I need a mini lathe and mill to make machines, LOL!
 

spinnaker

Joined Oct 29, 2009
7,830
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.
I have also found that it really helps if you apply power to the chip to get tit to work. :)
 

Thread Starter

PRS

Joined Aug 24, 2008
989
I have also found that it really helps if you apply power to the chip to get tit to work. :)
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.
 

Potato Pudding

Joined Jun 11, 2010
688
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.
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.
 
Top