show on LCD decimal numbers


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by savnik View Post
    i have two variables:
    x var word
    y var word
    and x < y.

    How to show on lcd the result of x/y , or the value = SQR x/y
    Right...I understand that. I'm still trying to make you understand.
    Again, I ask you to do a search in the PBP manual for floating point math and tell me what you come up with (same hint: we've already been through this in January, see post #8 of the "16f877 with LM335 problem" thread ).

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Right...I understand that. I'm still trying to make you understand.
    Again, I ask you to do a search in the PBP manual for floating point math and tell me what you come up with (same hint: we've already been through this in January, see post #8 of the "16f877 with LM335 problem" thread ).
    I have read the manual for floating point very well and i have see post #8 of the "16f877 with LM335 problem" thread.
    i use this:

    Code:
                                            ' forwardpower  = 400 
                                            ' reflectedpower = 20
        B0 = forwardpower/reflectedpower    ' = 400/20 = 20    
        B1 = 10000/B0                       ' = 10000*1/20 = 500                    
        B2 = SQR B1                         ' = 22,360679    
        B3 = (10000+B2*100)/(100-B2)        ' = (10000+22*100)/(100-22) = 12200/78 = 156,4
        Lcdout $fe,$90, "SWR  : ",DEC (B3 DIG 2),".", DEC (B3 DIG 1),DEC (B3 DIG 0)

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by savnik View Post
    I have read the manual for floating point very well and i have see post #8 of the "16f877 with LM335 problem" thread.
    So what's the problem? What did you find about floating point in the manual?

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    So what's the problem? What did you find about floating point in the manual?
    now i don't have problem.
    I spent many hours , how to solve my problem.
    with floating point i solve my problem

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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