IntOSC

SwordfishUser.IntOSC History

Hide minor edits - Show changes to output

Changed line 2 from:
[[Attach:IntOSC_v15.zip | Download IntOSC v1.5]] \\
to:
[[Attach:IntOSC_v16.zip | Download IntOSC v1.6]] \\
Added lines 1-28:
%lfloat text-align=center % http://www.sfcompiler.co.uk/wiki/uploads/icons/download-48x48.png
[[Attach:IntOSC_v15.zip | Download IntOSC v1.5]] \\

!!! Overview

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.

=code [=
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
=]