So now we need to talk out auto PI tuning? I'll look it up and see if i can get the gist of it. I think simply going to a state-space control design may do the trick, but i honestly believe that your puny A8 isn't going to handle state space control.
Paul, i want you to do a test... I do this sort of thing all the time with timing-critical applications (such as motor control!). Pick an un-used IO pin on your chip. Set it to "output" in your chip init. At the start of your control algo, set it to 1 and at the end of your control algo, set it to 0. Then scope the pin to see exactly how long your controller is spending in the control and see exactly how frequently it is running. The duty cycle (on time %) of this control loop is critical in determining how much more you can do in that loop. This should be a quicky test for you.
|