I'm doing the PI thing at 1kHz right now, but inside the interrupt that's being called at 16 kHz. I do a quick test of:
if (ISRCounter % 16 == 0)
do PI stuff...
if (ISRCounter % 32000 == 0)
do temperature stuff.
So, most of the time, I'm only doing some quick things related to current.
|