Complete working 32 bit floating point math library forPIC18x needed
Djula Djarmati email (remove spam text)
part 0 45 bytes<47BDA52F.email@example.com>
This is a multi-part message in MIME format.
part 1 1187 bytes content-type:text/plain; charset=ISO-8859-1; format=flowed (decoded 7bit)
Matthew Rhys-Roberts wrote:
> I've been trying to port the PIC16x math library to PIC18x with little
> success. Among other things, it's not obvious to me exactly how to
> modify MATH16.INC to suit the PIC18. Perhaps I should just declare all
> the variables in a CBLOCK, but
> I'm avoiding using a C compiler as the rest of my code is in assembly.
> All help appreciated!
I converted the 32-bit version to PIC18. I don't think I used all of the
functions, but the ones I used worked well.
In the file are also my INTEGER->BCD conversion functions.
Int24_Flo32 - 24 bit integer to 32 bit floating point conversion
Flo32_Int24 - 32 bit floating point to 24 bit integer conversion
Int32_Flo32 - 32 bit integer to 32 bit floating point conversion
Flo32_Int32 - 32 bit floating point to 32 bit integer conversion
Flo32_Add - 32 bit floating point add
Flo32_Sub - 32 bit floating point subtract
Flo32_Mul - 32 bit floating point multiply
Flo32_Div - 32 bit floating point divide
Bin24_BCD - 24-BIT BINARY TO EIGHT BCD DIGITS (230 cycles)
WordBCD - 16-BIT BINARY TO FIVE BCD DIGITS (65 cycles)
Hope this helps,
part 2 11915 bytes content-type:application/x-zip-compressed; (decode)
part 3 35 bytes content-type:text/plain; charset="us-ascii"
In reply to: <47BD969F.firstname.lastname@example.org>
See also: www.piclist.com/techref/microchip/math/index.htm?key=math
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the