Download IntOSC v1.6


This module sets up the internal oscillator to the frequency specified in your main program 'clock = ' statement. It's an updated version of the file InternalOscillator.bas originally from Digital DIY written by AndyO and Graham.

To use it, all you have to do is add the file to your main program and it'll automatically set things up for you. It supports all intosc frequencies and PLL modes for the specified device, and can be configured via '#option _INTOSC_IOFS_WAIT' to wait for the intosc to stablize if desired.

It supports a number of standard 18F and K series devices, but not all of them (no J series parts). If your device isn't in the current list you'll get a compile error "unsupported device"

You should include the file first before any other includes so that it gets executed prior to others. See David's wiki page InternalOSC for more details on how this should work.

device = 18F26K22
clock = 64

// optional - wait for intosc freq stable bit (the module defaults to not waiting)
'#option _INTOSC_IOFS_WAIT = true
include "intOSC.bas"

// that's it