Source: https://mokxi.com/parts/mcp4725
Updated: 2026-11-16

Part

# DAC, MCP4725

A 12-bit analog voltage out over I2C at 0x60, VCC x code / 4096, with an EEPROM that keeps it, for Adafruit_MCP4725.h.

See every part

- 6 pins
- 1 setting
- In 1 project

Drawn live by the editor's own code, at the size you see it.

At a glance

## The DAC, MCP4725 in brief

What it is, and every setting the properties panel gives it.

The MCP4725 is a single-channel, 12-bit digital-to-analog converter on a small I2C breakout. An Uno can only fake an in-between voltage with PWM, a fast square wave whose average happens to land where you want it; the MCP4725 instead holds VOUT at a steady level, VCC multiplied by the code and divided by 4096. That makes it the usual way to feed a real voltage to an op-amp, a meter, a VCO or another board’s analog input. On the Mokxi bench the output is a voltage source behind 1 ohm, so a load on it divides the way it would on a breadboard. The chip’s EEPROM is modeled too: a new part wakes at mid-scale, a stored code comes back at the next power-up within the run, and an EEPROM write keeps the chip busy for 25 ms. The model property picks the A0 or A1 variant, which decides whether it answers at 0x60 or 0x62.

Family

Sensors

Pins

6

model

MCP4725A0 (or MCP4725A1, MCP4725A2, MCP4725A3)

Pins

## 6 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

VCC

Supply, 2.7 to 5.5 V. It is also the reference: VOUT is a fraction of it.

GND

Ground.

SDA

I2C, with 10k pull-ups on the board.

SCL

I2C, with 10k pull-ups on the board.

A0

Address bit, pulled down on the board. Wire it to VCC for the second address.

VOUT

The output: VCC x code / 4096.

How to use it

## How to use the MCP4725 DAC with an Arduino

Four wires do it: VCC to 5 V, GND to GND, SDA to A4 and SCL to A5. Leave the board’s A0 pad alone and a generic purple module answers at 0x60. The output, VOUT, is where the voltage appears. In the DAC sine project it goes to the Uno’s A0, so the sketch can read back what it set, and to channel 1 of the oscilloscope.

Call dac.begin(0x60), then dac.setVoltage(code, false) with a code from 0 to 4095. With the board on 5 V, code 2048 is 2.5 V and each step is about 1.2 mV. The project steps through a 32-point sine every 20 ms and plays the same curve on pin 9 with analogWrite(), so the scope shows a smooth staircase on one channel and a PWM square wave on the other.

The second argument of setVoltage() decides whether the code is also written to the EEPROM. Leave it false for anything that changes often; pass true once when you want the chip to wake up at that voltage next time.

Part pin

Board pin

VCC

5 V

GND

GND

SDA

A4

SCL

A5

VOUT

A0, and the scope’s channel 1

A0 (address)

Not wired: address 0x60

VCC is also the reference, so on a 3.3 V board such as an ESP32 or a Pico the same codes span 0 to 3.3 V instead of 0 to 5 V.

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

Setting the output, from the DAC sine sketch

Common errors

## Common DAC, MCP4725 errors and fixes

What goes wrong

The fix

begin() returns false, or an I2C scan finds the chip somewhere you did not ask for.

Adafruit’s library assumes 0x62, the address of Adafruit’s own board. A generic module is 0x60, or 0x61 with its A0 pad tied to VCC. Pass the address to begin().

VOUT sits at about 2.5 V before the sketch has written anything.

That is the factory EEPROM value, mid-scale. Write the code you want in setup(), or store a different power-up value once with setVoltage(code, true).

A write straight after storing to the EEPROM changes nothing.

An EEPROM write keeps the chip busy for 25 ms and it ignores writes until it is done. Store rarely, and wait before the next write.

The output only reaches a fraction of the voltage you expected.

The code is 12 bits, 0 to 4095, not the 0 to 255 of analogWrite(). Scale your value up, or shift it left by four as the sine sketch does the other way.

Questions

## Questions and answers

### Is the MCP4725 output real analog or PWM?

Real analog. VOUT holds a steady voltage, VCC times the code over 4096, with no switching. The DAC sine project draws both on one scope so you can see the difference.

### What is the I2C address of an MCP4725 module?

It depends on the variant. The common MCP4725A0 boards answer at 0x60, or 0x61 with A0 high. Adafruit’s board carries the A1 variant at 0x62 or 0x63. Set the part’s model property to match the board you are copying.

### Does the MCP4725 remember its voltage after power off?

Only if you store it. setVoltage(code, true) writes the code to the EEPROM as well, and the chip loads it at the next power-up. Plain writes with false are lost.

### Can the MCP4725 drive a motor or an LED strip directly?

No. The real output stage is good for a few milliamps, about 25 mA at most, so a heavier load needs a transistor or an op-amp buffer after it. The simulation does not apply that limit, so check your load against it before building.

How it is modeled

## What is true about the DAC, MCP4725, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Modeled

Every write command. The fast write (two bytes, repeatable in one transfer), the
three-byte write of the DAC register, and the same with the EEPROM. The output moves
at the acknowledge, as the datasheet says.

The EEPROM. A new chip starts at mid-scale, 0x800, the factory value. A write to
the EEPROM keeps the chip busy for 25 ms: the RDY/BSY bit reads 0 and any write in
that time is ignored. At power-on, and at a general call reset, the chip loads the
EEPROM into its output, so a value stored before a power cycle comes back after it.
The EEPROM lasts for the run; a new run starts from the factory value.

Reads. Five bytes: status with RDY/BSY and the power-down bits, the DAC register,
and the EEPROM.

Power-down. Modes 1, 2 and 3 turn the output off and leave 1k, 100k or 500k to
ground on VOUT. A write in normal mode, or a general call wake-up, ends it.

A real output. VOUT is a voltage source behind 1 ohm (the datasheet's output
impedance), so a load on it divides as it would on the bench.

### Not modeled

The output amplifier's 25 mA limit and its swing short of the rails under load,
offset and gain error, the 6 us settling time and glitches, high-speed I2C mode,
EEPROM wear, and the slow power-up that can make a real chip miss loading its
EEPROM. An EEPROM write cut short by the supply leaves the old value.

From MCP4725 DAC, in full.

Projects

## See the DAC, MCP4725 in a project

One built-in project uses it. It opens in the editor, already wired.

Boards

## The boards it is shown on

This board has a built-in project with the DAC, MCP4725 in it.

- Arduino Uno R3

Libraries

## Arduino libraries for the DAC, MCP4725

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- Adafruit MCP4725

Keep going

## Keep going

- I2C Explained: Addresses, Acknowledges and Pull-Ups
- Analog vs Digital Pins, and ADC Resolution
- Digital potentiometer, MCP4131
- Eight-channel ADC, MCP3008
- Sixteen-bit ADC, ADS1115

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the DAC, MCP4725

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
