Pickit 2 programing a PIC at 5v with 3.3v chips on board - Page 1
Forum section: electronics / beginners

author: Veramacor
author_rank: Regular Contributor
timestamp: October 01, 2010, 03:25:43 am
content: Hello all again,I have a PIC16F886 that can be run at 3.3v or 5v no problem. From what I've read the Pickit 2 programs at 5v.The problem I'm concerned with is on my PCB there are 3.3v chips (bluetooth module, real time clock).I would like to program the chip via ICSP (I have the 5 pins already traced). Does anyone know if the PIC16F886 can be programmed by the Pickit2 at 3.3v?The pic is a surface mount type so I can't just pull the chip and program externally.I can run the normal power source and have the pickit2 not provide power, but the power to the PIC16F886 from the source is only 3.3v and seems not to read the PIC.Any suggestions?

author: dimlow
author_rank: Frequent Contributor
timestamp: October 01, 2010, 06:53:59 am
content: If your board has its own power, the Pickit 2 will not power the pic. so your safe there. Also in MBLAB you can set the voltage that the pickit will use. That's in the programmer.Setting menu. But there is a problem here if you have a knock off pickit 2. Some of these only use 5v even if you set the thing to 3v.

author: EEVblog
author_rank: Unknown
timestamp: October 01, 2010, 07:17:54 am
content: The PICkit 2 and 3 program using whatever voltage is read from your device under test, so both are fully compatible with your 3.3V circuit. The PICkit reads the voltage used on your board.Both PICkit's can also output a user defined voltage on that same power in order to power your circuit.Dave.

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: October 01, 2010, 11:53:17 am
content: I can't attest to this fact, but I'm told if you let the PICkit 2 automatically detect the device type, it defaults to 5v, and switches to 3.3v only after identifying the part as low voltage.This brief application of 5v to a 3.3v part may not kill it, but still it's outside the absolute max ratings. I inadvertently powered a 3.3v 18F25K20 from 5 volts yesterday when I connected a 5v UART-USB adapter and it didn't seem to suffer any ill effects even being powered that way for half-an-hour until I realized my mistake - I think I'll reserve that part for living on the dev board on my desk just in case.Jon

author: Veramacor
author_rank: Regular Contributor
timestamp: October 01, 2010, 12:21:55 pm
content: Well, its time to buy the real thing - I've got a knock-off pickit2 device and that is what is most likely happening - Defaulting to 5v only.Thanks for the tips - exactly what I needed to know!

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 12:50:43 pm
content: you will probably have to get it off ebay possibly second hand, I don't think they are made any more. yes the pickit will leave your chip alone if it detects that it is already powered although I've always run at 5 V

author: ziq8tsi
author_rank: Regular Contributor
timestamp: October 01, 2010, 01:11:52 pm
content: I have always included a Schottky diode down from board power to the PIC's Vcc, so that the ICSP header can never attempt to power the rest of the circuit. This allows programming under PICkit power only, which may be more convenient, even if the circuit normally requires more than 100mA, or has specific voltage requirements.I realise this may not help OP, unless he wishes to modify the board. Also, if the programming pins are used for other purposes in the circuit, it may be necessary to prevent the !MCLR, PGC, and PGD voltages from propagating as well.

author: Zero999
author_rank: Super Contributor
timestamp: October 01, 2010, 01:21:10 pm
content: Quote from: Veramacor on October 01, 2010, 12:21:55 pmI have a cheap PICkit clone. It did say 5V devices only on the ebay page but I don't have any 3V devices so it isn't an issue for me.How about using a header and connect the power via jumper, so the PIC's power has to be disconnected before the programmer can be connected? Again probably not much help for your existing board but might be a good way of doing it in future.

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 02:12:02 pm
content: Quote from: ziq8tsi on October 01, 2010, 01:11:52 pmthat's a handy and common method for isolating the programming header from the rest of the circuit using the programming pins on the MCU as inputs, providing you can put up with the voltage drop it would work a treat

author: migsantiago
author_rank: Frequent Contributor
timestamp: October 01, 2010, 02:19:07 pm
content: Quote from: Veramacor on October 01, 2010, 03:25:43 amHello.I also have a PIC16F886 and a Pickit2. I can safely read it when operating it at 3.3V.The problem is that my PICwon't run its code and is NOT programmable at 3.3V(I'm using the Internal oscillator, maybe that's why it doesn't work at 3.3V). It can only be programmed using 5V. The weird thing is that Microchip's datasheet says that it can work from 2.0V to 5.5V... which is not happening. My PIC only starts working at 3.7V.This may be happening in your circuit... the main supply is 5V which feeds the PIC and then there is a 3.3V regulator which feeds the other circuits.If you built the board and fed the PIC with 3.3V to work... I'm afraid it won't work.There is another option, theLow Voltage ICSP.DS41287 - PIC16F88X Memory Programming Specificationhttp://ww1.microchip.com/downloads/en/DeviceDoc/41287C.pdfQuote

