Skip to main content
Topic: PIC/AVR high voltage programming adapter (Read 16886 times) previous topic - next topic

Re: PIC/AVR high voltage programming adapter

Reply #15
@ian: Dunno if you agree with this.. But you've got two extra pins on the isp connector which you can use. Also you can use the 3.3 or 5v out as an output (dunno the speed which you can achieve but it is quick enough to apply 12v to the circuit) Also there is a 3.3 available (not switchable tough)

I realize this is a bit against the design of bp, but an extra feature won't hurt ;)

Re: PIC/AVR high voltage programming adapter

Reply #16
I didn't think about it not working in-circuit.

I guess it's still nice as a 'standard' ISP pinout that you can connect to a target with a 2x3 cable.
Got a question? Please ask in the forum for the fastest answers.

Re: PIC/AVR high voltage programming adapter

Reply #17
I agree, especially when you have cables that fit already :)

I just can't live with the 12V being wasted :) I think I will need to design a simple adapter which will utilize ATtiny2313 to drive the HVSP, and BP will be used as a UART/SPI proxy.. Maybe it's not the nicest solution, but at least I will use the 12V and get to reset 8 pin ATtiny chips.

Re: PIC/AVR high voltage programming adapter

Reply #18
Sounds a bit like cheating ;P I would take a PIC instead, otherwise it would like the PIC can't do it and an AVR can..

Re: PIC/AVR high voltage programming adapter

Reply #19
[quote author="ian"]I'm not sure where to get it though, because we're already using all 5 Bus Pirate pins.[/quote] I have very little idea about electrical circuits but why do we need two PINs ( CS & AUX ) to control the 12V on RST/MCLR? Is this something PIC need? Maybe there could be a jumper to choose whether you want to use PIC or AVR?

Re: PIC/AVR high voltage programming adapter

Reply #20
CS pulls the MCLR/RESET pin to ground to reset the PIC or AVR (PIC pin won't tolerate the +12volts), AUX switches the 12volt supply on and off through a PNP/NPN transistor pair.
Got a question? Please ask in the forum for the fastest answers.

Re: PIC/AVR high voltage programming adapter

Reply #21
The algorithm to enter the AVR HVSP is pretty simple, just a few steps:

1. SDI, SII, SDO, Vcc down to 0V
2. Apply 4.5 - 5.5V to Vcc
3. Wait 20-60us and apply 11.5 - 12.5 to RESET
4. Release SDO
5. Wait at least 300us before sending any instructions

The RESET pin remains high at 12V throughout the entire programming process, so it could be controlled with CS as it is now. Just the power supply would need to be ON, but as we already can control it with setting PowerUp/Dn on BP side I guess it would be okay? For AVR to work this would require the VTarget to be connected directly or through a jumper to the BP 5V.

Re: PIC/AVR high voltage programming adapter

Reply #22
[quote author="ian"]
CS pulls the MCLR/RESET pin to ground to reset the PIC or AVR (PIC pin won't tolerate the +12volts), AUX switches the 12volt supply on and off through a PNP/NPN transistor pair.
[/quote]

Doesn't need the pic to have +12v on the mclr pin to program it?

I could only find AN910 (microchip) about programming devices pic12, pic16 and pic18. Are there any other application notes or papers that describe the other pics? or are they simular?

for the avr part I have found avr910 (notice the same number as microchip coincidence or what?), but haven't dived very much into it..

Re: PIC/AVR high voltage programming adapter

Reply #23
Quote
Doesn't need the pic to have +12v on the mclr pin to program it?

The target PIC MCLR pin needs +12-+13, but the Bus Pirate pin that controls the VPP can only tolerate 5.5volts. 12/16/18 all need the +13VPP, but newer PICs (like the Bus Pirate) just use a special pattern on the MCLR pin @ VCC. (as I understand it, I'm not (yet) a PIC programming expert).
Got a question? Please ask in the forum for the fastest answers.

Re: PIC/AVR high voltage programming adapter

Reply #24
Got any links to documents? I'm just curious, but i couldn;t find anything on the new pics.

What I've found:

AN910 describes pic12, 16 and 18.
AVR910 describes the low voltage avr

Re: PIC/AVR high voltage programming adapter

Reply #25
For PIC24F there's this from the family reference manual:
http://ww1.microchip.com/downloads/en/D ... 39716a.pdf
http://www.microchip.com/stellent/idcpl ... NextRow=51

I didn't read it, but I think it is probably the programing specs. There are also family manuals for the 30F and 33F. The USBPICPROG app and firmware currently program the 12/16/18 and 30, but not the 24F or 33F.
Got a question? Please ask in the forum for the fastest answers.

Re: PIC/AVR high voltage programming adapter

Reply #26
Hi, trying to find the schematic or BoM in order to complete my programmer. Thanks.
 - Adam

Re: PIC/AVR high voltage programming adapter

Reply #27
Here are the schematics for both the through-hole and SMD version. Sorry about that.

Note: I used C4=10uF with no problem.
Got a question? Please ask in the forum for the fastest answers.

Re: PIC/AVR high voltage programming adapter

Reply #28
Thank you very much. I was surprised that the board you sent was the SMD version. I managed to find an SMD MC34063A in a spare cigarette lighter to usb adaptor. Will let you know how I go. :)
 - Adam

Re: PIC/AVR high voltage programming adapter

Reply #29
Sorry about that. I'm moving and things are a little crazy the last few weeks.
Got a question? Please ask in the forum for the fastest answers.