Searching \ for 'Ln or log' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=log
Search entire site for: 'Ln or log'.

Truncated match.
PICList Thread
'Ln or log'
2000\01\24@073607 by Thomas Thorsen

picon face
<x-flowed>Hello everybody

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
Thomas Thorsen
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

</x-flowed>

2000\01\24@081556 by Sean Breheny

face picon face
Hi Thomas,

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
possible.

Sean

At 01:25 PM 1/24/00 CET, you wrote:
{Quote hidden}

| 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
spam_OUTshb7TakeThisOuTspamcornell.edu ICQ #: 3329174

2000\01\24@083114 by Ken Webster

flavicon
face
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.


This Microchip AppNote gives all the gory details:
www.microchip.com/10/Appnote/Category/Library/00660/index.htm
(AN660)

Cheers,

Ken

2000\01\24@083252 by gdaniel

flavicon
face
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.


{Quote hidden}

2000\01\24@121705 by Scott Dattalo

face
flavicon
face
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.

Theory:
http://www.dattalo.com/technical/theory/logs.html

Practice:
http://www.dattalo.com/technical/software/pic/piclog.html

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.


Scott

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...