Re: PIC code self-start execution



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.

On Sep 24, 8:07 am, omat...@xxxxxxxxx wrote:
If it's your own circuit you're putting it in, here's a general
checklist of why circuits appear to do nothing:

MCLR must be high
Check Vdd and Vss
Make sure oscillator is connected, if it's a 3 pin resonator make sure
it's grounded and try it the other way round.
Make sure oscillator is in frequency range and correct type for the
oscillator configuration set on the config bits
Test your program with it requiring no inputs (ie. it will output
some visible effect with no input signal)
Check the config bits - make sure the internat oscillator is enabled
if required, and WDT is disabled, and POR and BOR are enabled.
Do a verify of the program - flash writes often write incorrect data
with poor programmer connections.
Try a new chip - fried chips can do really wierd stuff.

Also, some compilers add a "debugger bootstrap" to your code, which
may be interfereing if it can't connect to the debugger. Try a simple
one line assembly program, and check the hex file with notepad to see
that there's no more than one or two bytes of data.

On Sep 22, 6:56 am, ssylee <sta***...@xxxxxxxxx> wrote:

I have managed to get a sample code of blinking the LEDs compiled and
built into a hex file. I have managed to write the code onto a
PIC18F2620 using a PICKIT2 programmer using pk2 in ubuntu. However, I
can only run the microcontroller when I type in "pk2 -on" to turn on
the power supply from the computer to the mcu. If I try to run the
control code without a pk2 connected to be supplying the computer
power supply to the mcu circuit (i.e. only connecting Vdd and Vss pins
to the DC power supply and output pins), it seems that the code never
executes. I'm suspecting that I'm doing something wrong with the MCLR
pin. I haven't enclosed any software coding b/c I'm currently
suspecting that it's a hardware problem. Does anyone have any ideas?


.