Thanks for the response. Properly setting those registers did not seem to help my specific problem.

Additionally, I set the OSCCON to 0 and used HS in the HW programmer (with external 20Mhz resonator) and that did not make a difference - still seeing flakey bahaviour.

I set:

define OSC 8
OSCCON=%01110110

and it was still flakey.

I am starting to suspect that my board is just bad. I wired it on a breadboard and it was reliable without the resonator though i had to jiggle the wires around quite a bit to get it to work.

russ