gnupic: Has anybody used the AN575 floating point library?
Subject:
Re: Has anybody used the AN575 floating point library?
From:
Mark Rages ####@####.####
Date:
19 Nov 2004 23:16:39 +0000
Message-Id: <74ee72ca04111915166f452460@mail.gmail.com>
From the application note:
INTEGER TO FLOAT CONVERSION
The routine FLOxxyy converts the two's complement
xx-bit integer in AARG to the above yy-bit floating point
representation, producing the result in AEXP, AARG.
The routine initializes the exponent to move the radix
point to the right of the MSb and then calls the normal-
ize routine. An example is given by
FLO1624(12106) =
FLO1624(0x2F4A) =
0x8C3D28 =
12106.0
So I try it:
movlw 0x00
movwf AARG
movlw 0x2F
movwf AARG+1
movlw 0x4A
movwf AARG+2
call FLO2424
After this,
AARG=0x000e8e
Regards,
Mark
markrages@gmail
On Fri, 19 Nov 2004 17:33:24 -0500, David Willmore
####@####.#### wrote:
> > I'm having a hard time getting the AN575 libary to work on a 16F688.
> >
> > I am using the files "MATH16.INC" and "FP24.A16"
> >
> > Is anyone here familiar with this library? I've been trying to get the
> > int->float conversion to do something, anything...
>
> I've played with it some. I used the FT32.A16 library, but there
> shouldn't be too much difference. What are you trying and what
> are you seeing?
>
> Cheers,
> David
>