Re: Frustrated with 18F87J50
I'm assuming your trying to program the chip using ICSP. I'll also assume you're using the PGD and PCD lines for something in addition to ICSP. If you isolate those lines using a switch to disconnect them from your circuit during programming and then reconnect once programming is complete then ICSP should work. You could also switch the MCLR line if you wanted but I've found that is often unnecessary.
Something to try is put your PIC back into your demo board and see if it will program. If it does then I'm guessing your programming lines are loaded. In lieu of a schematic and/or code, that is my best but not only guess.
Re: Frustrated with 18F87J50
Yup, trying to program using ICSP. I'm not using the PCD and PGD lines for anything other than ICSP. When you say switch the MCLR line, what do you mean?
I can put the PIC into the demo board but it was a PITA to solder on my circuit board. As far as minimums, you only need to power the VSS and VDD lines, as well as route the correct pins to PCD, PGD and MCLR.
In reference to the MCLR, I followed the Microchip schematic for the 18F87J50 demo board with a slight deviation. They have VDD---> 15K ohm--->820 ohm--->pin 9 (MCLR). The point between the two resistors has a 10nF cap to ground, which I believe is only for the switch to manually reset the PIC.
I have VDD----->12K ohm---->pin 9 (MCLR). I have a .1uF cap to ground at the MCLR input.
When I attempt to program the PIC, the MCLR line drops to ~.5VDC, which is just about the same as the demo board.
Re: Frustrated with 18F87J50
Hi Christopher
I use the 18f85J90. My guess is you may have pin 12 tied to 3V3. VDDCore is a stand alone pin that is tied to a capacitor to smooth the internal core vdd.
Some fundamentals to check (I use a TQFP device)
RB6 (pin 52) is Clock PK3 pin 5
RB7 (pin 47) is Data PK3 pin 4
VDD (3V3) on pins 24,25,32,48,71 PK3 pin 2
GND (0V) on pins 11,31,51,70,26 PK3 pin 3
MCLR (pin 9) PK3 pin 1
Re: Frustrated with 18F87J50
Hey Jerson - long time no talk. Thanks for the tips. I'll try them out in a little bit.
Darrel - I didn't have the cap on the MCLR originally. If I understand you correctly, I can get rid of the cap and the smaller resistor and just use 12K ohm?
Regarding the AVdd and AVss pins, I didn't see anywhere in the datasheet where it states you have to have it connected even if you don't use the analog pins. I may have missed it but I didn't see it mentioned. I had first left it unconnected and then connected it after looking at the demo board schematic. This couldn't have damaged the PIC, could it have?
I see a "mistake" on my ENVREG pin. My brain must have been shut off last night!. I intended to tie the ENVREG pin to Vdd through a 1K ohm resistor. I tied it to the wrong side, which means it is actually tied into MCLR. Hmmmmm, I can see how that would cause serious problems with programming. As far as programming, does the ENVREG pin need to be set up correctly only to program?
Lastly, on my Vcap (pin 12) I have a .1uF ceramic cap to ground. Is this an issue?
Re: Frustrated with 18F87J50
Quote:
Originally Posted by
Christopher4187
Darrel - I didn't have the cap on the MCLR originally. If I understand you correctly, I can get rid of the cap and the smaller resistor and just use 12K ohm?
Yes, the pull-up resistor is all you need.
Quote:
Regarding the AVdd and AVss pins, I didn't see anywhere in the datasheet where it states you have to have it connected even if you don't use the analog pins. I may have missed it but I didn't see it mentioned.
Look in the Programming Spec., Table 2-1 PIN DESCRIPTIONS (DURING PROGRAMMING):, Note 1: "All power supply and ground pins must be connected, including analog supplies (AVDD) and ground (AVSS)."
Quote:
This couldn't have damaged the PIC, could it have?
Unlikey, but you never know.
Quote:
Lastly, on my Vcap (pin 12) I have a .1uF ceramic cap to ground. Is this an issue?
Recommended Vcap is between 4.7 - 10uF.
See datasheet table 28-4: INTERNAL VOLTAGE REGULATOR SPECIFICATIONS
Added: Table 2-1 in the programming spec. also says VUSB should be tied to VDD during programming.
.
Re: Frustrated with 18F87J50
Darrel, if you were here I'd give you a big, fat kiss! :eek: Ok, maybe not a kiss but......
The ENVREG pin and the MCLR pins were both problems. Fixed them both and it programmed on the first try. Thanks!