On May 31, 2011, at 7:53 AM, Harold Hallikainen wrote: >>> The formula is M =3D (f0 * 2^32)/fc >>> > if writing in C, the whole thing could be done in floating point, then > convert back to int32. Beware, though, since floating point will typically (on an 8bit =20 microcontroller) reduce your precision to about 24 bits, which is not =20 a good thing if you want a 32bit integer as your final result. BillW --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .