Floating point Co-processor question

Does anyone used the micromega um-FPU v3.1 or 64 (Micromega: Products), if yes how fast do you get the results form it to arduino (i want to use I2C)?
I'm thinking to use it because it has fast 12bit ADC and also to make floating point calculations (for gps, motors and others)
but i'm afraid that the time gained in the calculations or analog reads will be lost in the communication time with the 328 chip.

Thank you

If you search in the upper right for micromega you find several threads, might be usefull ...

i'm afraid that the time gained in the calculations or analog reads will be lost in the communication time with the 328 chip.

I haven't looked at the numbers but I'd say that would be the case.

There is an SPI version of that chip, that would be 5-10x faster.


Rob

gvi70000:
Does anyone used the micromega um-FPU v3.1 or 64 (Micromega: Products), if yes how fast do you get the results form it to arduino (i want to use I2C)?
I'm thinking to use it because it has fast 12bit ADC and also to make floating point calculations (for gps, motors and others)
but i'm afraid that the time gained in the calculations or analog reads will be lost in the communication time with the 328 chip.

Thank you

Well the V3.1 datasheet gives performance speeds for all the instructions starting on pdf page 31. What I don't recall seeing is timing performance of the standard arduino software floating point functions and without that it's hard to estimate the improvement possible. Maybe the datasheet gives some comparisons? :

Note the chip also supports SPI communications with an arduino as well as serial and I2C and would be the fastest method I believe. The also have an arduino library to support usage of the chip. If you do get one be sure to let us know how it works out for you.

Lefty

Hi,
thanks for the reply's.
I can't use SPI because i don't have enough pins to use so i will need to use I2C.
I want to use the chip for:

  1. Get and process NMEA string from a GPS;
  2. Process data from accelerometer, gyroscope and magnetometer;
  3. Read two sensors.

At this moment i use FastAnalogRead to improve the speed when reading the sensors(on A1, A2 of arduino), i get the data from GPS
using Rx/Tx and make all the math on arduino (float to long long integer).

From what i've read in the data sheet i can store custom functions in the FPU that will unload loats om math operation from 328.
It can communicate with the GPS and also do the string processing and last but not least it has 2x12bit fast ADC.

I did read the posts from this forum but none answered may questions.

My main concern here is that i will invest extra money on the chip but the speed gain will be lost in the communication time between
arduino and the chip.

gvi70000:
I did read the posts from this forum but none answered may questions.

The Micromega site has a link to a dedicated forum. Maybe you can ask about I2C performance there.

I can't use SPI because i don't have enough pins to use so i will need to use I2C.

Can you not run the things currently connected to the SPI on something else. SPI is a bus you know so you can run more than one thing on it, all you need is another enable line.
The key point you are missing was that without knowing how fast the arduino floating point methods are it is imposable to say if you would get an over all speed improvement. It is that metric you need to find.

Hi,

I've put the same question to their support, but till now i've got no reply.
@Mike For now i do the GPS data processing + 9DOF sensor + the calculations to get the local sidereal time, azimuth and altitude of an celestial object
using Arduino + float to long long integer to make the calculation and it works, but i think is slow (over 600ms).

By connecting the GPS directly to FPU i will save 2 pins on arduino and by the ADC i will save 2 analog pins and use them as digital. In this case i can remap my current configuratin
and use 3 wire SPI to comunicate with the chip.

If that chip can't do better than 600mS for anything it has no point in life :slight_smile:

How about you write a test loop that does 100000 long multiplies (or whatever is appropriate to your app) to get the metric Mike suggested. Then compare that against the documentation for the FPU chip.


Rob

Graynomad:
If that chip can't do better than 600mS for anything it has no point in life :slight_smile:

I don't think that was the original concern. There is no question the chip can do the math faster. The concern was would sending the data round trip over I2C result in a total calculation time less than 600ms.