Pages: [1]   Go Down
Author Topic: Floating point Co-processor question  (Read 1174 times)
0 Members and 1 Guest are viewing this topic.
Brebu
Offline Offline
Sr. Member
****
Karma: 1
Posts: 262
New to Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone used the micromega um-FPU v3.1 or 64 (http://micromegacorp.com/products.html), 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
« Last Edit: January 23, 2012, 04:22:43 pm by gvi70000 » Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 220
Posts: 13846
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8589
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone used the micromega um-FPU v3.1 or 64 (http://micromegacorp.com/products.html), 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? :

http://micromegacorp.com/downloads/documentation/uMFPU-V3_1%20Datasheet.pdf

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
Logged

Brebu
Offline Offline
Sr. Member
****
Karma: 1
Posts: 262
New to Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 633
Posts: 34517
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Brebu
Offline Offline
Sr. Member
****
Karma: 1
Posts: 262
New to Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
 
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8589
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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. 
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Pages: [1]   Go Up
Jump to: