Logarithm in PBP


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Savnik

    Jerson is right ... the simplest Pic way is to build a retrieving table.

    IN PbP that's called LOOKDOWN2 ... ( catches the closest values, sup and inf ... just think to use a clever index !!! )

    Then just have to add a linear approx. between table values ...


    Buuuuuut, My old brain tells me it is very easy to do it with 3or4 couples of linearising resistors and diodes ...

    or to use a logarithmic AOP !!!

    Last and simplest solution: The App Notes of ICL 7106 or 7136 show a logarithmic scale design ...

    Which is closest to your requirements ??? ...

    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 " !!!
    *****************************************

  2. #2
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Savnik

    Jerson is right ... the simplest Pic way is to build a retrieving table.

    IN PbP that's called LOOKDOWN2 ... ( catches the closest values, sup and inf ... just think to use a clever index !!! )

    Then just have to add a linear approx. between table values ...


    Buuuuuut, My old brain tells me it is very easy to do it with 3or4 couples of linearising resistors and diodes ...

    or to use a logarithmic AOP !!!

    Last and simplest solution: The App Notes of ICL 7106 or 7136 show a logarithmic scale design ...

    Which is closest to your requirements ??? ...

    Alain
    I have make a table.
    I want to measure the volts at the input of pic , and show on LCD the power
    Code:
    POWER	VOLT		POWER	VOLT
    1	7,1		26	36,1
    2	10,0		27	36,7
    3	12,2		28	37,4
    4	14,1		29	38,1
    5	15,8		30	38,7
    6	17,3		31	39,4
    7	18,7		32	40,0
    8	20,0		33	40,6
    9	21,2		34	41,6
    10	22,4		35	41,8
    11	23,5		36	42,4
    12	24,5		37	43,0
    13	25,5		38	43,6
    14	26,5		39	44,2
    15	27,4		40	44,7
    16	28,3		41	45,3
    17	29,2		42	45,8
    18	30,0		43	46,4
    19	30,8		44	46,9
    20	31,6		45	47,4
    21	32,4		46	48,0
    22	33,2		47	48,5
    23	33,9		48	49,0
    24	34,6		49	49,5
    25	35,4		50	50,0

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Question

    May I suppose the number in the "Power" column has to be displayed ... or is it just your Index ???

    In this case ... It would be much easier to use if the "Volts" were integers numbers and "Power" decimals ... I know: some more work for you !!!

    Alain

    See Also Here : http://curveexpert.webhop.net/

    That Helps ... isn't it ???

    Quadratic Fit: y=a+bx+cx^2 ( y: Power ; x :Voltage )
    Coefficient Data:
    a = 0.00076569488
    b = -8.0880958e-005
    c = 0.019999816
    Last edited by Acetronics2; - 28th March 2007 at 13:05.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  4. #4
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    May I suppose the number in the "Power" column has to be displayed ... or is it just your Index ???

    In this case ... It would be much easier to use if the "Volts" were integers numbers and "Power" decimals ... I know: some more work for you !!!

    Alain

    See Also Here : http://curveexpert.webhop.net/

    That Helps ... isn't it ???
    I display only the volts

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Question ???????????????????????????????????

    Quote Originally Posted by savnik View Post
    I display only the volts
    read from previous posts :

    << I want to measure the volts at the input of pic , and show on LCD the power >>

    Could you give me a decent explanation ???

    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 " !!!
    *****************************************

  6. #6
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    read from previous posts :

    << I want to measure the volts at the input of pic , and show on LCD the power >>

    Could you give me a decent explanation ???

    Alain
    I have a linear for FM and i want to measure the power.
    From the power meter i take the indication which is in volt.This volt i want to show on LCD. But the power change in logarithm scale and this is my problem.

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Question What do you really want to do ???

    This volt i want to show on LCD.

    > Where's the problem, then, If you only want to display the voltage ???


    But the power change in logarithm scale and this is my problem.

    > This needs some USEFUL enlightments ... if you do not need to display the Power !!!

    > Do you want to display Voltage in dBv ???

    > Do you want to display Voltage in some BARGRAPH mode ??? ...

    those ONLY could give any sense to your question !!!

    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 " !!!
    *****************************************

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. Extensions to PBP variables
    By John_Mac in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd October 2009, 05:21
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30
  5. PBP / XP Crash
    By pondindustrial in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th November 2005, 03:16

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts