Thread Tools
Jul 03, 2006, 03:17 PM
I don't want to "Switch Now"
pmackenzie's Avatar
Thread OP
Question

PIC 12F629 problem - need experts help


I have a project using a 12F629. Software is all done, but I am hitting a hardware snag.
Power is provided by the BEC in a CC10, or via a PARKBec when using an Opto controller.
( I tried it both ways)
Everything works fine if I connect it after the motor battery is connected, but the PIC seems to be hanging if I let it power up along with the ESC.
I need all 6 I/O, so MCLR is disabled.
Here is the configuration directive:

__config _CP_OFF &_WDT_OFF &_PWRTE_ON &_INTRC_OSC_NOCLKOUT &_MCLRE_OF

There is a .1uF power supply bypass cap.
I added a 10uF filter cap in parallel but it made no improvement.

Short of adding a power switch, any suggestions?

Thanks,
Pat MacKenzie
Sign up now
to remove ads between posts
Jul 03, 2006, 04:38 PM
Registered User
Pat,

Try enabling the Brown Out Reset function in your config settings.

Cheers,

Adrian
Jul 03, 2006, 04:45 PM
I don't want to "Switch Now"
pmackenzie's Avatar
Thread OP
My question turned you from probable "lurker" to member! Cool.
Welcome to rcgroups.

I will try that.
Thanks,
Pat MacKenzie
Jul 03, 2006, 05:32 PM
I don't want to "Switch Now"
pmackenzie's Avatar
Thread OP
Brownout made no difference.
I added some diagnostics (LED flashes) and it seems to be a code problem.
The micro starts every time, then just gets lost in the middle somewhere.

Pat MacKenzie
Jul 03, 2006, 07:04 PM
Registered User
Have you run the code through the MPLAB simulator to see if it functions corectly?

If you would like another set of eyes to look at the code, send me a copy off-line.

Cheers,

Adrian
Jul 03, 2006, 08:12 PM
That tree again!!!!
thanhTran's Avatar
Try using it with a seperate battery pack first. I had a funny problem a while back and it seemed to disable some IO port when the radio saw some glitches.
Jul 03, 2006, 08:34 PM
I don't want to "Switch Now"
pmackenzie's Avatar
Thread OP
I think (I hope!) I have it working now.
Adding the diagnostics moved a jump table over a page boundary. Not good.
Fixed that and then found a problem with an un-initialized variable in the same routine.
It was lifted from another web site . Seemed to work right off the bat, so I didn't try to figure out the details.

Thanks for the offer Adrian, but I think my coding style is a bit like the 1,000,000 monkeys trying to write Shakespeare.
It works in the end, but is not always pretty.
I usually find by the time it is done it is time to re write it from scratch

I never had much luck with MPsim with a real time I/O based app.
It is good for checking program flow and smaller code chunks, but for the entire application it is just too slow.
Pat Mackenzie
Last edited by pmackenzie; Jul 03, 2006 at 08:42 PM.


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Careful! SANWA RD8000 Problem need some help Avner Radios 0 Apr 02, 2006 05:32 AM
Strange ESC problem - need some help. Crazyrcer Hitec/Multiplex USA 2 Oct 04, 2004 04:27 PM
pyranha problem. need some help kevin Electric Ducted Fan Jet Talk 4 Aug 03, 2004 07:42 AM
EPP Problem...I need some help here arx_n_sparx Foamies (Kits) 19 Apr 29, 2004 12:59 AM
Pic Pro Problem - Need advice on gyro & governor ycc Micro Helis 4 May 27, 2003 06:57 AM