I usually add this as the very first two includes in the main program:I seem to remember something like this before and having to put a particular module first but obviously I'm not using much code in this.
Code: Select all
include "intosc.bas" #option DIGITALIO_INIT = true include "setdigitalio.bas"
Some devices power up with a slow clock, so you probably want that included first.
Setting '#option DIGITALIO_INIT = true' will automatically add a call to SetAllDigital() at startup
so you don't have to worry about calling it... it'll do that for you. Depending on what other peripherals
you use, that might be important to have happen early on too.
Let us know how that goes... the ADC.bas module hasn't been updated in quite a while, so you'llbetter try the adc next !
probably have to change that setup for sure. I keep meaning to look at that one, but there are so many different
ADC peripherals in the devices (and no way to tell which one's which) that trying to have a module
that works with them all is hopeless. I think at last count there were 15 different setups!