Yes. OSCCON = %01100000 would set it to 4MHz. Bit 0 SCS allows you to switch from the osc set in config to internal. Bits 1, 2 and 3 are read only bits that indicate the oscillator status.Am I correct in thinking that for 4 MHz I would include in my program OSCCON %01100xxx, I'm not sure what bits 0, 1 and 2 would be set to?
Look at the modified version of your example attached here for a few other comments. I haven't tested this, but it should help get you up & running.




Bookmarks