Reusing PGC & PGD pins


+ Reply to Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    What would you recommend?

    (it's a MeLabs USB programmer)

    Name:  ICSP isolation resistors.jpg
Views: 555
Size:  55.2 KB


    EDIT: 10K seems to work, but I don't want to shoot myself in the foot down the line. I'd hate to invest a lot of time using pins B6 and B7 as input, only to find out I can't do this later on (I'll be using this exact switch configuration - 10K pulled low followed by 10K/0.01uF).
    Last edited by Demon; - 31st August 2024 at 04:26.
    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
    May 2013
    Location
    australia
    Posts
    2,636


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    are those switches meant to be active high ?

    if so then applying somewhat less than vcc to the pic input pins and all those extra components seems a recipe for non success.
    for my money i would use the weak pu and have switches active low [don't press buttons when programming is not to much of a constraint]
    Last edited by richard; - 31st August 2024 at 08:42.
    Warning I'm not a teacher

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    My practice is what Richard noted. Always have either external pull ups or use the port b with the internal pu enabled and active low switch. No other circuit needed and have the Icsp programmer there just fine.

    Ioannis

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    Quote Originally Posted by richard View Post
    are those switches meant to be active high ?...
    They can be whatever they have to be so that it works perfectly. It's my circuit, and I answer to nobody (except those here that know more than me ).


    Quote Originally Posted by richard View Post
    ...applying somewhat less than vcc to the pic input pins and all those extra components seems a recipe for non success....
    Oddly, it's working as-is.


    Quote Originally Posted by richard View Post
    ...i would use the weak pu and have switches active low....
    I just checked, 16F18877 has WPUx register for all ports except pins E0, E1 and E2, so that's a plus.

    I'm still doing research on all the processes I need, so the switches can easily become active low.


    Quote Originally Posted by richard View Post
    ...don't press buttons when programming is not to much of a constraint...
    Definitely agree, I never touch the circuit while it's being programmed.

    That being said, is 10K a reasonable isolation resistor in this case?
    Last edited by Demon; - 31st August 2024 at 19:06.
    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!

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    Do not risk reliability and toss the resistor.
    Use the internal pull-up with low going switch and you will be just fine.

    Ioannis

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    Quote Originally Posted by Ioannis View Post
    Do not risk reliability and toss the resistor.
    Use the internal pull-up with low going switch and you will be just fine.

    Ioannis
    I'm using the internal pull-ups.

    The signal from the encoders reaches the PIC pins with the 10K series and 0.01uF to ground (as per Bourns design), but not if I add that 2nd 10K isolation resistor towards pins B6 and B7.

    The original Bourns design has the pull-up/down resistors BEFORE the 10K/0.01uF combo.

    (gonna do some experiments)
    Last edited by Demon; - 31st August 2024 at 22:34.
    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,636


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    if your re has the possibility that it can be stationary with either A B contact closed [ground] then it will always be possible to stuff up programming and no isolation other than disconnection will work

    the isolation objective is
    1 don't impose a logic level on the pgm pins that will damage the programmer
    2 don't impose a load on the pgm pins that will corrupt the programming signals
    3 allow your signal to reach the pins without signal corruption
    Last edited by richard; - 31st August 2024 at 23:08.
    Warning I'm not a teacher

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Reusing PGC & PGD pins

    Quote Originally Posted by richard View Post
    if your re has the possibility that it can be stationary with either A B contact closed [ground] then it will always be possible to stuff up programming and no isolation other than disconnection will work...
    Yup. I've reached the same conclusion.

    I have to use a jumper.

    It would have been nice to figure out a "built-in" solution, but that's not happening.
    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!

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