40mhz is too fast to get a 100hz interrupt without a pre-scaler.
So what you will have to do is add this to the frequency part of Elapsed_INT-18.bas
Code:
If OSC == 40
TimerConst = 0CF2Dh
EndIF
And then add this line somewhere near the start of your program to set a 1:8 prescaler on TMR1.
Code:
T1CON.4=1
T1CON.5=1
*note* untested
*edit* changed values to make it more accurate
Last edited by Kamikaze47; - 11th July 2010 at 08:16.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Bookmarks