user19881: I tried using a MCP4725 DAC with an Arduino (M0 Pro, Duemilanove and Diecimila) and it is not outputing any voltage (just random noise).
I've been using the 2 tutorial codes fount here : https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial/using-with-arduino which are supposed to generate a sinus wave and a triangle wave.
I am pretty sure it doesn't come from the Arduino because basic examples have been working so far.
Anybody had the same issue or can help on this ?
#include <Wire.h>
#include <Adafruit_MCP4725.h>

Adafruit_MCP4725 dac;

void setup(void) {
  Serial.begin(9600);
  Serial.println("Hello!");

// For Adafruit MCP4725A1 the address is 0x62 (default) or 0x63 (ADDR pin tied to VCC)
  // For MCP4725A0 the address is 0x60 or 0x61
  // For MCP4725A2 the address is 0x64 or 0x65
  dac.begin(0x62);

  Serial.println("Generating a triangle wave");
}

void loop(void) {
    uint32_t counter;
    // Run through the full 12-bit scale for a triangle wave
    for (counter = 0; counter < 4095; counter++)
    {
      dac.setVoltage(counter, false);
    }
    for (counter = 4095; counter > 0; counter--)
    {
      dac.setVoltage(counter, false);
    }
}


user39519: I finally got this example to work.
Details:
My A0 line was tied to ground using the solder jumper (through a 10k SMD resistor on the board it appears).
I used . . .
define MCP4725_ADDR 0x62
. . . as the base address of the chip.
My CMD to update the DAC was . . .
Wire.write(64);
. . . (64 in decimal i.e. 0b01000000)
This YouTube video helped out a lot:
https://www.youtube.com/watch?v=ngvqgIeaS9M
All the best
KenLaszlo

19881: <p>I tried using a MCP4725 DAC with an Arduino (M0 Pro, Duemilanove and Diecimila) and it is not outputing any voltage (just random noise).</p>

<p>I've been using the 2 tutorial codes fount here : <a href="https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial/using-with-arduino" rel="nofollow">https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial/using-with-arduino</a> which are supposed to generate a sinus wave and a triangle wave.</p>

<p>I am pretty sure it doesn't come from the Arduino because basic examples have been working so far.</p>

<p>Anybody had the same issue or can help on this ?</p>

<pre><code>#include &lt;Wire.h&gt;
#include &lt;Adafruit_MCP4725.h&gt;

Adafruit_MCP4725 dac;

void setup(void) {
  Serial.begin(9600);
  Serial.println("Hello!");

// For Adafruit MCP4725A1 the address is 0x62 (default) or 0x63 (ADDR pin tied to VCC)
  // For MCP4725A0 the address is 0x60 or 0x61
  // For MCP4725A2 the address is 0x64 or 0x65
  dac.begin(0x62);

  Serial.println("Generating a triangle wave");
}

void loop(void) {
    uint32_t counter;
    // Run through the full 12-bit scale for a triangle wave
    for (counter = 0; counter &lt; 4095; counter++)
    {
      dac.setVoltage(counter, false);
    }
    for (counter = 4095; counter &gt; 0; counter--)
    {
      dac.setVoltage(counter, false);
    }
}
</code></pre>
 39519: <p>I finally got this example to work.</p>
<p>Details:</p>
<p>My A0 line was tied to ground using the solder jumper (through a 10k SMD resistor on the board it appears).
I used . . .</p>
<h1>define MCP4725_ADDR 0x62</h1>
<p>. . . as the base address of the chip.
My CMD to update the DAC was . . .</p>
<p>Wire.write(64);</p>
<p>. . . (64 in decimal i.e. 0b01000000)</p>
<p>This YouTube video helped out a lot:
<a href="https://www.youtube.com/watch?v=ngvqgIeaS9M" rel="nofollow noreferrer">https://www.youtube.com/watch?v=ngvqgIeaS9M</a></p>
<p>All the best
KenLaszlo</p>
