Hi, jhonea1
Depends upon the precision you need , but Have also a look there ...
http://www.awce.com/pak1.htm
and There :
http://www.micromegacorp.com/pbp.html
Alain
Hi, jhonea1
Depends upon the precision you need , but Have also a look there ...
http://www.awce.com/pak1.htm
and There :
http://www.micromegacorp.com/pbp.html
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Sounds like a fun project and sounds like all is working ... however, as Melanie says in #19 of the link you posted, lookup tables are the fastest answer. I have used lookup tables with linear interpolation (for the added accuracy) as noted in here.
http://www.dattalo.com/technical/theory/sinewave.html
Have Fun,
Paul Borgmeier
Salt Lake City, Utah
USA
I just want to thank each of you for your help. I ultimately went with the Taylor series expansion method implementing Paul's suggestion to distribute the denominator across the terms.
FYI, this project is a senior design project for mechanical engineering, which is being presented next Tuesday. Though I have been working on it all semester, the last thing to complete was to calibrate the ADC value to a height based on the geometry of the mechanism. All along, I had been planning on a lookup table. But when I wrote it out, it required more space on my microcontroller than I had available.
That's when I started looking at Taylor series. By the time I got around to asking for your help, I was pretty well committed to that route. Given more time, I would probably use a different method, maybe even using a math coprocessor (which I admit I didn't even know existed until only a few days ago).
Now I can breathe a big 'ol sigh of relief knowing that it's done. All I have left to do is put it together on perfboard and put it in the enclosure.
Thanks again,
Jason
I'll second and third the Lookuptable stuff. Sometimes time saving AND, of course, codespace is more important than messing with math. An external EEPROM is cheap and a table made in EXCEL or else can be easily done and dump in the EEPROM when saved in the correct format. I'd never thinking to use any of math processor as now. Maybe because what i do don't require it or i can't trust anybody else than me... but that's another story.
Good luck!
Last edited by mister_e; - 14th April 2006 at 18:44.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks