PDA

View Full Version : 12F509 / 609 ICSP problems



Macgman2000
- 30th September 2009, 16:08
Hello All,

I looked through the archive and did not find a working solution to my problem. I am using a USB MELABS in-circuit programmer which works on just about everything I have used, except the 12F series. I am about to set a new punt record with my programmer! gggrrrr

I tested two setups....

1). external power 5vdc on the chip and isolated MCLR pullup....which works fantastically well for the 16F series. This method did not work for the 12F

2). I used a voltage regulator on the VPP line to power the MCU, a recommendation from an archive post. That VPP needs to come up before power up or vise versa. This did not work either.


The error is the same regardless of the method. It initiates erase upon programming, then programs and when it verifies it sees a memory content error 000 or something to that effect.

No, I don't have an adapter to program the IC outside of the circuit, that was the whole reason I chose ICSP.

HELP!!!!!

Nick

mackrackit
- 30th September 2009, 16:33
Stupid question.....
Are you sure the correct pins are being used? The 12s are different from the 16s.

Macgman2000
- 30th September 2009, 16:57
Does MCLR need to be pulled up even when programming? IE, do I need to use a diode with a 10K pull up to isolate 5vdc? I have been trying to program without pulling up the MCLR pin. Oh man...I think that may be it, the MCU is in reset mode when it is finished programming....does that sound right?

Nick

mackrackit
- 30th September 2009, 17:06
While programming MCLR does not need to be connected to anything but the programmer.

Do you have MCLR configured as an input or reset?

This may also help.
http://www.melabs.com/support/icsp.htm

Macgman2000
- 30th September 2009, 17:12
yes as input.

ardhuru
- 30th September 2009, 18:57
yes as input.

And internal oscillator, I suspect.

In which case, vpp-before-vdd is the only option that can resurrect the chip.

Macgman2000
- 30th September 2009, 19:07
OK I got it to work. Had to use pin#4 on the USB programmer header, not external power. It supplies switched vdd to the mcu. I assumed that it takes into account the unique programming cadence for the 12F. I assumed correct, thanks all!

Nick

dhouston
- 30th September 2009, 22:27
No, I don't have an adapter to program the IC outside of the circuit, that was the whole reason I chose ICSP. What adapter(s) do you have? Are these SOIC? Narrow? Wide?
http://www.sivava.com/buynow.php?pd=B20
http://www.sivava.com/B21_Adapter.htmlThese fit into DIP adapters for programming and can be used in breadboards for testing.

Macgman2000
- 1st October 2009, 22:06
No adapter needed. I am using it in circuit, except that I isolate power from the programming header pins on my target board. The programmer does not power the rest of the circuitry, only the chip. It works well, only if you use the pin#4 header on the USB programmer for switched Vdd. Any time I apply external power, it violates the cadence requirement called out in the data sheet. The order of logic levels on pins to put it in program mode is very finicky ;)

Nick

dhouston
- 1st October 2009, 23:51
I understand that you are using ICSP but others might find the adapters useful.