2
\$\begingroup\$

I'm just getting started with the dsPIC33EPXXXGP502 processors. When I wired it up on a breadboard, I was told to add a resistor between ~MCLR and VDD, so I did; I assumed that this was because the reset button would otherwise short VDD to ground, and that the PIC didn't care whether MCLR had a resistor or not (in other words, that it functions like any other input pin).

Upon consulting the datasheet, it seems that Microchip actually recommends this resistor be placed there:

Recommended minimum configuration

What is the logic behind the wiring on the MCLR pin? I understand why the capacitors are present (to help stabilize voltage during momentary current draw), but the arrangement of the resistors is confusing.

Can the resistors be removed if I don't need to be able to drive MCLR low?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

MCLR is simply the !RESET line on the PIC processors - that is, any time MCLR becomes low, the processor will reset (it is possible to disable this functionality in the processor configuration). Even though it's tempting to avoid the (unlabeled pullup) resistor altogether and just tie MCLR to VDD, it will cause problems if you try to connect to the ICD/PICKit programmer/debugger, since the ICD will no longer be able to pull MCLR low to enter debug mode and program. Having MCLR floating without disabling the reset functionality is of course a bad idea, as your processor will randomly reset depending on RF noise, your hand touching it, etc.

The capacitor is actually there with the series resistor (R1) to form a R-C circuit. This is to delay the start-up of the PIC so that the power supply has some time to become stable before code execution starts. Typically this is not needed if the power is already from a stable supply (such as a battery), but might be required if the power source is something that has significant ramp-up.

\$\endgroup\$
2
  • \$\begingroup\$ Very informative! I'm striving to make the perfboard I wire up for a little project I'm doing as simple as possible; the PIC will be in an IC socket, so I can take it out to reflash it. Do I need the resistor in this case? (In other words, will omitting it damage the chip?) \$\endgroup\$ Nov 16, 2013 at 0:46
  • 1
    \$\begingroup\$ No, you should be fine just tying MCLR to VDD in that case. \$\endgroup\$
    – Zuofu
    Nov 16, 2013 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.