M5StickC DAC HAT MCP4725
Description
DAC_HAT is also a type of C-HAT specifically design for M5StickC controller. Same as DAC unit, this is a voltage output DAC converter for stickc. It can generate a voltage of 0~3.3V.
Packed with a DAC converter chip MCP4725, which is low-power, high accuracy, single-channel, 12-bit buffered voltage output Digital-to-Analog Converter (DAC) with a non-volatile memory (EEPROM). Its on-board precision output amplifier allows it to achieve rail-to-rail analog output swing.
The DAC input and configuration data can be programmed to the non-volatile memory (EEPROM) by the user using the I2C interface command. I2C address: 0x60
- M5StickC Compatible
- Output: 0~3.3V
- Software Development Platform: Arduino, UIFlow(Blockly, Python)
- MCP4725
- 12-BitResolution
- External A0 Address Pin
- NormalorPower-DownMode
- Fast Settling Time of 6 μs (typical)
- ExternalVoltageReference(VDD)
- Rail-to-RailOutput
- LowPowerConsumption
- Single-SupplyOperation:2.7V to 5.5V
- I2C Interface: address 0x60
- ExtendedTemperatureRange:-40°Cto+125°C
- 1x DAC HAT
- 1x 2 Pin 3.96 Pitch Terminal
- SetPointorOffsetTrimming
- SensorCalibration
- Closed-LoopServoControl
- LowPowerPortableInstrumentation • PCPeripherals
- DataAcquisitionSystems
Learn
Links
- Datasheet - MCP4725
Code
1. Arduino IDE
To get complete code, please click here.
#include <M5StickC.h> #include <Wire.h> #include "Adafruit_MCP4725.h" #define DAC_ADDR Adafruit_MCP4725 dac; void setup(void) { M5.begin(true,true,false); dac.begin(0x60); dac.setVoltage(2048, false); } void loop(void) { // 12bit value , false mean not write EEPROM dac.setVoltage(1024, false); dac.setVoltage(2048, false); }
Pin Map
M5StickC GPIO0 GPIO26 5V GND HAT ADC SDA SCL 5V GNDVideo
Demo
The M5StickC DAC HAT MCP4725 appears in the following collections: