PDA

View Full Version : POR feature and MCLR



xnihilo
- 31st March 2008, 15:19
Hello,

On a pic16f684:

i'm using ra3 as input pin with an external 10k weak pullup. Does it mean the mcu is not reset upon powerup?

It's not very clear in the datasheet.
ra3 as internal wpu so why should one use an external wpu to use POR feature???

sougata
- 1st April 2008, 00:41
4.2.1 WEAK PULL-UPS

Each of the PORTA pins, except RA3, has an individually
configurable internal weak pull-up. Control bits
WPUAx enable or disable each pull-up. Refer to
Register 4-3. Each weak pull-up is automatically turned
off when the port pin is configured as an output. The
pull-ups are disabled on a Power-on Reset by the
RAPU bit (OPTION_REG<7>). A weak pull-up is automatically
enabled for RA3 when configured as MCLR
and disabled when RA3 is an I/O. There is no software
control of the MCLR pull-up.

Still confused ????

xnihilo
- 1st April 2008, 09:38
4.2.1 WEAK PULL-UPS

Each of the PORTA pins, except RA3, has an individually
configurable internal weak pull-up. Control bits
WPUAx enable or disable each pull-up. Refer to
Register 4-3. Each weak pull-up is automatically turned
off when the port pin is configured as an output. The
pull-ups are disabled on a Power-on Reset by the
RAPU bit (OPTION_REG<7>). A weak pull-up is automatically
enabled for RA3 when configured as MCLR
and disabled when RA3 is an I/O. There is no software
control of the MCLR pull-up.

Still confused ????

Well, yes. As I am using ra3 as input, there is no POR available, is that right?

sougata
- 2nd April 2008, 05:56
Hi,

While using as MCLR the weak pull-up is enabled. Thus you do not need an external resistor from VDD to the MCLR pin. Still you could use the MCLR to keep the MCU in reset using external circuitry by pulling it down.

When you use the pin as I/O the POR is completely internal and the chip is automatically reset on powerup. This time the weak pull-up associated with the MCLR is detached. So if using as an input and needs to be pulled up you have to use an external pull-up resistor.

Hope this helps.

xnihilo
- 2nd April 2008, 07:10
Hi,

While using as MCLR the weak pull-up is enabled. Thus you do not need an external resistor from VDD to the MCLR pin. Still you could use the MCLR to keep the MCU in reset using external circuitry by pulling it down.

When you use the pin as I/O the POR is completely internal and the chip is automatically reset on powerup. This time the weak pull-up associated with the MCLR is detached. So if using as an input and needs to be pulled up you have to use an external pull-up resistor.

Hope this helps.

Crystal clear. Thank you very much.