PICKit 3 not debugging with voltage regulator - Page 1
Forum section: electronics / general

author: pelle.jansen
author_rank: Contributor
timestamp: February 25, 2012, 05:49:09 pm
content: Hi guys and girls,I have stumbled on something interesting: When I am supplying a PIC16F877A microcontroller with a 9V battery though an LM7805 voltage regulator the debugging feature of the PICKit 3 either takes extremely long (>2 minutes) to start or doesn't start at all. Then when I switch to power from the PICkit3, Debugging works fine again. I am using decoupling on the power of the PIC. Any idea why? The PIC runs its program just fine but doesn't debug properly.Thanks

author: Zero999
author_rank: Super Contributor
timestamp: February 26, 2012, 07:46:43 pm
content: What capacitors are you using before and after the LM7805?How much current are you drawing? Are you sure the 9V battery can supply sufficient current to power the PICKit 3?Have you measured the output voltage?The LM7805 is a bad choice for a circuit running from a 9V battery because the drop-out voltage is between 1.5V and 2V so the output voltage will drop below 5V and regulation will be lost when the battery voltage falls below 7V. For optimum battery life the circuit should be designed to work down to 6V so a low drop-out regulator is a better solution.

author: pelle.jansen
author_rank: Contributor
timestamp: February 26, 2012, 09:09:57 pm
content: Quote from: Hero999 on February 26, 2012, 07:46:43 pmI am only drawing a few mA and the 9V battery is under load 9.2V so that shouldn't be a problem. The output voltage almost perfect 5V. My oscilloscope died so no idea about ripple. Not sure which capacitors as I do not have them with me right now. But i do know that the input is a small electrolytic and the output is a ceramic and a large electrolytic. Not sure if that is right but never had any problems before now.I know it is a bad idea but I only use it for if I am away from my bench PSU. The circuits I supply with the 9V battery and regulator are only temporal so I don't care if I don't use the entire battery.

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 26, 2012, 09:17:57 pm
content: The problem may be that you're not drawingenoughcurrent. The 78xx regulators require a minimum current. You might stick a dummy load (1K resistor or less) on the output parallel to the MCU and see if it works then.

author: pelle.jansen
author_rank: Contributor
timestamp: February 27, 2012, 02:18:36 pm
content: QQuote from: TerminalJack505 on February 26, 2012, 09:17:57 pmI tried a large LED with resistor (around 10mA) but same problem. What capacitor values do you recommend for use with the LM7805 and a PIC microcontroller? Every site i find give different values and I have no idea what range will work.

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 27, 2012, 03:02:46 pm
content: Quote from: pelle.jansen on February 27, 2012, 02:18:36 pmHonestly, when bread boarding with LM78xx regulators, I've always just thrown a couple of electrolytic caps of about 10uF on the input and output and never had any problems. One of the circuits on one of my bread boards now has an LM7805 and has 100uF caps on the input and output. (Those must have been what was handy at the time.)The datasheets usually specify fairly small caps. One I just looked at (Fairchild's) specified a 0.33uF for the input and a 0.1uF for the output. So if you think that's the issue then it's always best to go with the manufacturer's recommendations.

author: wkb
author_rank: Super Contributor
timestamp: February 27, 2012, 03:34:32 pm
content: Quote from: TerminalJack505 on February 27, 2012, 03:02:46 pmThe 100nF ones are to prevent oscillation, the 10 of 22 uF (or somesuch) to improve regulation.Hope I remember this correctly. Anyway, same experience here: just throw it together and it works with an LM78xx