Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: DUE Scheduler DelayMicros() on: November 26, 2012, 08:26:22 am
After some searching, I found the delay() function in ..\hardware\arduino\avr\cores\arduino\wiring.c
There can see that it simply uses the yield() function on increments of microseconds.

Below is my version which preforms delayMicros() that is Scheduler.h library compliant.

void delayMicros_Sch(unsigned long us)
   unsigned long start = (unsigned long)micros();
   while (true) {
      if ((unsigned long)micros() - start >= us)

You may want to have it increment/decrement on multiples of microseconds since the function micros() is has an inaccuracy of several microseconds. Also, it may avoid wasted CPU cycles on this task.
2  Using Arduino / Programming Questions / DUE Scheduler DelayMicros() on: November 26, 2012, 06:49:33 am
I cant get the the scheduler.h library to work with delayMicros(), it only seems to work with delay() -milliseconds.

Is there some way to fix this? I need to parallel process both live analog inputs and heavy processing at the same time.
Using delay() and yield() worked like a charm until i realized that I need a delay of exactly 1/2 millisecond.

3  Products / Arduino Due / Re: DUE's more advanced FFT capabilities on: November 11, 2012, 02:25:22 am
yikes! well back to the drawing board...
4  Products / Arduino Due / Re: DUE's more advanced FFT capabilities on: November 11, 2012, 01:58:38 am
Oops, your absolutely right. The DUE  has an ARM M3 and not M4 core. Still, its very strange to me why the Arduino 1.5 IDE comes with ARM M4 c and s files.

Anyways, any thoughts about a FFT library which will take advantage of the ARM M3's float operation capabilities (for example...) would be much appreciated.

I did find one which does compile:
It uses "double" for all of its data types. Does the ARM M3 process doubles as efficiently as floats? Or is it emulated and therefore take a much longer time to process?

Thanks again!
5  Products / Arduino Due / DUE's more advanced FFT capabilities on: November 10, 2012, 07:05:13 pm
I'm looking for the most efficient way to get the Arduino DUE to preform a FFT. Since I'm only interested in preforming FFTs of real signals, a symmetric transformer like the Hartley Transform would be best.

I know there are a few libraries floating around, but all the ones I can find have been made for the UNO (don't compile in the 1.5 IDE). Are there and FFT libraries for the DUE?
In the directories of IDE 1.5, I saw a few c files in ...\arduino\sam\system\CMSIS\CMSIS\DSP_Lib\Source\TransformFunctions\
like arm_cfft_radix4_f32.c for example

These are excellent implementations intended for the Ardunio DUE's ARM4 core, but I cant seem to get them to compile (compiler error: cant find ARMCM4.h   ... and when I add  ARMCM4.h as a library, the compiler complains that it is an invalid library)

Any ideas? What other powerful libraries are there for the DUE that haven't been publicized?

Pages: [1]