adafruit_mcp4725 - MCP4725 digital to analog converter¶
CircuitPython module for the MCP4725 digital to analog converter. See examples/mcp4725_simpletest.py for a demo of the usage.
Author(s): Tony DiCola, Carter Nelson
Adafruit MCP4725 Breakout Board - 12-Bit DAC w/I2C Interface (Product ID: 935)
Software and Dependencies:
Adafruit CircuitPython firmware for the ESP8622 and M0-based boards: https://github.com/adafruit/circuitpython/releases
- class adafruit_mcp4725.MCP4725(i2c, *, address=98)¶
MCP4725 12-bit digital to analog converter. This class has a similar interface as the CircuitPython AnalogOut class and can be used in place of that module.
- property normalized_value¶
The DAC value as a floating point number in the range 0.0 to 1.0.
- property raw_value¶
The DAC value as a 12-bit unsigned value. This is the the true resolution of the DAC and will never peform scaling or run into quantization error.
Store the current DAC value in EEPROM.
- property value¶
The DAC value as a 16-bit unsigned value compatible with the
Note that the MCP4725 is still just a 12-bit device so quantization will occur. If you’d like to instead deal with the raw 12-bit value use the
raw_valueproperty, or the
normalized_valueproperty to deal with a 0…1 float value.