I'm sorry... i thought that i read above that you were doing PI at 16Khz... ignore this entire line of questioning. My bad.
edit - i highly recommend putting each of those if( blah % x) into its own timer interrupt. Arrange the priorities correctly and you'll never overrun an interrupt time.
|