cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering timers - AN3109

alanrouse9
Associate II
Posted on October 29, 2010 at 01:55

Triggering timers - AN3109

1 REPLY 1
John F.
Senior
Posted on May 17, 2011 at 14:13

Set up a timer interrupt for (say 1ms). Declare three variables, one for each serial channel. Each time you receive a character, reset the associated variable to (say 50). Each time the timer interrupts, decrement all three variables (down to zero but not below).

If any one of the variables gets to zero, then that channel has a break in transmisssion. Set a flag (keep interrupt handlers as small and fast as possible).

You can choose timer interrupt rate and char received reload values to suit your system.

Does that sound workable?