PDA

View Full Version : 16f685 Reset



Ruben Pena
- 28th August 2007, 18:28
Dear friends:
I have an application with the 16f685 and 16f690 and I use this configuration:
@ DEVICE pic16f685 , bod_oN 'BOD Reset at 2.0 Volts.
@ DEVICE pic16f685 , INTRC_OSC_NOCLKOUT
@ DEVICE pic16f685 , pwrt_on
@ DEVICE pic16F685 , PROTECT_ON
@ DEVICE PIC16F685 , MCLR_OFF 'internal reset
I use the Mclr pin as input with a button and pullup, but tho micro resets when I push the
button to ground. I am working with 3.3v .
All works OK, except the input button.Any ideas...?
Thanks in advance.
Ruben de la Pena

Bruce
- 28th August 2007, 23:38
I use the 690 in quite a few applications with /MCLR as an input, and have never had a
problem. Post your compiled .hex file if you can.

Ruben Pena
- 29th August 2007, 18:14
Thanks Bruce, but I found it.
I disabled the WDT too, and now all is working fine. With your response, I think... What
Bruce expect to find in the hex file..?.... Maybe unwanted WDT timeouts. So I added
the define for the WDT_OFF and all is OK now.
Thanks again...

!!!!!!!!!! Bad news !!!!!!.... I test several times while making the reply and the button is erratic.
The button funcion is to stop the current operation and return to the options menu.Now when I
operate the button, the operation stops and after a long timeout, returns to the same option or
some times stays and do not return to the menu. I need to reset the system to reach the menu
again... Back to the drawing desk...
Greetings !
Ruben de la Pena V

Bruce
- 29th August 2007, 19:06
Hi Ruben,

Disable code protection. Recompile. Program the PIC. After you program the PIC, read back
the .hex file. If MCLR still off?

I was just curious if the reset function for /MCLR was really being disabled. Reading back the
.hex file from the PIC would tell you this.

I haven't used the 685, but I do use the 690, and I use MCLR as an extra input with reset on
MCLR disabled. I've never had a problem with it.

When you press the switch connected to the MCLR pin, does it drop circuit voltage below
brownout? Brownout will reset from 2.025 to 2.175 volts when BOD is enabled.