How i can converter float variable to q15 format

General discussion on mikroPascal PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
alcidesramos
Posts: 272
Joined: 17 Feb 2009 02:39
Location: Colombia
Contact:

How i can converter float variable to q15 format

#1 Post by alcidesramos » 06 Mar 2011 22:27

Hello i have some variable in my code, the tyoe float

a want to put in vector for multypler with other, but the vector librarie only aceep q15 format.


How i can converter my float variable to q15 format.


i know i can covert q15 to float divide $8000 buta need conver reverse the float to q15

Thank you.

User avatar
slavisa.zlatanovic
mikroElektronika team
Posts: 1321
Joined: 07 Apr 2009 09:39

Re: How i can converter float variable to q15 format

#2 Post by slavisa.zlatanovic » 08 Mar 2011 10:24

Hi!

The same issue has been discussed here:
http://www.mikroe.com/forum/viewtopic.php?t=21785
Best regards
Slavisa

alcidesramos
Posts: 272
Joined: 17 Feb 2009 02:39
Location: Colombia
Contact:

Re: How i can converter float variable to q15 format

#3 Post by alcidesramos » 08 Mar 2011 13:45

ok but my float variable is most great that 1 then i neeed to normallize to -1 and 1 but loss precision

It is not true?

Post Reply

Return to “mikroPascal PRO for dsPIC30/33 and PIC24 General”