Hello,
Does someone know what is the best to provide a waveform up to 500 kHz (DAC or PWM)? If is it possible?
If yes... How ? For example, AnalogWrite is too slow for the DAC...
Thanks for helping
Hello,
Does someone know what is the best to provide a waveform up to 500 kHz (DAC or PWM)? If is it possible?
If yes... How ? For example, AnalogWrite is too slow for the DAC...
Thanks for helping
Hello Frodon,
The best output frequency of DUE DACs is given by the datasheet :
DACC uses its own clock, which is Mck (master clock = 84 Mhz) divided by 2, and needs 25 DACC clock cycles to perform a conversion. Therefore the maximum output frequency is somewhere around 84/2/25 = 1.68 Mhz
See Sam3x datasheet chap. 44.6.1 and 44.6.3
You will find multiple examples of DACC programming on this forum, e.g. :
http://forum.arduino.cc/index.php?topic=205096.0
Hi there @Frodon,
You can generate a 500 kHz PWM signal using ATSAM3X8E PWM outputs. You can do it easily using library pwm_lib available at:
Have a look to the exampes that come with the library, and if in doubt just ask me.
I hope it helps.