There's no need to make life difficult when there's no need...
SampleToggle var Bit
Loop:
Gosub GetSampleA
Gosub GetSampleB
Gosub GetSampleC
Gosub GetSampleD
Gosub GetSampleE
If SampleToggle=0 then
Gosub GetSampleF
SampleToggle=1
else
SampleToggle=0
endif
Pause 10
Goto Loop
Here, samples A thru E get sampled every 10mS, but sample F only gets invoked at every other pass through the loop - ie every 20mS.
Yes, you can switch the prescaler away from the WDT and onto TMR0. Go look at bits zero thru 3 of the OPTION_REG Register.
Melanie
Bookmarks