On Tue, Mar 24, 2015 at 3:32 PM, Sergey A Dryga wrote: > 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 wil= l > be 0. > if encval has range 0-655, then you do not need to use int32 temp variabl= e. > > Hope this helps, AHA! That did it. Next up I need to try the shifting method of division. Thank you! Josh --=20 A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams --=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 .