Logarithm in PBP


Results 1 to 25 of 25

Threaded View

  1. #21
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    I use this code to read the forwardpower
    Code:
        ADCIN 0, adval	                ' Read channel 0 to adval
        dummy = adval * 5 * 10          ' Multiply to load internal registers with 32-bit value
        value = Div32 1023              ' Divide 32-bit value by word and store in word    
        forwardpower = (value*value)/50
    and this for reflected power
    Code:
        ADCIN 1, adval1	                ' Read channel 0 to adval
        dummy1 = adval1 * 5 * 10        ' Multiply to load internal registers with 32-bit value
        value1 = Div32 1023             ' Divide 32-bit value by word and store in word    
        reflectedpower = (value1*value1)/50
    and the type for SWR is:

    ..........1 + square root(reflectedpower/forwardpower)
    SWR = --------------------------------------------
    ..........1 - square root(reflectedpower/forwardpower)

    Any help how to show the SWR on LCD;
    Last edited by savnik; - 30th March 2007 at 06:50.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 13:55
  2. Extensions to PBP variables
    By John_Mac in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd October 2009, 06: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, 20:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th December 2005, 00:30
  5. PBP / XP Crash
    By pondindustrial in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th November 2005, 04: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