Summary of MCP4725 DAC AVR ATmega library
The article describes a project using the MCP4725, a 12-bit buffered voltage DAC with onboard EEPROM, controlled via an I2C interface. The implementation utilizes an ATmega8 microcontroller running at 8MHz and relies on Peter Fleury's I2C library. The system supports up to eight chips by adjusting hardware pulldown selectors for unique addresses. Output voltage ranges from 2.7V to 5.5V with a maximum current of 25mA per pin, though external opamps can extend these limits.
Parts used in the MCP4725 DAC Project:
- MCP4725 DAC chip
- ATmega8 microcontroller
- Peter Fleury I2C library
- Hardware pulldown selector
- Opamp (optional)
- Power transistors (optional)
The MCP4725 DAC is a pretty common and cheap single channel 12 bit buffered voltage DAC, it also has an onboard EEPROM.
To drive this chip we can use I2C interface.
The ATmega8 used for my implementation has an embedded I2C interface, so we just can use that interface.
The selected I2C library is the one proposed by Peter Fleury, you can find it here: http://homepage.hispeed.ch/peterfleury/avr-software.html
To library provides simple functions to set the output channel of the IC by using raw value or a voltage value.
The voltage output of this chip is limited by his voltage input, that is 2.7v to 5.5v, and the current allowed at the output pin is 25mA.
If you need more current, or more voltage, you can use a combination of opamp and power transistors.
Up to 8 MCP4725 can be driven using this library, the IC address has to be selected using the hardware pulldown selector.
This project has been developed and tested on an ATmega8 running at 8Mhz.
An example program is provided in order to help the library usage.
Code
Read More Detail:MCP4725 DAC AVR ATmega library
- What interface drives the MCP4725 chip?
The chip is driven using the I2C interface. - Can multiple MCP4725 chips be used together?
Yes, up to eight chips can be driven by selecting different addresses using hardware pulldown selectors. - What voltage range does the MCP4725 support?
The voltage output is limited by the input voltage, which ranges from 2.7V to 5.5V. - How much current is allowed at the output pin?
The current allowed at the output pin is 25mA. - How can higher current or voltage requirements be met?
You can use a combination of an opamp and power transistors if more current or voltage is needed. - Which library is recommended for this implementation?
The project uses the I2C library proposed by Peter Fleury. - At what speed was the ATmega8 tested?
The project was developed and tested on an ATmega8 running at 8MHz.



