News:

Let's find out together what makes a PIC Tick!

Main Menu

A sorry tale of programmers VDD and destroying chips

Started by TimB, Feb 02, 2021, 09:16 PM

Previous topic - Next topic

TimB

Hi all

I have as you will know if you have been following been working on a new product.

It's going well just a few BT issues to solve. The dev board is running well, sounder issues resolved, life is good.

Until!!!!

I reprogrammed the board. It seems the pickit 2 has its issues, VDD settings are one of them. I has a mind of its own and sets the VDD it supplies based off reasons I do not understand.

The long and short of it is. Last board it programed was a pic16 device so the pickit supplied 5v. All good, no issue. Then I connected my new dev board and selected the the hex file and hit write.
No magic smoke was released, no smell of burning plastic. It was only when some crucial functions failed to work I suspected the worst.

The BT module fried along with 2 Pt100 converters.  :o

So, ordered some new parts and now to see how good my hot air desoldering techniques are.

I'm going to build a programming cable with a regulator in line now.

Ahh well I'm still learning...

Tim

flosigud

Is your programming voltage isolated from VDD with either a resistor or a Schotkey diode?

HAL

Microchip has a document: DS30277DIn-Circuit Serial Programming™(ICSP™) Guide

http://ww1.microchip.com/downloads/en/devicedoc/30277d.pdf

Look at Figure 1 at the bottom of page 2-1.  The MCLR/Vpp pin is isolated from
VDD with a resistor (I use 10k) from VDD in series with a diode (I use a 1N4148)
the cathode connects to the MCLR/Vpp pin.  This arrangement has worked well for
any  pic processor that I have used.

TimB


Every pin on my device is being used including the programming pins. The programming pins are on a keyboard so not an issue.

I'm not keen on supplying VDD to the pic via a resistor. Some of my designs can push the current to 30ma on the pic for short periods so a resistor isolating it enough to not allow back powering when programming yet enough power the pic with 30ma is not feasible.

What the problem was is that there is no easy way to force the PicKit to only supply a set voltage and for it not to decide on random to change it.

A dedicated programming cable with regulation is the only safe way.


Gamboa

TimB,
I use this configuration to program by ICSP
ICSP.png
Long live for you

TimB


Hi

What I see from your schematic is that there is a voltage drop across the diode so the pic is running at a lower V than the other parts of the circuit.

Tim

top204

Depending on the specification of the Schottky diode, the voltage drop will be 0.3V or less. This is fine for TTL operation and the PIC device itself will usually operate from 3 Volts upwards, so there should not be a problem.

I use this method myself on some circuits where either the USB voltage needs to be isolated, or battery voltagein needs isolation fro an external source.

 I have also destroyed a device with the "very" dreadful PICkit4 programmer and application. I did not change the device to the correct one in the PC app, and I, assumed, the programmer would be set to a low voltage, then incremented until it got a response from the device so it could see what type it was and automatically assign to it. But No! The programmer gave full voltage to a lower voltage microcontroller and killed it while it was looking for it!

The PICkit4 application also complains if it is set not to power the device, but the pin to the VDD is not used so no voltage appears on it. Then you have to go through a bunch of options to enable power to the device before it will even allow anything to happen, even when it is not required! The PICkit programmers are absolutely dreadful and always have been, but the PICkit4 application takes the biscuit for dreadfullness. So be careful with them.

TimB


I though I better give an update on this.

It turns out after replacing the parts and the fault still existing that I found the problem was in fact not directly due to the programmer.

The issue turned out that I reprogrammed my device and Eeprom Data was not enabled. It had not been an issue as I have settings in Eeprom that I did not want changing. Calibration stuff etc.

The issue arose in that a few days back I made a small change to an eeprom setting, probably moved its location and that moved a load of other settings.

The end result is the BT module ON/OFF flag check was now looking at the wrong place and the code said OK you want the BT OFF. It was only after going over the board with a scope and finding the RST line to the module was off, that I went into my settings there I spotted the module was off. Turned it on and the BT side came back to life.

That made me think? Was some Max Pt100 cal value screwed so it failed to report correct data. EEprom data back on and a reprogram... It is all working again.

I'm still going to make a dedicated programing cable with a regulator to prevent the possibility of it happening.

Cheer

Tim



HAL

I think you may have misunderstood my first post.  Supply VDD directly to the Vdd pin.  The resistor and diode supply VDD to the PROGRAMMING VOLTAGE (VPP) PIN.

Using the pic18F24k22 as an example, VDD connects directly to pin 20.
        anode >|cathode
VDD----10k---->|-----pin 1  which is the Vp (higher voltage) programing pin.
VDD------------------pin20.
 
 http://ww1.microchip.com/downloads/en/devicedoc/30277d.pdf  
  Take a look at Figure 1 at the bottom of page 2-1.

 Regards

TimB


Thanks Hall

That is my current system protecting the VPP from the rest of the circuit.

The issue was the VDD applied was to high. I can get round this by forcing the VDD from the board. Or placing a Vreg in line.

I do not think they will work together though.

Thanks for your help though.

Tim