Go Down

Topic: Simple DAC output (Read 1 time) previous topic - next topic


Hi I'm really new in Arduino.. I'm just trying to get two DAC output from Arduino with one for minimum and another for maximum. can you please help me. to write the code for that.

Thanks in advance



You can increase the resolution from the default of 8 bit (upto 12 bits) using the
Code: [Select]
analogWriteResolution(12) ;

And then provide values from 0.. 4095 to analogWrite().

Code: [Select]

void setup()
  analogWriteResolution (12) ;

void loop()
  for (int i = 0 ; i < 4096 ; i++)
    analogWrite (DAC0, i) ;
    delayMicroseconds (100) ;

(The Due native DAC resolution is 12 bits, the default at start up is only 8 to be
compatible with other Arduinos)
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


Thanks a lot for the help. it worked.

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