Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

12F675 resets when MCLR pin is used as a general input pin

Status
Not open for further replies.

prasad70

Member level 3
Joined
Mar 24, 2011
Messages
67
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,690
I used MCLR pin as a general Input to monitor the status of a swich but when a touch is given to that pin by using screw driver, PIC resets. I could eliminate this issue after connecting a 0.1microF cap to ground and input pin. This modification was not required when I used an another pin as an input. Can some one explain the real cause for this reset ?

thks
 

Have you disabled the MCLR feature by the proper Configuration Register Bits setting?

If you are using the Hi-Tech C Compiler the the correct bit mask is "MCLRE_OFF".

BigDog
 

__CONFIG _CP_OFF & _CPD_OFF & _BODEN_ON & _MCLRE_OFF & _WDT_ON & _PWRTE_ON & _INTRC_OSC_NOCLKOUT

yes. Above is the config settings.

thk

---------- Post added at 11:28 ---------- Previous post was at 11:23 ----------

yes. for GP3 10k pullup resistor was used.
 

Try disabling the "Brown Out Detection", the grounding of the PIN with a screwdriver could cause an exceedingly high current flow and in turn cause a momentary drop in the voltage supply.

What version of the Hi-Tech Compiler are you using?

BigDog
 

I used assembly . Actually I didnt make any physical connection to ground by using a screw driver. I just make a touch and every moment PIC reset. How problem dissapeared after connection 0.1 mf is not clear. Circuit is working well after that but i still wonder how problem dissapeared.

thk
 

It is irrelevant whether or not you physically shorted the pin to ground.

Just touching the pin with a screwdriver held by yourself can produce a transient which can cause the PIC to reboot. I'm sure you have heard of ESD. Frankly, it is not wise to touch any semiconductor device with a metal screwdriver while under power.

Do you have a 0.1uF capacitor connected between Vdd and Vss, as close to the PIC as possible? If not, do so and disable the "Brown Out Detection?", whose purpose is to detect such transients and automatically reset the PIC.

How are you handling the Watchdog Timer?

BigDog
 
New Picture.png
TMR0 interupt routine clears WDT during every 2milS. Used circuit is attached here with.
thk
 

By the way, those 0.1uF capacitors that you see in schematics attached from Vdd and MCLR to Vss (GND) are referred as bypass or decoupling capacitors and act as a high frequency bypass for any transients directly to GND. If you examine a typical printed circuit board with a digital circuit, MCU or processor, you will notice these bypass capacitors located very near the ICs and their power pins.

BigDog
 

thks.

cap was placed very close to PIC ground pin.

I'll check the circuit after dissabling brown out detection.
 

Dear Prasad,
Let me clear why is all this happening...first of all keep in mind that MCLR pin is also Vpp/programming voltage/high voltage program entry pin for majority of Mid range PIC MCUs...though you disabled external reset control by disabling MCLR option in Configuration word and are using this pin as general input pin but still as per datasheets/programming specification of PIC MCUs...applying high voltages ( how much high/or whats the threshold for it..i can not recall at the moment..try consulting Datasheet) will force the MCU to enter programming MODE ..these high voltages are generated the moment you touches the pin...in form of ESD ( as explained above by BigDog)...that is why your PIC boots every time you touches pin with a screw driver tip...putting a 0.1 uF cap at MCLR to ground will act as low pass filter and will not allow any high voltage very low duration spikes to get through the MCLR pin...
Hope above explaination helps...and clears your doubts in more simple and staright forward way :)

BR
Saif
 
yes. everything is clear now. :)
thank you all.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top