Hello,
I'm using Arduino DUE. Can you tell me what is the maximum sampling frecuency that DUE able to represent?
When I generate a signal with frequency greater than 250Hz, the output is bad...
Help me please
Thank you!
Hello,
I'm using Arduino DUE. Can you tell me what is the maximum sampling frecuency that DUE able to represent?
When I generate a signal with frequency greater than 250Hz, the output is bad...
Help me please
Thank you!
Post your code, let's see what you're doing.
250Hz should be easy, can do that on a 328P even with its much slower system clock using direct port manipulation.
Here's an example with 8 tones from a 1284P, similar to a 328P but with 32 IO instead of just 20.
http://www.youtube.com/watch?v=4c8idXN4Pg0
(coded for 13, but I ran out of buttons for the demo, so only 8 notes are shown. browse for my post "piano tones micros" to see the code & simple schematic)
My code is:
void setup()
{
Serial.begin(115200);
analogWriteResolution(8);
pinMode(DAC0,OUTPUT);
}
void loop()
{
if(Serial.available())
{
byte salida=Serial.read();
analogWrite(DAC0, salida);
}
}
Thankyou
That code is only writing a value incoming from the serial port directly to the DAC.
So i ask how are you controlling the frequency ?
how are the values being sent through the serial?