author: migsantiago
author_rank: Frequent Contributor
timestamp: October 01, 2010, 02:32:49 pm
content: Ohh and be sure to read the PIC errata because there's a bug involving the Low Voltage Programming.http://ww1.microchip.com/downloads/en/DeviceDoc/80302F.pdf

author: Veramacor
author_rank: Regular Contributor
timestamp: October 01, 2010, 02:36:23 pm
content: "I also have a PIC16F886 and a Pickit2. I can safely read it when operating it at 3.3V.The problem is that my PIC won't run its code and is NOT programmable at 3.3V (I'm using the Internal oscillator, maybe that's why it doesn't work at 3.3V). It can only be programmed using 5V. The weird thing is that Microchip's datasheet says that it can work from 2.0V to 5.5V... which is not happening. My PIC only starts working at 3.7V."Sounds like my situation, but I have to say the surface mount version of the PIC16F886 seems to run my code at 3.3v with no problem, I just can't see the device with my pickit clone if I try to set to 3.3vThe Schottky diode approach may be my lead alternative

author: migsantiago
author_rank: Frequent Contributor
timestamp: October 01, 2010, 02:38:42 pm
content: Quote from: Veramacor on October 01, 2010, 02:36:23 pmAre you using the internal oscillator or an external crystal?Some pickit2 clones do not implement the variable voltage supply that the original pickit2 has. Maybe that could be your problem.

author: Veramacor
author_rank: Regular Contributor
timestamp: October 01, 2010, 02:44:01 pm
content: I'm using the internal oscillator of the 886.This is the el-cheapo pickit2 clone I'm using It's worked on every Pic I tried to program, but this is the first time I've had the need to run 3.3v:http://cgi.ebay.com/iCP01-USB-Microchip-PIC-Programmer-Tiny-Low-Price-/270643146343?pt=LH_DefaultDomain_0&hash=item3f0396ae67

author: Veramacor
author_rank: Regular Contributor
timestamp: October 01, 2010, 02:47:31 pm
content: RED FACE TIME!The Ebay link previous just gave me my answer:"3.3V supply, J-Series and in-Circuit Debugging mode are not supported"Dammit Jim- I'm a Doctor, not a manual reader!

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 02:53:02 pm
content: it's just a cheap and nasty device that will get a basic job done with no frills, probably has the basis of the pickit2 in the firmware but that's it, I think not bothering with a case and just shrink sleeving the whole thing is clue enough that it's a cheapo thing you can't expect wonders from

author: Veramacor
author_rank: Regular Contributor
timestamp: October 01, 2010, 03:21:39 pm
content: So I will probably go for a pickit2 clone as I dont use mplab at all. I really like the standalone pickit2 software. I actually am using MikroE picbasic as the development platform, and they have their own programmer, but they want $90US for it.Is it true the Pickit 3 cannot use the standalone software and must be used with MPLAB?I'm thinking about this clone...http://cgi.ebay.com/Clone-Microchip-Programmer-PICkit2-/250704323467?pt=LH_DefaultDomain_0&hash=item3a5f24638b

author: Zero999
author_rank: Super Contributor
timestamp: October 01, 2010, 03:46:01 pm
content: Quote from: Veramacor on October 01, 2010, 02:44:01 pmI've got one of those and consider it to be good value for money. It's cost effective and gets the job done. I'm aware of it's limitations and not being able to program 3.3V devices is one of them - it says so on the ebay page:Features & Specification:Low cost, small size , high performance and user friendly deviceUSB plug and play functionNo external power supply is requiredUsed for programming the popular Flash PIC MCU, includes PIC10F, PIC12F, PIC16F, PIC18F and dsPIC30 familyCompatible with Microchip's PICkit 2 and MPLAB IDESupported operating systems (32bit/64bit): Windows XP ,Windows Vista and Windows 7Excellent flexibility that allows using in both PC desktop and laptop5V operating voltage only3.3V supply, J-Series and in-Circuit Debugging mode are not supportedUSB cable is NOT provided to save material and shipping cost .Please visitwww.piccircuit.comto get extra USB cable option.There is a version which supports 3.3V devices, but it's not available on ebay and has to be purchased from the piccircuit website.http://www.piccircuit.com/product.php?id_product=55If you don't already have the adaptor (the board with a turquoise ZIF socket), I recommend buying the bundle.http://www.piccircuit.com/product.php?id_product=56I'm beginning to thing I should've bought the 3.3V version in the first place, it wasn't that much more expensive and even though I don't have any 3.3V devices at the moment but that could change.

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: October 01, 2010, 03:48:42 pm
content: Quote from: Simon on October 01, 2010, 12:50:43 pmI'm not sure what the official Microchip word is, but Digikey has over 2000 PICkit 2s in stock in various packages. The rumors of its death are greatly exaggerated.

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 03:51:05 pm
content: well obviously until stock runs out they will be around but it will some day

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: October 01, 2010, 03:59:20 pm
content: Quote from: Simon on October 01, 2010, 03:51:05 pmWell Simon, how about over 1500 available at Microchip NOWwith more stock expected by October 18?That's at least 3500 that you can order today. Doesn't seem to be a need to go looking for a used PICkit 2 on ebay any time soon.

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 04:05:40 pm
content: well that's a comfort, I thought they planned on ditching it, I bet when the pickit3 was found to be an initial disaster sales of pickit2 skyrocketed because people feared it was their last chance to get a 2

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: October 01, 2010, 04:59:05 pm
content: I definitely wouldn't trade in my PICkit 2 for a '3 yet. I suppose I'll be forced to "upgrade" at some point but the features lacking in the PICkit 3 are important to me.

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 05:37:32 pm
content: well while playing around with 12 and 16 possibly 18 series I can't see the point of upgrading and would hope that microchip keep updating 2 (but then that obliterates 2 ? sounds like microsoft all over again)

