DAC I2C Unit (MCP4725)
Description
DAC, like its namesake, is a high performance digital/analog signal convertor. Build with MCP4725,which is a low-power, high accuracy, single channel, 12-bit buffered voltage output Digital-to-Analog Convertor (DAC) with non-volatile memory(EEPROM).
Same as ADC, DAC communicates with I2C. The address is 0x60.
Product Features
- Up to 12 bits of resolution
- Output 0~3.3V voltage
- Program Platform: Arduino, UIFlow(Blockly, Python)
- Two Lego-compatible holes
Kit includes
- 1x DAC Unit
- 1x Grove Cable
APPLICATION
- MP3 Audio Player
- mini Oscilloscope
Documents
- Datasheet - MCP4725
Learn
Example
Arduino IDE
The code below is incomplete(just for usage). To get the complete code, please click here.
/* hardware : m5stack uint dac please install adafruit MCP4725 lib */ #include <Wire.h> #include <Adafruit_MCP4725.h> // new a object Adafruit_MCP4725 dac; // initialization dac.begin(0x60); dac.setVoltage(2048, false); // 12bit value , false mean not write EEPROM dac.setVoltage(1024, false);// input digital value "1024" to unit delay(1000); dac.setVoltage(2048, false);// input digital value "2048" to unit delay(1000);
More information
Schematic
PinMap
M5Core(GROVE A)GPIO22GPIO215VGNDDAC UnitSCLSDA5VGND
The DAC I2C Unit (MCP4725) appears in the following collections:
SKU M5-U012
by Little Bird