Re: PIC code self-start execution



On Wed, 26 Sep 2007 23:09:42 -0000, ssylee <stanigator@xxxxxxxxx>
wrote:

I've ensured that MCLR is high through a power on reset connected as
such http://imagebin.ca/view/4YjqO0.html as instructed in the power-on
reset section of the manual. However, the time it takes to return to
5V from 0V after the reset button is turned on in this configuration
is 250 ms, but no matter which combination of the R and C I've tried,
it still won't reset automatically when I first power up using
anything other than a PICKIT 2. I'm not sure what other information
would be useful. I guess I could try changing MCLR reset on in the
code. I'm using a DC adapter that's scrapped off a decommissioned
wireless router. Any insights on this would be much appreciated.


Stanley,

When you're setting up your processor's configuration switches,
fuses, or whatever syntax your compiler requires, try setting the MCLR
pin as an input. Look in your documentation for a configuration
switch that looks something like "MCLRE OFF" (in whatever syntax
convention your compiler uses.) On your breadboard, float the MCLR
pin. Don't even worry about pulling it high.

Also, make sure that you've set your configuration options to
select the internal RC oscillator. In your code, program the internal
oscillator for 8 MHz right as your first step after reset.

My suspicion is that you don't have an MCLR problem. I'm guessing
that your prolem is related to the internal oscillator.

Good luck!

Tom

.


Loading