View Single Post
  #5   Spotlight this post!  
Unread 11-03-2004, 21:50
Guest
 
Posts: n/a
Re: PID control loops - feedback is our friend!!!

This might be the problem (it had been screwing up a lot of my code 'till I realized it).

Try casting all your constants to (signed int).

Also, try casting your return value to (unsigned char) both in the return statement and in calling code.