Master Clear Pin External Reset

Master Clear Pin External Reset (MCLR)

MCLR: - The Master Clear pin is an optional external reset that is activated by pulling the pin low. The MCLR pin can be setup as an standard digital input pin or be enabled as an external reset pin. This is controlled by a configuration setting.

The MCLR pin, when enabled, will hold the device in reset mode as long as the pin is pulled low. During normal operation, it needs to be pulled high typically through a resistor to Vdd. A small capacitor can be connected from the MCLR pin to ground to hold the device in reset mode longer when pulled low by a short signal. A normally open momentary switch can also be added from MCLR to ground to offer a manual way to reset the device.

mclr.png

MCLR Operation

When an external MCLR reset occurs, the program counter will be reset to the top of the program execution or memory location 0x00 which is the start of all program memory. MCLR resets will not re-initialize all internal functions like a Power On Reset (POR) or Brown-Out Reset (BOR) style reset. It can be considered a hardware means to activate a software reset.

Master Clear Enable (MCLR)

The MCLR pin can be enabled or disabled by a bit setting in the configuration register. The MCLR needs to be pulled up to Vdd power to prevent the device from being held in reset mode. This can be done internally by circuitry enabled inside the device or externally by circuitry connected to the device.

If the internal option is selected then the MCLR pin will become a designated digital input pin. The device cannot be reset by an external signal in this mode but it allows for a simpler design. The pin can be left disconnected because internally the MCLR is pulled to a Vdd.

If the external option is selected then the MCLR pin has full control over reset of the device.

This internal or external option is selected by clearing the MCLRE bit (internal) or setting the MCLRE bit (external). The graphic below shows the configuration register that contains the MCLRE bit.

mclre.png

The MCLR also is shared with the Vpp programming pin. So any circuitry attached to the MCLR should follow
programmer/debugger connection requirements.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.