Breakout Board for MCP4725 I2C DAC

You've always wanted to output analog voltages from a microcontroller, the MCP4725 is the DAC that will let you do it! The MCP4725 is an I2C controlled Digital-to-Analog converter (DAC). A DAC allows a digital device like a microcontroller to output analog values like a sine wave. Digital to analog converters are great for sound generation, musical instruments, and many other creative projects!

  • 12-bit resolution
  • I2C Interface (Standard, Fast, and High-Speed supported)
  • Small package
  • 2.7V to 5.5V supply
  • Internal EEPROM to store settings

Breakout Board for MCP4725 I2C DAC Product Help and Resources

MCP4725 Digital to Analog Converter Hookup Guide

September 11, 2014

This is a quick hookup to help you get started with the MCP4725 DAC breakout board. This device allows you to send analog signal from a digital source, like the I2C interface on the Arduino microcontroller.

Core Skill: Soldering

This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.

1 Soldering

Skill Level: Noob - Some basic soldering is required, but it is limited to a just a few pins, basic through-hole soldering, and couple (if any) polarized components. A basic soldering iron is all you should need.
See all skill levels

Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

3 Programming

Skill Level: Competent - The toolchain for programming is a bit more complex and will examples may not be explicitly provided for you. You will be required to have a fundamental knowledge of programming and be required to provide your own code. You may need to modify existing libraries or code to work with your specific hardware. Sensor and hardware interfaces will be SPI or I2C.
See all skill levels

Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

