PDA

View Full Version : 18F4620 refuses to be re-programmed



MaxG
- 2nd December 2006, 18:09
hi,
I can only program one time (from empty) any 18F4620 part. Next times it gives lots of fails in verification (the piece remains with the first code programmed unchanged). My warp13 can program with no problem 18F2620. Is there any undocumented knowing or trick for programming the 18F4620?

Thanks.

skimask
- 2nd December 2006, 18:18
hi,
I can only program one time (from empty) any 18F4620 part. Next times it gives lots of fails in verification (the piece remains with the first code programmed unchanged). My warp13 can program with no problem 18F2620. Is there any undocumented knowing or trick for programming the 18F4620?

Thanks.


Try putting a pulldown on RB5/PGM. It sounds like your trying to use LVP and therefore need the pulldown. Check your LVP bit in the Warp13 software. Failing that, it sounds like you have a hardware problem like your MCLR* line isn't getting to the PIC correctly. I've been using the Warp13 on the '4620 for a couple of years now and haven't had a problem yet.

JDG

keithdoxey
- 2nd December 2006, 19:52
Hi Max,

A while back several of us were having problems programming PICs with PicStartPlus and it turns out there are known issues with some devices.

Check out this thread for possible ideas including the tip from Microchip to erase the device first and then reprogram.

http://www.picbasic.co.uk/forum/showthread.php?t=4710

HTH

MaxG
- 2nd December 2006, 20:25
Thanks Skimask,
I have re-checked the setup of LVP both in the software line #pragma config ... and in the config bit table of the WARP13a application window for it to be unchecked/not selected. I have also tested the Vpp while programming and is 12.75 volts, clear and stable. The line RB5 is floating, must I pull it down even if I do not use LVP?
Any idea about why the pic let me to program one time and no more?

I read that some other pics showed this problem with MPLAB compatible programmers, but I have tried all the receipes (1-10K loading MCLR to GND, C 0.1µF from Vdd to Vss, ALL Vdd pins joined, ... ) and nothing seems to cure the problem.

It can not also be programmed neither the config bits nor the ID word of the PIC. Curiously, the first time (right after solder the part to the board) the programming was perfect.

Maxi.

skimask
- 2nd December 2006, 20:29
Are all Vdd joined and all Vss joined as well?

mister_e
- 2nd December 2006, 20:31
TOO bad... it's a Melabs PICBasic forum, not C

and...


I read that some other pics showed this problem with MPLAB compatible programmers, but I have tried all the receipes (1-10K loading MCLR to GND, C 0.1µF from Vdd to Vss, ALL Vdd pins joined, ... ) and nothing seems to cure the problem.

MCLR to Vdd. PGM loaded to gnd via resistor.

something like
http://melabs.com/images/icsp1.gif

on Melabs website : http://melabs.com/support/icsp.htm

MaxG
- 3rd December 2006, 20:01
Thank you all people. I still do not know which of the solutions has fixed the fault (I suspect that adding the resistor from PGM to ground was the cure) but... by now I am programming my 18F4620 time after time.
Mister-e: I have never found so smart and plenty of resources guy in any part of the world. Congratulations. Please be patient with people that has an I.C. lower than 150 or 180. In anyway, I thank you all again.
Note: be carefull adding any kind of high frecuency EMI suppresor in series with the supply of the PIC (to avoid the interference generated by the PIC going out to the circuit). At 20Mhz the supply current might be several miliamps. Should the internal resistance of the suppression device is several ohms it makes the 5volts supply to go down while you are programming the part and... you enter in the forum lost like a grape floating in the Atlantic. As I am supplying 5 volts to the PIC from its own board (not from the ICSP interface), the supply was not very clean (I do not know how many miliamps do the pic uses in programming). Do this sound very stupid or can be part of cause in the programming fault?

Maxi.

mister_e
- 3rd December 2006, 20:40
mmm, could be but if the PGM pin is not loaded, on many device (16Fs too), it doesn't work. The PGD,PGC,MCLR wires between your board and your programmer should be short. Here, under 6-8 inches, do the trick. I use a flat cable and i have a GND between all signals.

Make sure the LVP mode is disabled, make sure your supply line is clean, make sure you place few 0.1uF capacitor here and there and better are your chance it works. Usually i place 0.1+10uF tantalum close to the PIC on the Vdd line(s).

In theory, when you program the PIC.. the PIC itself don't need much current, but the hardware attach to could. Without the schematic it's a bit hard to guess. Bear in mind that when you program the PIC, all I/Os should become Hi-z... in this case it could do some strange behaviour.. or not.

Did you place the Diode on MCLR pin too?


Please be patient with people that has an I.C. lower than 150 or 180.
Sorry, i don't know what's happen to me these days.. kind of PMS... sort of ;)

skimask
- 3rd December 2006, 20:51
Sorry, i don't know what's happen to me these days.. kind of PMS... sort of ;)


It's not your fault, it's the people that want everything and they want it right now and they don't want to do any of the work involved with getting whatever it is yesterday and not tomorrow (like those idiots that paid $1000+ for the Playstation 3 on eBay, if they wait for a month or so, they would've gotten it for retail price). Ya gotta love those 'I've got X, can somebody give me Y?'....
JDG

mister_e
- 3rd December 2006, 21:01
Could be, but not in this specific thread ;)

BTW, we're here to help and learn.. so why not doing it smooth?

Archangel
- 4th December 2006, 09:16
Sorry, i don't know what's happen to me these days.. kind of PMS... sort of ;)
Hi mister_e,
I had that when my daughter was a teenager, it stands for PAPA MUST SUFFER ! ;)
JS