• AVR Freaks

Hot!PICKit2 not releasing ICSPCLK

Author
upand_at_them
Super Member
  • Total Posts : 637
  • Reward points : 0
  • Joined: 2005/05/16 07:02:38
  • Location: Pennsylvania
  • Status: online
2020/05/31 13:50:23 (permalink)
0

PICKit2 not releasing ICSPCLK

I'm using the PICKit2 to program a 12F1840, where I also need the RA1/ICSPCLK pin for I2C master.  The PK2 doesn't appear to release/disconnect use of that pin.  I have to disconnect the PK2, or pull the jumper, in order for my device to work.  This shouldn't be necessary.  Is this a hardware bug in the PK2?  A series diode didn't solve it.  Other solutions? Would be nice to leave the PK2 connected and just turn on/off power in the standalone app.  By the way, I have DEBUG disabled.
#1

8 Replies Related Threads

    mbrowning
    USNA79
    • Total Posts : 1794
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: online
    Re: PICKit2 not releasing ICSPCLK 2020/05/31 14:12:30 (permalink)
    4 (1)
    If I recall correctly, PK2 (and PK3) has 4.7K pulldown resistors on clock and data which will be a problem for I2C. I believe PK4 allows turning off these pulldowns after programming.
     
    Perhaps a stiffer (lower value) I2C pull up would work for I2C, but pullups of any sort are not recommended for proper PK2/3 operation (it's been quite a few years since I used a PK2 so my memory may be unreliable).
    #2
    ric
    Super Member
    • Total Posts : 28324
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PICKit2 not releasing ICSPCLK 2020/05/31 15:25:15 (permalink)
    0
    mbrowning
    If I recall correctly, PK2 (and PK3) has 4.7K pulldown resistors on clock and data which will be a problem for I2C.

    +1

    I believe PK4 allows turning off these pulldowns after programming.

    Yes it does, for this very reason.
     

    Perhaps a stiffer (lower value) I2C pull up would work for I2C, but pullups of any sort are not recommended for proper PK2/3 operation (it's been quite a few years since I used a PK2 so my memory may be unreliable).

    Indeed. The I2C pullup is likely to interfere with programming. The PICkit documentation is very specific that you should NOT have pullups on PGD or PGC.
     
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #3
    upand_at_them
    Super Member
    • Total Posts : 637
    • Reward points : 0
    • Joined: 2005/05/16 07:02:38
    • Location: Pennsylvania
    • Status: online
    Re: PICKit2 not releasing ICSPCLK 2020/05/31 16:13:54 (permalink)
    0
    What about a series Schottkey diode (1N5817) from PK2 to PIC pin?  Voltage drop should only be around 0.3V.  I have none, would have to order.
    post edited by upand_at_them - 2020/05/31 16:15:08
    #4
    ric
    Super Member
    • Total Posts : 28324
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PICKit2 not releasing ICSPCLK 2020/05/31 16:16:19 (permalink)
    0
    upand_at_them
    By the way, I have DEBUG disabled.

    It doesn't matter what you set that bit to, the tool ignores it and sets it as required by what you are doing (programming, or debugging).
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #5
    mbrowning
    USNA79
    • Total Posts : 1794
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: online
    Re: PICKit2 not releasing ICSPCLK 2020/05/31 19:15:24 (permalink)
    0
    upand_at_them
    What about a series Schottky diode (1N5817) from PK2 to PIC pin?

    Not if you want the PK2 to be something more than a decoration.
    Read the manual, section 3, figure 3-1
    http://ww1.microchip.com/downloads/en/DeviceDoc/51553E.pdf
    If Figure 3-1 doesn't work for you, you are SOL.
    #6
    Anobium
    Senior Member
    • Total Posts : 78
    • Reward points : 0
    • Joined: 2013/07/15 00:47:49
    • Location: 0
    • Status: offline
    Re: PICKit2 not releasing ICSPCLK 2020/06/01 00:50:04 (permalink)
    4 (1)
    This issue is known issue with the PICKit2 programmer.  It is not the PICKit2 software (and its control of the DATA or CLOCK lines) or the PICKit2 firmware.
     
    We get this issue often now that we are supporting PICKitPlus software.
     
    This is a typical email I get.  "I got the clone to work reliably. Here is one problem I have. The 16F18313 shares a I2C line SCL with the programmers PGC line. After programming the PGC holds the SCL line down preventing I2C communications. Is there a way to make the PGC line go into a hi Z mode after programming. Right now I have wired into the programming cable a switch to disconnect the PGC line but I would like to automate the process. "
     
    A switch is the typical resolution.
    post edited by Anobium - 2020/06/01 00:52:20
    #7
    upand_at_them
    Super Member
    • Total Posts : 637
    • Reward points : 0
    • Joined: 2005/05/16 07:02:38
    • Location: Pennsylvania
    • Status: online
    Re: PICKit2 not releasing ICSPCLK 2020/06/01 03:44:59 (permalink)
    0
    I guess I'll make do with my jumper.  Thanks all.
    #8
    Anobium
    Senior Member
    • Total Posts : 78
    • Reward points : 0
    • Joined: 2013/07/15 00:47:49
    • Location: 0
    • Status: offline
    Re: PICKit2 not releasing ICSPCLK 2020/06/01 03:51:14 (permalink)
    4 (1)
    A good approach to use jumpers.
     
    If someone does have the answer that does not involve a switch or jumper then please share.  If you know how a method that involves changes the software then we should make that change.  I am not into changing the PICKit, desoldering components  :-) 
    #9
    Jump to:
    © 2020 APG vNext Commercial Version 4.5