Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Module IntOSC8
OSCCON = $72
Lol All you do is open up note pad paste this code in it and save as all files with the name
INTOSC8.bas to your swordfish user library
I bet I posted this more then 1 time LOLCode:Module IntOSC8 OSCCON = $72
The only reason you need it is because your using the beloved 18f1320 and for some reason when you write code it will not let you set the osc up at the start of your
code mostly if your using swordfish modules. And what happens is you'll think your code is not running because it running so slow you can't see any thing happen. this fixes that
You think there would be but even the man who wrote swordfish said that's the only fix he knows for itSeems kinda' silly to have a seperate file with that one line in it. Surely there's a work-around for this problem, isn't there?
The above shows how an 18F1320 is configured for an 8MHz internal clock. However, there is a problem. Many Swordfish modules have initialisation code which is executed before the main program block starts to run. The line
OSCCON = %01110110
will not be set until the module initialisation code has completed. For some modules (such as LCD) the initialisation code is quite substantial - OSCCON needs to be set before any module initialisation code is executed.
To ensure this happens, create a module called 'intosc.bas' and place in your 'UserLibrary' folder. For the 18F1320, the module code would look like this