Well the prescaler was already 1:16 at the first post.. hence why you didn't had any better results 
Now what you need to do is to use the POSTscaller. if you set the postscaller to 1:2 you'll have a 2mSec*Prescaller int. 8mSec, postscaller 1:4 and so on
Code:
T2CON = %00011010
'X------- Unimplemented
'-0011--- postscale 1:4
'-----0-- Timer2 off
'------10 prescaler 1:16
seems to work with the second suggestion
Code:
// Snip
ON INTERRUPT GOTO ISR
PR2 = 124 ' load period register for 2mSec
PEIE = 1 ' Enable peripheral interupt
GIE = 1 ' enable Global interrupt
TMR2ON = 1 ' TMR2 ON
GOTO LOOP
disable
ISR:
TOGGLE PORTB.0
TMR2IF = 0 ' Clear interrupt flag
resume
enable
// end snip
Last edited by mister_e; - 30th December 2007 at 21:26.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks