Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

floating point computation

Status
Not open for further replies.

alex051

Newbie level 5
Joined
Apr 20, 2010
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,389
Hi,

I want to do floating point operations like multiplication, division and square root to calculate PWM duty ratio in dsPIC. I want to do these operations at high frequency.

But I am encountering problems because my dsPIC is not able to do all the floating point computations at high frequency rate. I know that fixed point operations are much faster.

So is there any method to convert floating point operations to fixed point operation?

Thanks
 

Hi. Maybe you could try scaling the values?

e.g. 1.234 * 4000 can be replaced by 1234 * 4000000 and scale down the final result

I am not sure if this is what you wanted.
 

You have to do it by hand, using shifting operations for multiplication and division.
I had a similar situation for color conversion functions. I replaced floating point operations to fixed point operations. Target multiplication and division operations first.
--
Amr
 

Thanks..

i know shifting operation is faster to make division and multiplication.

But shifiting divides and multiplies only by factor of 2,4,8,16,32..etc

So what if I want to diviide by any other random number..like 10 or 100
 

you have to convert it to nearest multiplication and division :)
--
Amr
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top