Hi sudip,
When you start the project you need o include floating point support, although this device seems not to have enough memory to support this.
BR Peg
With only 4k of ROM, I might suggest not using floats and not using the math library. Most likely you're not using the full capabilities of the code you're trying to include anyway. Find out what range of numbers you really need to respresent and how much accuracy you need and then represent it with a struct using chars and ints. For functions like arcsin, you can do linear approximations or use a lookup table. If your application really needs to use a float and asinf then you should find a part with more ROM.
What's the application?
By the way, the code you posted here compiles to 4494 bytes so you're barely over the limit. If your program is not too long, you might get away with using a QY8 instead of a QY4.
Message Edited by rhinoceroshead on 04-29-200612:31 PM
PITCH=
ASIN (AX )
ROLL
Hi Sudip,
just make a 90 entry (16-bit) table of all your raw timer values that equate to 0 to 90 degrees.
Then when you have got your value walk through the table looking for the first one over (or under). If you jump in the middle first thats a maximum of 45 compares to do the conversion.
BR Peg