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)