|
Re: using interrupts in FRC
If I recall correctly the "best practice" was to use the interrupt to set a flag in the timed routine. That way the interrupt took very few clock cycles and the context switching wasn't too bad. Also it minimized the possibility of getting interrupted during an interrupt.
Obviously this wouldn't work if the sensor had to respond to a condition in an amount of time less than the timer cycle. And from experience, debugging any interrupt routine can be a real pain.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
|