Go Down

Topic: What is analogWrite in Arduino DUE? (Read 1 time) previous topic - next topic

yeremiarie

I want to use DAC, and I decided using Arduino DUE. In Arduino Due I found 2 pin for DAC there are DAC0, and DAC1. My questions are what the syntax to access DAC function? and what the output of these DAC pin? is that PWM output or pure DAC?

ard_newbie


The 2 DACs are analog outputs, however  in the range of 1/6 *3.3V and 5/6*3.3V. For a full swing DAC (0V-3.3V) you will need to add some hardware:

http://ardupiclab.blogspot.fr/2015/07/how-to-modify-analog-output-range-of.html

and for a bipolar DAC:

http://ardupiclab.blogspot.fr/2015/10/

This thread might help you to understand how you can program your 2 DACs. To see the output waveform, select Menu>Tools>Serial Plotter and select 250000 for the baud rate (Don't forget to hook resistors in serie or you will burn your DACs, 2K for each DAC is safe):

https://forum.arduino.cc/index.php?topic=469222.0




Go Up