No announcement yet.

Erratic U2 USB programmer behaviour

  • Filter
  • Time
  • Show
Clear All
new posts

  • BrianT
    Fixed - thanks Darrel

    The on board power is within 20 mV of the USB power. I pulled pin 1 of the ICSDP connector on the target board and it made no difference. I removed the 100 nF cap from the Reset line and now everything works as expected. It has been my practice to always fit 100 nF to the MCLR pin since the days of 16F84 so my systems must have all been marginal.

    Thanks for your outstanding help as always.


    Leave a comment:

  • Darrel Taylor
    Second BIG problem ...

    >> Reset has a 100 nF cap to Gnd and 10k to Vdd
    Is that cap directly on the MCLR pin?

    Any capacitance on the MCLR pin will cause programming to fail.
    The 18F4620 does not need a capacitor there.
    And if you do put one there, it must be isolated with a resistor.


    Leave a comment:

  • Darrel Taylor
    One BIG problem ...
    Do you really have the power supply from your target board tied to pin-1 of the U2?

    That puts your power supply in a nasty fight with the USB bus power.
    If your target boards power supply is stronger than the USB power supply (very likely with a TO220 regulator) then the USB bus loses .

    If it's a good USB bus, it will shut-down before being damaged, but that is not always the case.

    Pin-1 from the U2 programmer is designed to provide power, not be given power from the target board.

    So now it is critical that you take a voltage reading from pin-1 of the programmer (With the target disconnected).

    And probably the most important question from my last post was "Are you able to program a chip in your 40-pin ZIF adapter?"
    That simple test narrows it down to either the programmer, or your board.
    Well, or the 10-pin ribbon cable.
    But if you can program it in the adapter, the problem is on your target.

    For sure, disconnect the target power from the programmer pin-1.

    Leave a comment:

  • BrianT
    U2 with ZIF works, U2 to board rarely works

    Hi Darrel,
    Thanks for remembering my last problems.
    This is different hardware with a 40 pin DIP 18F4620 whereas the previous issue was with a 44 pin 18LF4620.
    The current hardware links PGC and PGD direct to the 10 pin IDC connector to the U2.
    Voltages are very close to 5.0 V and 12.0

    The 10 pin IDC is wired as follows.
    1 +5 from the target board PSU. Permanently on.
    2 Reset
    3 n.c.
    4 n.c.
    5 n.c.
    6 PGD
    7 n.c.
    8 PGC
    9 Gnd
    10 Gnd

    PGM is tied to ground via 100k.

    Reset has a 100 nF cap to Gnd and 10k to Vdd.

    Because all last week I had no trouble programming the target board and this week it rarely programs I suspected that maybe the programming algorithm was marginal in some way. This is reinforced by the fact that two U2 USB both give the same dodgy outcome.

    Any other suggestions?

    Last edited by BrianT; 09-04-2013, 06:01 PM. Reason: Extra information

    Leave a comment:

  • Darrel Taylor
    Hi Brian,

    We had a conversation last year that sounds suspiciously familiar.

    It was the LF4620 then.
    But can we assume it's not the same problem?

    If not, and since it's a laptop, check the voltage from pin-1 of the programmers 10-pin header.
    This is the raw +5V from the USB bus.
    Refer to this diagram for pin numbers ...

    Are you able to program a chip in your 40-pin ZIF adapter?

    Leave a comment:

  • BrianT
    started a topic Erratic U2 USB programmer behaviour

    Erratic U2 USB programmer behaviour

    I have a setup that worked perfectly for over a week but since last night now has only about 1% programming success.
    I have two U2 programmers, a 40 pin ZIF adapter and the target hardware.
    I have changed USB cables, changed USB ports on the Samsung notebook running WIN8 on mains power. I have tried all permutations of these and get erratic fail messages - different almost every time.
    The green/red LED on the U2 is nice and bright and functions as expected.
    The target board is powered up and Vdd reads 4.96 from an LM2940 TO220 regulator.

    U2 USB is running paid ver 4.40 code
    PBP running PBP3Long
    View Volts 5.033 and 12.12. Moves about +/- 30 mV each read

    The program compiles with no errors.
    Programming the PIC however has died.

    Low or Regular voltage erase makes no difference. Manual Erase (Program\Erase Ctl E) is intermittent. Messages include Erase Complete, Erase Failed, device not blank.

    During a normal programming cycle the U2 will crash at almost any point. Erase Code sometimes completes, Erase EEROM Data sometimes completes, Erase Config sometimes completes.

    I can manually erase (Ctl E) sometimes but the next attempt to load code usually says device not blank.

    I suspect a timing issue in the programming software. Any suggestions gratefully received.