www.piclist.com/techref/microchip/devices.htm?key=pic

Kübek Tony wrote:

{Quote hidden}

Tony, the best way is if you can keep rounding

to a binary mulitple.

Just add half of the rounding total,

then clear the low bits.

Example, to round to the nearest 256;

add 128 to the number,

clear the bottom 8 bits.

-Roman

--

http://www.piclist.com hint: The PICList is archived three different

ways. See http://www.piclist.com/#archives for details.

See also: www.piclist.com/techref/microchip/devices.htm?key=pic