Do you have DEFINE OSC X at the beginning of the code?

X is clock speed.

Post some code, might be some thing else.