piclist 2000\11\29\152631a >
Thread: Random code on startup?
face BY : Dan Michaels email (remove spam text)

Drew Vassallo wrote:
>Is it at all possible that occasionally on power-up, the program in a PIC
>(I'm using a 16c71) begins NOT at PCL=0?  In my program, all I have is some
>setup code to initialize the ports, disable interrupts, and set some
>literals.  Immediately after this code, I turn a LED on.  Sometimes when I
>start up after powering the PIC down, I get no outputs at all, and the LED
>doesn't even turn on.  I'm sure power is getting to the PIC, but it seems
>not to start up at the beginning of the program sometimes.
>Anyone have any ideas on this?  It's pretty frustrating to power up only to
>have some odd sequence of code running, then have to continually power down
>and up until it appears to work.

Hello Drew,

There is a possibility that you are not erasing the PIC for
a long enough time between re-programming cycles. A couple of
years ago, I was having flaky code execution with some PIC73/JW
parts, during heavy development efforts [ie, lots of erases &
recodes], and decided erase time was one of several problems.

I have more info on "flaky" PIC operation on my site:


- Dan Michaels
Oricom Technologies

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


See also: www.piclist.com/techref/microchip/math/index.htm?key=random
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Random code on startup?

month overview.

new search...