Source Code for interfacing Arduino and uM-FPU

In this post, Nick Gammon takes a look at the uM-FPU Floating Point Co-Processor created by Cam Thompson @ Micromega Corp: Micromega: Home Page

I was saddened to hear of Cam's passing last year. I heard from his son, who mentioned that they are currently trying to find a way to keep this product on the market. In the meantime, I'm very interested in learning more about the correspondence with Cam that Pete (el_supremo) mentions on p. 2 of the thread.

In particular, I'd like to see the suggested code for moving 64-bit floating point values in and out of the chip and utilizing the DIV2 SPI divider. I originally sent a private message to Pete, but he asked that I post this, so that others my benefit from seeing this code as well.

Now just cross your fingers that Pete can track down that code/correspondence!!

Cheers ~ Jason

ps. something that very obvious from the data posted by Nick and Pete... in most situations, simply using another 328 instead of this uM-FPU will probably give you similar, if not better, results with regards to floating point math. But who doesn't like playing with toys? They just cost more than they used to!!

pss. unless that toy was the Omnibot that I dreamed of on a nightly basis. and never got :frowning:

Hi Jason,
I've uploaded two files.
libraries.zip contains my versions of the Fpu and FpuSerial libraries. The Fpu library has the DIV2 mod. It also contains functions to do block read and write through the X register and a pair of functions to read and write the X register directly.

fpu.zip is all the code I have written and/or modified - some of which I don't remember at all.

But I've played with these three today and they work:

fft_re_im_am generates 64 samples of an AM modulated signal and uploads the data to the FPU, does a 64-point FFT and then reads and displays the results.

fft_re_im_fm does the same with an FM modulated signal.

GCdistance requires that you first upload a function to the uM-FPU and then run the sketch.

Pete

@Pete: just an FYI...
Both links appear to resolve to the same download file, "libraries.zip"

Ray