Quote Originally Posted by shawn View Post
Robert have you ever written a 32 bit floating point routine to pack a variable with pic basic pro.
Shawn,

No, I have never written a PBP program to convert a decimal number into a floating point. Do you know C language? In C18 you can declare a variable as a 32-bit float. However, it takes a lot of programming memory when you use float variables in C18.

If you insist in writing this program in PBP, I would suggest to use Long vars in PBP for the 32-bit floating point numbers. It can be done, but it is something that won't be done in a single afternoon. I found some examples in the web to convert decimals to 32-bit floating point. The following link has some examples. Disregard the 8-bit floating examples, but you can study them as well since the idea is the same.

http://sandbox.mc.edu/~bennet/cs110/flt/dtof.html

Robert