Quote Originally Posted by mikendee View Post
Am I right in thinking that if I upgrade to PBP 2.50 and use an 18F that I can read a 7 digit number as an integer and then do maths on it.
Eg: If I want to read 3557.1542361. Can I use:
LATDEG VAR WORD
LATMIN VAR LONG
SERIN2 RXPIN, 16468,[DEC4 LATDEG,,".", DEC7 LATMIN]
If it works as easily as this is it possible to have more accarate trig and SQRT functions as well.
The accuracy won't improve any, since PBP only handles straight integer numbers, doesn't do anything with fractions.
However, you can multiply the numbers up a bit, say by 10000, then work on them.
You'll end up with a simulated decimal point at 1/10000...but you'll have to correct for that when displaying/sending that data.
That probably won't help any with SIN/COS and SQRT functions at all unless you start getting creative with your math.