author: Veramacor
author_rank: Regular Contributor
timestamp: October 01, 2010, 06:21:39 pm
content: Many pickit2 in stock at digikey confirmed.Any one know where I can get a ribbon cable much like the el-cheapo clone has? I've grown accustomed to its ease of use (my ICSP pins stand straight up) and I'd prefer not to balance the pickit2I suppose I could make my own cable out of old computer ribbon cable. Digikey's stock bundles don't seem to carry the ribbon with their offerings...

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 06:26:03 pm
content: just get some single line header strips, break 6 off and solder the ribbon cable to it. I'm aiming to use 90 degree connectors on my boards but in the event I can't get the header near the edge I'd use a cable

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: October 01, 2010, 06:26:59 pm
content: At thebottom of this pageare a couple options.This page also shows a trick to deal with female - female cables.

author: Zero999
author_rank: Super Contributor
timestamp: October 01, 2010, 06:38:18 pm
content: Quote from: Jon Chandler on October 01, 2010, 04:59:05 pmYou could skip the 3 and go straight to 4, when it's available, as many people are doing with Windows Vista? Of course I'm not comparing the quality of the PICkit 3 to Vista.

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 06:48:29 pm
content: sounds like a good comparison to me, the best I hear about it is: uh... well.... it supports more chips than 2 does (wonder why that is now) and does the same thing for more money but some of the cool advantages have been removed deliberately !I understand that it will support chips that 2 cannot but that's about all it seems to have going for it

author: Veramacor
author_rank: Regular Contributor
timestamp: October 01, 2010, 06:59:57 pm
content: The 6th pin on the pickit2 is a no connection right? El-cheapo uses only 5 pins - that 6th pin is reserved for future use?here is what I'm used to currently...

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 07:19:06 pm
content: I think it has something to do with the debugger or logic analyser ? not needed for programming

author: Zero999
author_rank: Super Contributor
timestamp: October 01, 2010, 07:31:13 pm
content: Quote from: Simon on October 01, 2010, 06:48:29 pmPerhaps someone will design a clone combining both the best of 2 and 3?

author: Simon
author_rank: Unknown
timestamp: October 01, 2010, 07:47:11 pm
content: yea it's called keeping 2 up to date and adding the features of 3 to it for the new picsor get 3 and put all the features back into it

author: migsantiago
author_rank: Frequent Contributor
timestamp: October 01, 2010, 08:04:57 pm
content: Quote from: Veramacor on October 01, 2010, 06:59:57 pmThe 6th pin is for other working modes... i.e. Logic Analyzer. It's not used for programming.Wow... I just reviewed your diagram and you forgot to add the diode for the ICSP mode. That diode prevents current flowing from the 13V at Vpp to the 5V supply. You should implement it as the Pickit2 manual says.

author: scrat
author_rank: Frequent Contributor
timestamp: October 01, 2010, 08:42:41 pm
content: Quote from: Hero999 on October 01, 2010, 01:21:10 pmI think that a header (with a bunch of diodes and some transistors, gates or comparators) could make the job, translating levels in and out from the PicKit.Moreover, there are some low-power PICs (for example, one I used, the PIC18F26K20, running at 3.6V max) for which the 12V Vpp is above the abs.max.rating, and they require a protection (usually with a zener diode). With the ICD2 debugger, when you set the device into MPLAB, if it is a low-voltage one it comes out with a warning saying that a protection from the 12V must be put there by the user.So I think that a good header for level translation and protection would be useful, although easy to make and cheap.Quote from: migsantiago on October 01, 2010, 08:04:57 pmMaybe I don't catch you, but... How can a 470 Ohm protect from the 12V Vpp, since it will go in series with the 10kOhm pull-up? The diode would be a solution, but I wonder if it is really needed (since the same 10k resistor).

author: migsantiago
author_rank: Frequent Contributor
timestamp: October 01, 2010, 10:25:38 pm
content: Quote from: scrat on October 01, 2010, 08:42:41 pmI don't use the 470 ohm since in my opinion it won't do anything.I only use the diode which stops a little current flowing to the 5V supply (13V - 5V = 8V across the 10k resistor).There's people that do not use the 10k resistor. That people must always use the protection diode.