Show Posts
Pages: [1]
1  Products / Arduino Due / Re: Real Time Audio Output, what am I doing wrong? on: January 06, 2013, 10:01:50 am
Have you used some form of interpolation between samples? On higher frequencies, it could be distorted due to truncation errors. Linear interpolation will be still OK as it's the quickest way to get rid of the noise.

Just curious, what are you trying to use the Due for? A toy piano? It sounded like you are attempting to build a synthesizer on it.
2  Products / Arduino Due / Re: Real Time Audio Output, what am I doing wrong? on: January 03, 2013, 08:20:31 pm
I would choose the Due first due to the simplicity of the compiler. The STM32 ones are a bit more difficult to use, but the features in the STM32 are quite nice too, which one of these include a floating point unit.

Thanks to DuaneB also for sharing some of the DDS tips on the Arduino Due.
3  Products / Arduino Due / Re: Real Time Audio Output, what am I doing wrong? on: January 02, 2013, 11:47:23 pm
If I'm not mistaken, since BeagleBone runs off from a Linux, creating a software oscillator will sap a lot of cycles away from the OS, rendering the system very jerky and such. Sound and signal generations are typically done off-chip, or seperately. Look at the old video game consoles and arcades - they have a seperate sound module because back then, processors are 1MHz~10MHz only. Even modern systems have sound chips.

The Due works well in situations like like signal processing since it doesn't have an OS. So you can do whatever you want on it without the OS.

I have created music boxes and phase-mod synthesis algorithms for PIC32 and dsPIC, and works pretty well with table lookups. However, all of these are without the DAC and I have to use the PWM, which would have more noise compared to the DAC.
4  Products / Arduino Due / Re: Real Time Audio Output, what am I doing wrong? on: January 02, 2013, 09:38:01 pm
Hello,

As far as I know, the sin() function inside these libraries are probably using Taylor Series (a kind of matematical expansion) which involves a lot of calculations per sample. Plus, the absence of floating point unit in the Cortex M3 will make such calculations even slower.

I would suggest that you use a table-lookup for these function and interpolate them between samples. Use an Excel to create a table of a cycle of sine wave and then round them and copy these values into an array, like SineTable[256]. (example 256 samples)

If you need to create a sine wave which you can control its frequency, you have to implement a DDS algorithm (Digital Direct Synthesis). Look in the Analog Electronics Example about the DDS algorithm in the net.

hope that helps.
5  Products / Arduino Due / Arduino Due - Accessing registers and inline assembly on: January 02, 2013, 08:47:10 pm
Hello there,

As I've experimented with a lot of Microchip's PIC32 and some TI Stellaris, I've grown familiar with dealing with the registers instead of depending on the libraries. (Except the Microchip's MDDFS ones which are quite complicated)

Is it possible to access the registers such as I/O, DMA and such in the Arduino IDE, like other compilers I usually work with?

Plus, is it also possible to use inline assembly in the Arduino Due? There are the Cortex-M3 instructions such as saturate which I cannot describe them without spending a few lines in high level language.

Thanks. 
6  Using Arduino / Installation & Troubleshooting / Re: AVR Dragon on: May 16, 2011, 10:26:39 pm
Quote
Any modifications should be done on the Arduino sketch program?

Nothing would change or be required inside any specifc sketch. The arduino IDE files would need to be modified/configured to utilize the Dragon programmer. AVRDUDE, the program that the IDE uses to do uploading already knows how to talk to a Dragon as shown in the AVRDUDE.conf file:

Quote
# AVR Dragon in ISP mode
programmer
  id    = "dragon_isp";
  desc  = "Atmel AVR Dragon in ISP mode";
  baudrate = 115200;
  type  = dragon_isp;
;

So it's a matter of defining your specific new board type in the IDE core boards.txt file and tell it that the new board uses the dragon to perform the upload. Can't give you specific step by step instructions as I don't own a dragon and have never tried to modifiy the IDE to use it. I just know it should be pretty straight forward.

Lefty



Thanks for the prompt reply.

Since my Severinos are without the serial port, I could assume that I can still burn the compiled Arduino sketches into the Atmega328P through the ISP headers without the bootloaders? smiley
7  Using Arduino / Installation & Troubleshooting / AVR Dragon on: May 16, 2011, 08:04:51 pm
Hello there,

I recently have an AVR Dragon and I plan to program these Arduinos on with that programmer.

These Arduinos are the "Severino" type that I etched myself, and I didn't attach any serial port on it, just the ICSP post.

I searched around the forum, but not much information about the AVR Dragon interfacing to the Arduinos.

Any modifications should be done on the Arduino sketch program?

Thanks.
Pages: [1]