Shop OBEX P1 Docs P2 Docs Learn Events
Connect MCLR to +5v — Parallax Forums

Connect MCLR to +5v

william chanwilliam chan Posts: 1,326
edited 2008-05-09 16:38 in General Discussion
Hi,

Is it dangerous to connect the MCLR pin directly to +5v without the usual 10k resistor?
This resistor seems to be unnecessary, but I could be wrong.....

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-04 13:42
    A·pull-up resistor costs all of 2-cents (USD).·

    If somebody decided to "manually" reset the SX by taking the pin Low without there being a pull-up·resistor ("Yeah, Dick, just short /MCLR to ground..." --Pop!--), then he'd short supply to Ground.
  • BeanBean Posts: 8,129
    edited 2008-05-05 10:47
    If I remember correctly, it can cause startup problems if connected directly.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?

    www.iElectronicDesigns.com

    ·
  • pjvpjv Posts: 1,903
    edited 2008-05-08 02:07
    Hi Bean;

    I had never known that Bean; ... any idea where to find info on that??

    Cheers,

    Peter, (pjv)
  • william chanwilliam chan Posts: 1,326
    edited 2008-05-08 02:21
    I had a few projects where MCLR is connected directly to +5v but did not seem to have any startup problems.

    Is it possible that there could be a special condition where the MCLR would drain a lot of current from the +5v connection?

    PJ,

    The resistor may only cost USD 2 cent, but the insertion cost during assembly is higher than 2 cent.
    Sometimes, the board just ran out of space to add the luxury of a 10k resistor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my

    Post Edited (william chan) : 5/8/2008 2:26:52 AM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-08 03:16
    Sorry, but, I'm not·buying either premise.·

    I cannot take seriously·the argument that a·10K resistor is a luxury, takes up too much board space, and·its placement·makes the project "unprofitable."
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-08 04:32
    The datasheet is very clear that MCLR should be connected to Vdd using a 10K pull-up resistor and not connected directly to Vdd. I can only guess that connecting MCLR directly to Vdd can potentially cause damage or instability during startup or brownout. Since this pin is also used for Vpp, it may be missing the protective diode to Vdd and that might be part of it.
  • pjvpjv Posts: 1,903
    edited 2008-05-08 13:35
    Hi All;

    No, I'm not arguing that including the resistor is an issue... I was only interested in whatever info Bean had read on it. In a present ultra low power project I'm trying to raise the value as high as possible without causing problems. At one megohm it seems too big, and at 100 K things appear to be stable..... more testing to be done, especially at low and high temperature extremes.

    Mike, I don't believe the MCLR is used for Vpp; one of the OSC pins does that.... at least in the case of serial programming. I don't know about anyone proramming SXs in parallel, and I can't recall any data on that.

    Here's to MCLR series resistors!

    Cheers,

    Peter (pjv)
  • william chanwilliam chan Posts: 1,326
    edited 2008-05-08 23:51
    PJV,

    I think that raising the MCLR resistor will not make any significant impact on total current consumption of your project.
    This is because the input impedance of the MCLR pin is much higher than 100k and would dominate that pin's current drain.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-05-09 02:40
    One thing to consider is that noise immunity on the /MCLR pin decreases as the pullup resistor value increases. With a 100K pullup resistor, an external noise source would have to induce only a 40uA current to pulse the pin to 1V, which would reset the chip. With a 10K resistor, this increases to 0.4mA. I'd be hesitant to use higher than a 22K resistor here, 10K being preferable.

    Input leakage current on all pins is spec'd at 1uA max, so the pullup value is virtually irrelevant to the overall power consumption.

    -Phil
  • pjvpjv Posts: 1,903
    edited 2008-05-09 03:18
    Phil, your arguments are sound, but the practical experience regarding input leakage is that it is NIL, although not guaranteed to be so for every chip.

    Under the optimum connections, including a high impedance on MCLR, and programming all port bits (including the upper 4 RA on my SX48) as outputs, the sleep current is ZERO microamps. In my case this is an important capability of the SX48. It seems the reason a 1 Meg pullup is too large is that it comes out of reset too slow, and may not start up reliably. More testing to be done here!

    Occasionally I use 33 to 100K, and have not experienced any errant resets.

    Cheers,

    Peter (pjv)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-05-09 03:43
    Peter,

    The noise immunity issue I posited has nothing to do with the leakage current. They are separate issues. Even with zero leakage current, noise immunity is a valid reason for favoring lower-valued pullup resistors. Obviously, in a benign, noiseless environment with zero input leakage, even a 10M resistor would be adequate to hold the SX out of reset. I've yet to experience such an environment in real life, though. Besides, with zero leakage, the pullup value isn't "virtually irrelevant" to to power consumption, as I pointed out above; it's completely irrelevant. As such, I'm hard-pressed to think of a valid reason to use more than 10K, unless some capacitance is added to the /MCLR pin, which will also improve noise immunity. (There isn't a spec for maximum /MCLR rise time, BTW — only for Vdd rise time.)

    -Phil
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2008-05-09 16:38
    IMO, a series resistor between /MCLR and Vdd is meant as a safety measure. The SX datasheets specify 7 Volts as the maximum on all pins. Input pins internally are protected by clamping diodes rated at about 7 Volts. IOW, if you apply a higher voltage between an input and Vss, the diode will begin conducting. Without a series resistor, the current through the diode may become high enough to destroy it. Therefore, it is a good idea to protect the /MCLR input (and others) this way when there are chances for "glitches" on the power supply.

    In case you want to implement an external reset function, you will need this resitor as a pull-up anyway because you may not leave /MCLR floating.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
Sign In or Register to comment.