Reusing PGC & PGD pins


+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,662

    Question Reusing PGC & PGD pins

    Do I have special considerations to take when I reuse ICSP pins?

    Do I need a jumper during programming if I have a device connected, like a resistor/LED?

    (I couldn't find any REUSE PGC/PGD/ICSP posts)


    EDIT: I have found this post elsewhere that says we can do it (I'm using it as a heartbeat LED to diagnose any timing issues).

    https://forum.microchip.com/s/topic/...NnAEAW/t321516
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    Aug 2011
    Posts
    419


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    Yes you can reuse them but you need to be careful as to what circuitry you hang off the pins.

    Most ICSP programmers have 4.7K pull-down resistors on the PGC/PGD pins and assume the pins will idle low.
    You shouldn't put too much additional load on the pins, add pullups or capacitors, or use the pins as inputs if they'll be actively driven high/low by the connected circuitry.

  3. #3
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    949


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    I connect the ICSP port on the PCB to the ICSP pins of the controller directly. The Pins in turn go to the rest of your circuitry via resistors so that you do not need programming jumpers to perform ICSP. The resistors help resolving contention. Hope this helps.

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,397


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    i like to connect some critical or dangerous hardware to one of those pins, like the enable pin for the high power laser or the step input for the Z axis.
    that way you really know when reprograming is happening
    Warning I'm not a teacher

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,662


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    To be clear, I will NOT have the circuit powered when I'm programming. The PCB must be removed from the main board in order to be programmed (I use the same connector for operation and for programming).

    Specifically, now I'd like to connect the output of a 74HC14 on PGC or PGD (running out of pins).
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,662


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    Quote Originally Posted by richard View Post
    i like to connect some critical or dangerous hardware to one of those pins, like the enable pin for the high power laser or the step input for the Z axis.
    that way you really know when reprograming is happening
    Pics or it didn't happen.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,397


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    its very easy to do.
    on a pic curiosity board the pins are just there begging you to use them. you can kinda forget the programmer is on board
    when there is no need to plug and unplug it at all.
    Name:  hpc.jpg
Views: 191
Size:  55.0 KB
    Warning I'm not a teacher

  8. #8
    Join Date
    Aug 2011
    Posts
    419


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    To be clear, I will NOT have the circuit powered when I'm programming. The PCB must be removed from the main board in order to be programmed (I use the same connector for operation and for programming).

    Specifically, now I'd like to connect the output of a 74HC14 on PGC or PGD
    I wouldn't do that. Your safest bet would be to have a jumper you can remove to isolate the output of the HC14 from the PGC/PGD pin while you're programming.

  9. #9
    Join Date
    Sep 2009
    Posts
    741


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    I conect ICSP directly to pins. And from konektor, other part of circuit connect via 2K resistor. If you use pin as inputs, then other hardver driving state of pin. So not to have colision with programmer, put some resistors.
    For MCLR use 10K resistor. As it can reach 13V. I generaly avoid using MCLR.
    But this makes it hard to use debuger....

  10. #10
    Join Date
    Aug 2011
    Posts
    419


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    And from konektor, other part of circuit connect via 2K resistor.
    You have to be careful when using the pin as an input.

    While a series R can help isolate the pin from the ICSP programmer, if the external circuit is driving the pin high then this can change the idle state of the pin that the PIC sees during programming from low to high depending on the R value. The ICSP typically has 4.7K pulldowns on the PGC/PGD pins, so the series R creates a voltage divider which you may need to take into account too.

Similar Threads

  1. MCU with ICSP instead of PGD/PGC
    By Sabahan in forum PBP3
    Replies: 1
    Last Post: - 15th June 2020, 16:58
  2. 16F690 VREF PGC question
    By dsicon in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 2nd February 2014, 16:14
  3. PGC (ICSPCLK) Conflicts with Vref ?
    By dsicon in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th August 2012, 04:57
  4. number of PIC pins & 7-seg display
    By archendekta in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 2nd April 2009, 09:00
  5. PIC - 8 Pins - 6 Output Pins ?
    By DanPBP in forum Off Topic
    Replies: 0
    Last Post: - 22nd October 2007, 00:23

Members who have read this thread : 12

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts