Using ICSP and a diode


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Using ICSP and a diode

    Hi,

    I typically use a 10K resistor and a diode in series to the MCLR when using ICSP. I have read through this thread:

    http://www.picbasic.co.uk/forum/showthread.php?t=516

    What I would like to know is if anyone has sucessfully (without damaging anything) used just a 10K resistor to program using ICSP? If I must use a diode, I will, but I'm trying to use the least amount of components as possible

    Having said that, is it possible to temporarily connect the diode and resistor for programming and then remove them after the programming is completed? In other words, when there is 0 volts on the MCLR pin, will the PIC run with no problems after you finished programming it??

    Thanks,

    Chris

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Well two questions spring to mind... answer those and you have your answer...

    1. How is my PIC handling MCLR? Internally or Externally?

    2. If I have anything connected to the MCLR pin externally, am I likely to blow it up by applying a high programming voltage to it? Usually folks have +5v connected to MCLR, applying 13v or more risks having that high voltage being distributed around your board to components that normally are expecting 5v (and runs the risk that your programmer is now powering-up your whole board). In the words of Clint Eastwood as Dirty Harry... "Do you feel lucky?".

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    Thanks for the reply. I do lack the experience that most people posses here on this forum, however, I think I should be able to answer both of your questions.

    1. How is my PIC handling MCLR? Internally or Externally?

    I believe it's external because in my code I have "MCLR_OFF" and the only thing connected to RA3 (16F688) is the pin from the ICSP plug.

    2. If I have anything connected to the MCLR pin externally, am I likely to blow it up by applying a high programming voltage to it?

    As I answered above, nothing else is connected to MCLR. On the schematic, it goes +5V.....diode.....10K......RA3 (MCLR).

    So, if I'm assuming correctly, which almost never happens :-), the answer is yes that I can use just a 10K resistor to program. If that's true, what happens if the MCLR is left disconnected (no voltage) when the program is running? Will there be no effect in operation?

    Thanks,

    Chris

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    With MCLR-OFF then the PIC is handling MCLR internally and you have I/O capability on that pin. But, if you are not using that pin for any I/O purpose, then there is no need to have anything connected to it. If you have nothing else connected to it then there is no risk of your Programming Voltage affecting any other circuitry. If you do have something connected to that pin, then you need to protect whatever it is from the Programming voltage (purpose of the Diode).

  5. #5
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    Great. Last question, I promise! If I am only using that pin for MCLR, do I even need a resistor? Can I just program with a trace running from the ICSP to RA3 or will that damage the PIC for some reason?
    Last edited by Christopher4187; - 13th January 2009 at 15:49.

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    You need a resistor from MCLR to Vcc to hold it high in normal use - this has nothing to do with the programming function.
    Charles Linquist

  7. #7
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    You need not use any resistor or diode on the MCLR line from the ICSP connector On the other hand, your should make sure that the ICSP connector does not power up your entire circuit as it may end up loading the programmer supply!!

Members who have read this thread : 0

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