Look at the Dontronics site for the the PIC sourcebook. It's free and includes a bunch of examples. http://www.dontronics.com/see.html There are examples for elementary muliplication and division, look under the sections "Let x1 = y / z" and "Let x1 = y * z". The examples are in asm. Bill >From: "Phu T. Van" >Reply-To: pic microcontroller discussion list >To: PICLIST@MITVMA.MIT.EDU >Subject: Math, part II >Date: Mon, 31 Jan 2000 22:03:19 -0800 > >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. ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com