Skip to main content
Topic: Programming PICs with a programmer (Read 1195 times) previous topic - next topic

Programming PICs with a programmer

I've got a Bus Pirate v3 and was looking over the instructions on http://http://dangerousprototypes.com/d ... programmer.

I'd like to verify that this works with a Pickit 3 and if so, do I power the target from the Pickit 3 or does the Bus Pirate provide power to the Pickit 3?

I'd rather do the latter, but would like to verify what the BP is doing before I plug things in.

Thanks in advance.

Karl

Re: Programming PICs with a programmer

Reply #1
It depends. Couldn't understand the question clearly so here are some possibilities and respective answers:
- Bought the BPv3 from Seeed and want to program the bootloader (and/or firmware): No need to program it. BPv3 already comes with the bootloader and firmware uploaded. May have to get the latest firmware and upgrade to that.
- Soldered a free PCB and want to program the bootloader: Both options are fine but I would power up the BP via USB and then program with Pickit 3. The BP does not provide power to Pickit in this mode, it just supplies a reference voltage for the logic high. Pickit 3 gets powered by it's own USB cable.

Re: Programming PICs with a programmer

Reply #2
Sorry, a bit more detail This is actually a pre-loaded BP from sparkfun, but I'm looking to program it as part of learning more than anything else.

I understand the Pickit 3 will supply power to the target (the BP) unless the target is already supplying power. At which point the USB connection to the Pickit 3 should only power the Pickit, and not the BP.

When programming the board BP, and this probably applies to other microchip circuits in general, is it OK to have the Pickit 3 plugged into USB on the PC (providing power to the Pickit), the BP plugged into USB (providing power to the BP but not to the Pickit).

Thanks,
Karl

Re: Programming PICs with a programmer

Reply #3
[quote author="karl34"]Sorry, a bit more detail This is actually a pre-loaded BP from sparkfun, but I'm looking to program it as part of learning more than anything else. [/quote]
If it already has the bootloader, you don't need a programmer, you can use the on board bootloader to load your own programs there. You have to adjust some addresses while exporting though: http://dangerousprototypes.com/docs/Com ... C_projects

[quote author="karl34"]I understand the Pickit 3 will supply power to the target (the BP) unless the target is already supplying power. At which point the USB connection to the Pickit 3 should only power the Pickit, and not the BP. [/quote]
That is true. Pickit checks if the circuit is being powered or not. If it's not powered, it powers it using a set voltage in the IDE then programs it. If it's powered, is uses the target voltage as a reference as some PICs can operate at both 3.3 V and 5 V.

[quote author="karl34"]When programming the board BP, and this probably applies to other microchip circuits in general, is it OK to have the Pickit 3 plugged into USB on the PC (providing power to the Pickit), the BP plugged into USB (providing power to the BP but not to the Pickit). [/quote]
It is OK to do that. I usually have my circuits powered up by a wall wart while doing development, but sometimes I use Pickit as a voltage supply if the target does not require high current.

 

Re: Programming PICs with a programmer

Reply #4
That's great to hear. It's been hard to find confirmation of that kind of setup. :)

Thank you for the responses.  Very much appreciated.