Need help on "fixed-point arithmetic"

Status
Not open for further replies.

yzou_ua

Member level 5
Joined
Nov 5, 2008
Messages
92
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,869
I need to achieve following, using PIC24: What should i do??

A 16.16 fixed-point(f-p) # can be divided by a 16.16 f-p # w. the result a 24.8 f-p #.
 

Hi

All you have to do is to multiply the floating value by a 4096 (2^12) do your math and divide the result by 4096

The best way to that is to multiply & divide by 2^15(standard called Q15) but some controller will find it difficult to handle large numbers(8 & 16 bit type)

All the best

Bobi

The microcontroller specialist
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…