> I need to do sin() and cos() functions in a PIC chip, but much faster > than the 3 ms time required by the CCS C compiler. Any advice on how > this is done with less precision and much more speed? I need > three-byte integers. For small angles sine(X) = X (in radians) to a good approximation. Accuracy depends on how large you let X get. You can probably play with symmetries above and below 45 degrees. Accuracy (if my Excelling is correct) Bits Accuracy X degrees 11 3 degrees 10 4 degrees 9 6 degrees 8 9 degrees 7 12 6 17 5 24 4 34 3 48 2 64 :-) You may be able to use identities to allow dealing in only small angles, but the processing cost may offset any gains. eg sin(2x) = 2.sinx.cosx You can repeat this to again reduce the angle but the multiplications get costly. Russell McMahon -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.