K8048 only working when scope connected :?:

I have a very weird behavior. My K8048 was working very well for some time until I tried to flash a 16F877A. It gives error messages in the first few addresses and blank for all others. After reading Timmie’s troubleshooting guide on circuitsonlne I connected a scope (Velleman PCSU1000 - very happy with it) the PIC is programmed flawlessly. Removing the scope again gives the error messages after the first few addresses.

Strange enough when programming other chips (16F877, or 16F827 supplied with the kit both would program without a problem before) the same happens. It seems like something is damaged but not quite broken in the programmer hardware (PGD or PGC line most probably as these are connected to the scope). I don’t think the read circuit (T3) is problematic as the PIC’s do not function after flashing, hence T1 or T2 or one of their dioded are the most probable faults.

btw I have switched from the 300 MHz PIII I was using to a 1.6 GHz PM as I thought this might be it but the scope story remains the same. [/img]

[quote=“Koenie”]I have a very weird behavior. My K8048 was working very well for some time until I tried to flash a 16F877A. It gives error messages in the first few addresses and blank for all others. After reading Timmie’s troubleshooting guide on circuitsonlne I connected a scope (Velleman PCSU1000 - very happy with it) the PIC is programmed flawlessly. Removing the scope again gives the error messages after the first few addresses.

Strange enough when programming other chips (16F877, or 16F827 supplied with the kit both would program without a problem before) the same happens. It seems like something is damaged but not quite broken in the programmer hardware (PGD or PGC line most probably as these are connected to the scope). I don’t think the read circuit (T3) is problematic as the PIC’s do not function after flashing, hence T1 or T2 or one of their dioded are the most probable faults.

btw I have switched from the 300 MHz PIII I was using to a 1.6 GHz PM as I thought this might be it but the scope story remains the same. [/img][/quote]
To which point in the K8048 circuit did you connect the probe of the scope?

I connected the scope directly to the PGC and PGD teminals on the PIC itself. The ground was taken right next to the ground pin of the PIC. The PIC was powered trough the K4048 without any further circuitry attached to it.

Can this have to do with the same issue as described for the PIC18 series in the winpic page: one has to add a 22 to 47 pF capacitor http://www.qsl.net/dl4yhf/winpic/index.htm#pgd_pgc_filtering.
The 16F877A is significantly faster in programming than most other PIC16 chips and maybe the scope probe provided a little capacitance.[/url]

[quote=“Koenie”]
Can this have to do with the same issue as described for the PIC18 series in the winpic page: one has to add a 22 to 47 pF capacitor?[/url][/quote]
Everything points in that direction. It seems the scope indeed provided some additional capacitance (like 30pF is the X1 state).

What I did also (and can not hurt) is adding an extra cap of 100nF between the supply pins of the socket on the K8048 used for programming. This also makes things go better.

[quote=“Dany”]
What I did also (and can not hurt) is adding an extra cap of 100nF between the supply pins of the socket on the K8048 used for programming. This also makes things go better.[/quote]

I assume you mean an extra 100 nF cap on the ICSP connector itself on the K4048 board. This can indeed never hurt, will do so.
I have both power sides of the 16F877A provided with 100 nF caps directly on the pins always.

I will experiment with the caps on the programming lines tomorrow and report back.

btw I ordered an 18F4520 to test this further (will have to use winpic to programm though).

I tested adding the resistors and capacitors on the PGC and PGD lines for the 16F877A (the 18F4520 has not arrived yet).

Doing as described on the winpic page does indeed produce reliable programming of the 877A even in the high speed mode.

There are however some more observations woth mentioning:
only a 100 Ohm resistor on the PGD line already does the trick
15 pF on both data and clock lines works too
15 pF on only the data line does not work
if the 100 Ohm resistor is present on the data line it seems not to matter what is or is not on the clock line

to be continued with the 18F4520

[quote=“Koenie”]I assume you mean an extra 100 nF cap on the ICSP connector itself on the K4048 board. This can indeed never hurt, will do so.
I have both power sides of the 16F877A provided with 100 nF caps directly on the pins always.[/quote]
I did mean the latter: directly on the PIC supply pins where the PIC is actually programmed. (can be in a K8048 socket or in the final circuit via ICSP). I do not think a cap on the K8048 ICSP pins will do much (though it will help a little).