Go Down

Topic: Arduino DUE Dac Speed (Read 163 times) previous topic - next topic

Michel123

Hello,

i use the Arduino DAC Function.

But i wonder, i have only a max. speed change of 500 Hz, that mean, if i have a value like 255 (Bit), it takes minimum 2ms until i can change this value.

is it possible to change the speed of the dac ?

My code is:

 analogWrite(DAC0,255);
  delay(1);
  analogWrite(DAC0,0);
  delay(1);

This works fine, but when i use a delay under 1ms, it dont works.


mantoui

The DUE datasheet doesn't really specify a "settle time" for the DAC.   Other ARM processors have a DAC settle time of a few microseconds.  With my not so fast USB scope, I drove DAC0  high and low in a loop with a 5us delay between analogWrite()  (12-bit resolution).  On my scope the rise and fall lines are pretty straight, so I assume the settle time is on the order of a few microseconds for the DUE DAC.  So you might accurately drive the DUE DAC up to 500KHz.
The scope also shows the DAC output is clipped to a range of 560 mv to 2.78v as described in documentation.

Go Up