Quote Originally Posted by HenrikOlsson View Post
As far as I know OSCCAL the thing is only for calibrating/adjusting/tweaking the actual oscillator frequency so that it's within specification. It should not be needed to get the chip running and I don't think it relates to your problem.

With that said
Code:
peekcode $1FF, tempvar
OSCCAL = tempvar
Or perhaps even
Code:
PEEKCODE $1FF, OSCCAL
Should do it. But again, I'd remove it from the code until you get a blinky running.
Thanks - it's setting OSCCON that's the issue apparently. If I don't bother, it works fine. Anything else, nope. It does NOT like OSCCAL being mentioned. The PEEKCODE $1FF, OSCCAL compiles, but has the same "he's dead, Jim" result.

However, having said that, Acetronics2 used "DEFINE OSCCAL_1K 1", which I can only assume grabs the value for OSCCON from the last code address on a 1K pic and uses it in a snippet of code to drop the value into its rightful register. In this case, it would wrap-around while reading from $3FF (the referenced 1k mark) since there's only 512bytes, but it should still result in the same thing happening.

Thanks guys, for the input - blinky is blinking and I'm away to the races. I would NOT have thought that a poke to the OSCCAL would lock things up, regardless of the value written to it, and the fact that it's not recognized as a register is a head-scratcher.