Quote Originally Posted by RussMartin View Post
Hmm. Well, at 4 MHz, that's about 250 microseconds; at 20 MHz, about 50. The oscillator spec gives a nominal startup time of 10 milliseconds. Perhaps I should put an RC circuit on the /MCLR pin.
For one thing, we don't know which PIC you're trying to use...
Other than that, read up on the 'Power Up Timer'. 72ms of crystal-stabilizing-waiting bliss that should lay all of your worries to rest. It's always worked for me...