> My current problem is that a simple math equation doesn't seem to work. I= t is: > int16_t encper =3D (encval/255) * 100; >=20 try: int32 tmp =3D encval; tmp =3D (tmp * 100) / 255; encper =3D tmp; When you make division first, you loose resolution, so any value <255 will be 0. =20 if encval has range 0-655, then you do not need to use int32 temp variable. Hope this helps, Sergey --=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 .