Go Down

Topic: Due : High frequency waveform (up too 500kHz) (Read 201 times) previous topic - next topic



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. :


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.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131