2 Electrical Prototyping

Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels


Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Hugo / about 12 years ago / 2

    The address pin A0 should also be available as one of the breakout pins.

  • Tristram / about 10 years ago * / 1

    Excuse me, but could someone please tell me the address of this thing?!?? It's not obvious to me in the example code. Am I missing something? My best guess is that it's 0x60, or 1100000 in binary. Is that correct? The data sheet says that A1 and A2 are set to order. I'm assuming they're zero in this case?

    • Member #452813 / about 10 years ago * / 1

      It's 0x60. I checked it using a bus pirate. Depending on the microcontroller you're using, the slave address register can accept: * 7 bits: In this case the r/w bit is written in another register, as it is the case of my mcu. * 8 bits: In this case the r/w bit is bit0 of this register, so you have to shift the address.

  • Member #398751 / about 11 years ago / 1

    hello. I'm trying to run the MCP4725 with PIC18F4553 but I have not had much luck, the settings applied to the MCP4725 from the pic is: ............................................................................ ;Configuración I2C: SSPCON1, SSPCON2, SSPSTAT, SSPSR, SSPADD. ;Configuración:

    clrf TRISB      ;Puerto B (SDA, SCL) como salida.
    clrf SSPSTAT
    movlw b'00101000'   ;Modo Master
    movwf SSPCON1
    clrf SSPCON2
    movlw 0xff
    movwf SSPADD

    ;Envio de bytes (3):
    bsf SSPCON2,0 ;Condición de start iniciada. movlw b'11000000' movwf SSPBUF ;Envío 1mer byte. ACK_1 nop btfsc SSPCON2,6 ;Verificación de ACK recibido. goto ACK_1
    bsf SSPCON2,6 ;Establescon en NACK. movlw b'00001111' movwf SSPBUF ;Envío 2do byte. ACK_2 nop btfsc SSPCON2,6 goto ACK_2 bsf SSPCON2,6 movlw b'00001111' movwf SSPBUF ;Envío 3cer byte. ACK_3 nop btfsc SSPCON2,6 goto ACK_3 bsf SSPCON2,6 bsf SSPCON2,2 ;Condición Stop iniciada. bcf SSPCON1,5 ;Desabilito puerto MSSP.

    I applied this configuration but MCP4725 doesn't works. Please anybody can help in this trouble.

  • Member #380909 / about 11 years ago / 1

    This 12bit dac is brilliant, im building a 9 beam laser harp and this works perfect..

  • baum / about 12 years ago / 1

    This would be that much more awesome if atmegas supported I2C fast mode...

  • Microman / about 12 years ago / 1

    how do you set the settings?

  • The SOT-23-6 schematic pinout in the eagle files is wrong and so is layout pinout, and 2 wrongs make a right. If you're using the eagle model on your board, you will want to fix this or put your part on your board flipped. Its all screwy, just check sparkfun's work prior to using this eagle file set.
    from the datasheet
    vout 1
    vss 2
    vdd 3
    sda 4
    scl 5
    a0 6
    from the eagle files (these are wrong)
    vdd 1
    vss 2
    vout 3
    sda 6
    scl 5
    a0 4

  • Member #225265 / about 12 years ago / 1

    I have ordered this DAC and I am using it in my Project. I want to get cat sound through this DAC. My cat sound is in .wave format. How should I code it so that to be used by the DAC?
    Should the cat data bein Hexadecimal or binary?? and what program do you recommend to convert my .wav file??
    Any help is appreciated :).
    P.S : I went through datasheet but I did not really know what type of format it should be?
    Thanks in advance.

    • baum / about 12 years ago / 1

      Hexadecimal or binary??
      Neither. It should be in .wav format on an SD card.
      what program do you recommend to convert my .wav file
      You will need a lot of coding to get this to work, but it is possible at high enough speeds. Ask around on the forum for some more help!

  • Member #24540 / about 12 years ago / 1

    Although I used an IXM rather than an Arduino, I did use this I2C DAC and breakout board, and the video linked above demonstrates two octaves of sinusoidal pitch generation, on-the-fly two tone mixing, and playback of lo-fi but credible sample sounds ranging from special effects to famous voices to music. That said, I totally agree the I2C bus itself is less than ideally suited to this task..

  • WilliamK / about 13 years ago / 1

    Anyone tested this with an Arduino yet? I pretend to use for a musical instrument, not sure if its applicable, but heck, for the price. ;-)

  • baum / about 13 years ago / 1

    How exactly would I use the I2C interface? Just clock out a byte or two of data?

  • WilliamK / about 13 years ago / 1

    I see this can be used for sound-synthesis, so I wonder, what kind of samplerate we can get with this thing? Also, how good is the audio quality?

    • baum / about 13 years ago / 1

      I bought it to be used for sound, too. But the problem is not the sample rate -- it is the communication. I2C operates around 100kHz, so to send over 12 bits of data plus all the config data can take a while. I tried to put out A440hz and, due to the slow communication, I got something more like a high G. Not at all good. Check out the parallel DAC. It should be much faster.

      • Member #24540 / about 12 years ago * / 1

        I got fairly plausible sound out of this breakout board (demo), using an IXM as master, clocking the I2C bus at around 225KHz. I2C 'fast mode' at 400KHz worked fine too, and limited testing suggested this DAC will accept clocking quite a bit faster than that even without messing around with the official 'high speed mode' extra I2C protocol step.

        • baum / about 12 years ago / 1

          That's true. But the problem was that the I2C bus is too slow to get the actual notes, i.e. if I code for a 440Hz triangle, I will get no where near that. Use the parallel one for higher tone accuracy.

  • KillerBug / about 13 years ago / 1

    It would be beyond amazing if there was a version of this breakout board with 8 of these dacs...two of each dac, and all connecting the my ariuno with just 4 wires including power and ground! I honestly can't think of any use for a single single-channel 12bit least not when I can use serial to control a 8-channel 12bit dac.

  • GB / about 13 years ago / 1

    Does this BOB come with the chip? Usually a breakout board is just a blank board, but the comments here make me think that the part is included on the board.

  • BH / about 14 years ago / 1

    Just a couple comments. The pin numbering on the schematic in the link above is incorrect. (e.g., A0 should be pin 6.)
    I also agree the address pin should be brought out in the Breakout Board. Per the datasheet, the Device Address Selection pin can be tied to VSS or VDD, or can be actively driven by the digital logic levels. The logic state of this pin determines what the A0
    bit of the I2C address bits should be.
    Alternately, SparkFun could offer four different versions of the Breakout Board (by just changing which MCP4725 is soldered to it) or offer just the PCB with the two resistors and the cap pre-soldered and offering the DAC separately.
    Part Number Address Option Code
    MCP4725A0T-E/CH A0 (00) AJNN
    MCP4725A1T-E/CH A1 (01) APNN
    MCP4725A2T-E/CH A2 (10) AQNN
    MCP4725A3T-E/CH A3 (11) ARNN
    OR, it's easy enough to simply swap the 6-pin SOT-23 DAC chip.
    Anyway, thank you again SparkFun for an awesome Breakout Board.

  • studionebula / about 14 years ago / 1

    I agree that the address should be configurable on this board. Just some pads that could be bridged with a dab of solder would be fine. Next rev?

    • MattTheGeek / about 14 years ago / 1

      Maybe some jumpers or break-out the address pins?

  • stephan schulz / about 15 years ago / 1

    This DAC works very nicely and gives me great resolution, i.e. 4095 steps from 0 - 5 volts.
    But I can only use one DAC, since the breakout board's design ties the "External A0 Address Pin" to Vss.
    Personally I would like to use two MCP4725 - one with address 0 (A0 = Vss) and one with address 1 (A0 = Vdd).
    Still a very nice board. Thanks for making it available.
    Stephan Schulz.

Customer Reviews

No reviews yet.