IVP wrote: > Hi all, > > can I have recommendations please for floating point and fixed point > assembly routines for 16F or 18F > > I've found AN660 (floating) and AN617 (fixed), both written in 1997 > by Frank Testa at Microchip but not yet tried them. Partly because > > - MC have a habit of leaving buggy stuff on their site > - there might be something better > - I've never used floating or fixed and probably wouldn't know good > from bad anyway > > http://ww1.microchip.com/downloads/en/AppNotes/00617.pdf > > http://ww1.microchip.com/downloads/en/AppNotes/00660.pdf > > Project requires * and / plus trig functions in the range 0.0000 to > 180.0000, which I think fixed point would be sufficient for Fixed and floating point take roughly the same number of execution cycles for the same number of bits but fixed point gives more precision and floating point gives larger dynamic range. Or 24 bit fixed point with similar precision to 32bit floating point will be significantly smaller and faster. Depending on application trig functions can often be simplified to acceptable accuracy with greatly reduced code size and cycle count. It is also worth considering what notation is used to represent angle, degrees, radians or 256 counts to represent 22.5, 45,90,180, or 360 degrees etc Regards, w.. -- Walter Banks Byte Craft Limited http://www.bytecraft.com --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .