AnsweredAssumed Answered

Integer to fract conversion, is it needed?

Question asked by spaceboy on Jun 20, 2011
Latest reply on May 20, 2016 by PrasanthR

Hello!

Here -> http://ez.analog.com/message/6465 we can find a statement "The iChannel0LeftIn is a signed, 32-bit integer (...). There are built-in functions to convert to and from and perform arithmetic operations on fract16 and fract32 data types."

 

I checked the blacfin compiler manual and there are functions that handle the conversion from fract to float. The manual says nothing about int to fract conversion. Looking at other ADI manuals, we can find how fract32 data type looks like. I might not understand the fract data type well, because for me it seems like that integer variables can simply be casted to fract32 data type without any conversion.

 

So, are there functions that TomA was talking about in the topic mentioned in the first line? How can conversion between fract and int be handled? Or maybe it is not needed at all?

 

I would be grateful for any response regarding this case.

Outcomes