Hi Augusto, I have previously made digital RF meters using Motorola 6805 mcu years ago. SWR is easily calculated as: SWR = (FWD+REF)/(FWD-REF) FWD and REF are direct ADC voltage readings on the swr bridge. The readings are already proportional to the SQRT of the POWER. So you don't need to use a square root function. regards, Reggie ----- Original Message ----- From: "CVT-SSS" To: Sent: Monday, August 25, 2003 5:15 AM Subject: Re: [PIC:] Square root 16bit number > The original message was: > > Hi to all, > > I4m just making an RF sensor with a PIC16F877A, reading Forward RF ( FWD ) > in AN0 and Reverse RF ( REV) in AN1 ports. > I have a max value of 1024 * ( 4.5 Volts / 5 Vots Ref. ) in each port, > giving me a max value of 921 in each case. > I need to get the value of the following formula: > > SWR = 100 * (( 1 + C ) / ( 1 - C )) > > where > > C = SQRT( REV / FWD ) > > Question is how to calculate the square root of ( REV / FWD ) ? > > I was trying to develop a sum of series to get the SQRT but it is not enough > accurate and interpolation method is too slow. > > Some ideas ? > > Regards, > > Augusto > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads