Datasheet

Usage
To demonstrate the usage of the DAC we'll initialize it and set the output voltage from the board's Python REPL. Run
the following code to import the necessary modules and initialize the I2C connection with the sensor:
Remember if you're using a board that doesn't support hardware I2C (like the ESP8266) you need to use
the bitbangio module instead:
Now you can set the output voltage just like controlling a DAC with CircuitPython's built-in AnalogOut class and the
value property. Simply set this to any 16-bit value (0-65535) and the output of the Vout pin will change to a voltage
proportional to 0-3.3V. For example to set the output to 1.65V or about halfway within its range:
import board
import busio
import adafruit_mcp4725
i2c = busio.I2C(board.SCL, board.SDA)
dac = adafruit_mcp4725.MCP4725(i2c)
import board
import bitbangio
import adafruit_mcp4725
i2c = bitbangio.I2C(board.SCL, board.SDA)
dac = adafruit_mcp4725.MCP4725(i2c)
dac.value = 32767
© Adafruit Industries https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial Page 10 of 14