Not quite sure as i didn't see any parts of your code but, if your 8MHZ setting is ok, you also must add DEFINE OSC 8 at the top.. did you?
for the internal setting, see datasheet in the OSCCON. all the setting are there.
in your case for 8MHZ
OSCCON=%01111000
for 4MHZ
OSCCON=%01101000
and so on for the other type of setting
Bookmarks