I'd like to see the rest of your code but is OSCCON = %01001000 correct? Shouldn't it be OSCCON = %01001110? I'm assuming you're using an internal oscillator, should be stable and it should be used as system clock. I don't know why 4Mhz worked but, if that's all you changed between compiles, then try that.
This is for a 16F88 and is on page 40 of the datasheet.




Bookmarks