View Full Version : Help! PIC Help Please power down issue
alibodin
Feb 03, 2006, 06:02 PM
I have just built a simple servo reverser circuit which works fine. The PIC draws power via a servo lead to the RX. The problem comes when I switch off, it seems the voltage to the PIC is just under .5 volt when the power to the RX is turned off. When I turn on the RX and hence the PIC circuit power is fine but the PIC is not running properley and also the master servo does not work, other servos work fine. If after turning off I short the power on the circuit and then power up all is fine. This seems to indoicate to me the PIC is not getting powered down and turned off but maybe going into a funny state with low voltage applied. Power on is not starting it correctly. I hhave no extrrnal reset and the PIC is a 12F629
Any one got any suggestions as how to cure this.
I thought of a momentary push button with a resitor to short the power, or a small resitor permantly across the power rail to discharge the circuit when no power is applied. Not very elegant.
Thanks
Alistair
Gary Warner
Feb 03, 2006, 10:27 PM
"When I turn on the RX and hence the PIC circuit power is fine but the PIC is not running properly”
Ok, there are a few questions to be had here. What's the config burn (fuses) stats? WDT? LVR? Master CLR set? Etc...
The problem might be that the Power-up timer is not on, the Brown-out reset voltage might be too low (2.5 volts works for me) or that the Master Clear Reset has not been turned off.
Tell us what the burn-time config fuses are set at.
My first guess is that the Brown-out reset has not been set in the config fuse burn. Turn it on and select 2.5 volts? I'd be more specific, but you didn't say what PIC number you were using.
Gary
--
Edit: Oops, I see you did say the PIC number "12F629". Yep, that PIC will run down to 2 volts at 4 mhz or less (2.5 volts to be safe).
Mr.RC-CAM
Feb 03, 2006, 10:33 PM
As hinted, you need to enable the Brownout fuse and the Power Timer Fuse (the MCLR fuse must be disabled). Then you will be fine.
alibodin
Feb 04, 2006, 05:05 AM
Many thanks guys it was BODEN, ironic with my surname being BODIN.
;;; old __CONFIG _CP_OFF & _CPD_OFF & _BODEN_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT
__CONFIG _CP_OFF & _CPD_OFF & _BODEN_ON & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT
Turned BODEN on and all is fine, so I guess what it does is see the power is falling, and then holds the chip in RESET as the power dies so PIC is in RESTET as power goes.
thanks again.
Alistair
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.