PicKit3 and probing with a scope - Page 1
Forum section: electronics / general

author: NivagSwerdna
author_rank: Super Contributor
timestamp: August 16, 2016, 12:01:06 am
content: After many years of not doing any PIC stuff I connected up a 16F1939 to a PicKit3 on a breadboard...I added a pull up to MCLR and put a decoupling cap between VDD and VSSFinally I added an LED to RA0 wired to ground via a limiting RI configured the PIC to generate a Type A waveform from its LCD common pins and wrote a simple loop to flash the LED on RA0The PIC is powered from the PicKit3When the program is run in the MPLAB debugger the LED flashes nicelyNow I wanted to look at the output of COM0 of the multiplexed LCD lines using my scope but...... when I attach GND of the scope probe to GND of the PIC the LED stops flashing, the PicKit3 says current overload and it all comes crashing down.I can only assume that this is creating some kind of ground path but I am a bit surprised as isn't the PICKit at GND potential... the same as the scope???Any clues appreciated.

author: RogerRowland
author_rank: Regular Contributor
timestamp: August 16, 2016, 12:24:08 pm
content: Quote from: NivagSwerdna on August 16, 2016, 12:01:06 amA DMM would tell you if there's some potential difference, have you tried measuring the voltage between the relevant GNDs?

author: Ian.M
author_rank: Super Contributor
timestamp: August 16, 2016, 12:47:22 pm
content: In addition to the advice above to check for ground potential differences, the PICkit 3 Vss rail is connected straight through from the USB Gnd to the target connector Vss. If you have a bad USB cable or worn or dirty USB connectors, it is possible for there to be more than 0.3V drop between target Vss and the PC PSU ground, which could lead to serious problems if any chip input was pulled below its local 0V rail.To resolve the problem, you should power both your PC and your scope from the same outlet or socket strip, and it may be advantageous to run earthing straps between your target board and your PC and scope. If you have a ground fault on your mains supply or in your test bench wiring or the equipment you are using, there is a risk of a high fault current flowing through the extra grounding straps, so you may wish to include a 2A fuse in each of them to reduce the risk of serious equipment damage (its easier to replace blown I/O chips than to repair ground traces that have been burnt off right across a circuit board). The fuses need to be visible so you can easily spot if they ever blow. *NEVER* fuse a safety ground!

author: NivagSwerdna
author_rank: Super Contributor
timestamp: August 16, 2016, 10:32:45 pm
content: Thanks for the suggestions!I measured the potential between the 'ground' on the scope lead and the 'ground' on the target board (which is as you said at Pickit/USB ground)...3.25vThen I realised the mistake...I must have swapped + and - on the breadboard rail (but done it consistently enough that it was wired correctly)So reversed the wiring and...Thanks for your time!

author: Ian.M
author_rank: Super Contributor
timestamp: August 16, 2016, 10:52:11 pm
content: So you actually clipped the scope ground to the 3.3V rail?Be thankful the PICkit 3 has reasonably effective over-current protection on its Target Vdd rail, and that you weren't using a high current bench supply!

author: dannyf
author_rank: Super Contributor
timestamp: August 16, 2016, 11:11:55 pm
content: "Then I realised the mistake..."A whimpy power supply is an experimenters best friend, and best safety device no-money can buy.