The xcluma MCP4725 I2C DAC Breakout module is a compact and efficient digital-to-analog converter (DAC) that provides a precise voltage output, typically used for fine-tuning analog signals in various electronic applications. This module is based on the MCP4725 chip from Microchip Technology and communicates via the I2C interface, making it an excellent choice for projects that require a simple and reliable method to produce an analog output from a digital source.
Pin | Description |
---|---|
VDD | Power supply (2.7V to 5.5V) |
GND | Ground connection |
SDA | I2C Data line |
SCL | I2C Clock line |
VOUT | Analog voltage output |
A0 | Address select bit 0 (optional, for changing I2C address) |
#include <Wire.h>
#include <Adafruit_MCP4725.h>
Adafruit_MCP4725 dac;
void setup() {
Wire.begin(); // Join I2C bus
dac.begin(0x60); // Initialize MCP4725, default address 0x60
}
void loop() {
uint16_t outputVoltage;
// Generate a sawtooth wave
for (outputVoltage = 0; outputVoltage < 4096; outputVoltage++) {
dac.setVoltage(outputVoltage, false);
delay(1);
}
}
Q: Can I change the I2C address of the module? A: Yes, the A0 pin can be used to configure the least significant bit of the I2C address.
Q: What is the maximum resolution of the DAC? A: The MCP4725 provides a 12-bit resolution, allowing for 4096 different voltage levels.
Q: How do I connect multiple MCP4725 modules to the same I2C bus? A: You can connect multiple modules by configuring each with a unique I2C address using the A0 pin.
Q: Is it possible to store the desired voltage output after power-off? A: Yes, the MCP4725 has an EEPROM that can be used to store the voltage output settings across power cycles.