Okay, I tried this bit of code and it didn't work. so I went through the data sheet again and found what I should look for and it said:

<b>
bsf STATUS, RP0
call 3FFh
movwf OSCCAL
bcf STATUS, RP0
</b>

Which is the same thing, but in a different order so I changed it and tried to compile again and still got the same error.

The compiler tells me "illegal bit number". If I do not include this code it compiles fine.

What what is wrong with this bit of code to cause those errors? Am I including it in the wrong place? I have it at the beginning right now.

Bart