> My current problem is that a simple math equation doesn't seem to work. I= t is: > int16_t encper =3D (encval/255) * 100; > What is the range of encval? If it's below 255, the result of the integer division will be 0. As a suggestion, it might be faster to shift encval right by 8 (which is a division by 256) rather than divide by 255. Regards, Scott --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .