Hi Dan,
One approach could be to read the TMR1L register at certain time intervals and if the value you get is below a certain setpoint you say that the shaft no longer turns.
Get value from counter...
Reset counter to 0...
Compare value to setpoint...
If lower then shaft is stopped or turning too slow...
Do other stuff...(this needs to take aprox. the same amount of time each loop.)
Perhaps pause for a while...
Do it all over again...
Or you could set up TMR0 as an interrupt source and get the value of the TMR1 counter in the interrupt service routine.
/Henrik Olsson.
Bookmarks