Hi MW,
have a look at PID with Processor Expert.
This is right now for a DC motor (PWM and DIR signals) and using a quadrature encoder.
It probably does not match what you have to control, but maybe gives you an idea.
The PID is using integers (floating point would have been an overkill for my S08).
In any case you could either take the generated source code, or change the component(s).
The above article has links to the download page(s) as well.
Hope this helps,
BK