View Single Post
Old 11-10-2009, 03:39 PM   #23 (permalink)
mluckham
EcoModding Lurker
 
Join Date: Feb 2009
Location: Ontario, Canada
Posts: 35
Thanks: 2
Thanked 14 Times in 7 Posts
Floating Point

I would never use floating point calculations in an interrupt service routine - in this case, it is just incrementing counters or subtracting integers to get pulse widths, anyway.

The CPU percentage is around 50%, so it should be quite safe to throw in floating point calculations for the twice-per-second display updates.

I have an accelerometer project with lots of floating point, it works fine.

I haven't found any floating point benchmarks for the Arduino, it will be interesting to try and quantify the difference between FP and integer math operations.
  Reply With Quote