Get hold of the microchip Embedded control handbook - it contains a couple of application notes (like AN526 - PIC16C5X / PIC16Cxxx Math utility routines and AN544 - Math utility routines PIC17Cxx) with code for multiply/divide, numerical integration/differentiation and square root. The application notes can also be found as .pdf files on the microchip website. Cheers Roland ----- Original Message ----- From: Phu T. Van To: Sent: Tuesday, February 01, 2000 8:03 AM Subject: Math, part II > Thanks for all your help. I think part (most/all?) of my dilema lies in > the fact that I'm using the PIC, small-ish in both memory and raw > processing power. But I'm also lacking a very fundamental thing : the > knowledge of how to do elementary math with the PIC's very limited > insruction set, specifically its bit-wise operations. > How do you, for example : > --Multiple/divide ? > --Calculate exponents ? > --Anything taught in Elementary Algebra ? > > Is it futile to hope that previous PIC gurus had written concise, > dummy-oriented tutorials on how to do these operations ? Obviously > someone has had to multiply and divide with a PIC once in their life. It > frustrates me slightly that I can't do these basic things, even though > it appears to me that PIC programs follow the formula : > code,code,code,miracle,code. > > Thanks again. > --Phu T. Van > P.S. : I've dug up some information on the CORDIC algorithm. Is there > any way to implement it (painlessly, if possible) on the 16F84 ? The > page claimed it was successfully used on the Basic Stamp II, which is I > think more powerful than the PIC. >