'Ln or log'
can anybody explain how to perform the ln() function on af pic16c84. I could
also use info about how to perform the log() function. I need it to measure
the size of a capacitor.
Thanks in advance
Get Your Private, Free Email at http://www.hotmail.com
Offhand I don't have a LN or LOG routine for you, but I can tell you that
you can convert from LN to LOG and vice versa by the following:
log x = (ln x)/(ln 10) = (ln x)/2.30259
ln x = (log x)/(log e) = (log x)*2.30259
ln x is defined as the integral from 1 to x of (1/y)*dy
You could probably kludge together a routine from that fact and a simple
numerical integration algo, but I'm sure there are many optimizations
At 01:25 PM 1/24/00 CET, you wrote:
| Sean Breheny
| Amateur Radio Callsign: KA3YXM
| Electrical Engineering Student
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
cornell.edu ICQ #: 3329174 shb7
Thomas Thorsen wrote:
>can anybody explain how to perform the ln() function on af pic16c84. I
>also use info about how to perform the log() function. I need it to measure
>the size of a capacitor.
This Microchip AppNote gives all the gory details:
Get an old log table book, check the data range required and copy every
tenth sample or whatever you need to eliminate to squeeze into a table
in the PIC, you may also need to drop some digits.
For data on intermediate positions you can make a guess based on
position between look up table entries.
On Mon, 24 Jan 2000, Thomas Thorsen wrote:
> can anybody explain how to perform the ln() function on af pic16c84. I could
> also use info about how to perform the log() function. I need it to measure
> the size of a capacitor.
However, before you consider using these, you may wish to describe why you
need them to measure 'the size of the capacitor'. I know the answer, but I
also know that there have been many other techniques discussed here on how
to go about measuring capacitance.
More... (looser matching)
- Last day of these posts
- In 2000
, 2001 only
- New search...