15 June 2019

I2C 12bit DAC MCP4725 Addressing



Hello everyone today a pack of MCP4725 modules arrived.  The MCP4725 is a single channel, 12-bit, voltage output Digital-to-Analog Converter with integrated EEPROM and an I2C Compatible Serial Interface.

I am posting this because the module didn't work, out of the pack, with the Adafruit library: https://github.com/adafruit/Adafruit_MCP4725
The specific module I am using was bought from and cost about 66 pence each:
https://www.aliexpress.com/item/32428403866.html

Problem

The IC was generating a static voltage of 1.625v and not the expected slow-varying sinewave defined in firmware. The code relevant to addressing the chip is:

  // For Adafruit MCP4725A1 the address is 0x62 (default) or 0x63 (ADDR pin tied to VCC)
  // For MCP4725A0 the address is 0x60 or 0x61
  // For MCP4725A2 the address is 0x64 or 0x65
  dac.begin(0x60);  // corrected address from 0x62

The default address is 0x62 and assumes a MCP4725A1 part.  The supplied part is a MCP4725 and the address select pads are unsoldered - see pads circled in blue:


Now ICs can have internal pull-ups and pull-downs, but checking the datasheet: https://www.microchip.com/datasheet/MCP4725
There doesn't appear to be any bias on the A0 pin and so I measuring it with the part powered up and it is 0,02v, so LOW.  

Solution

The default address for the part is 0x60 and if the ADDR and VCC pads are bridged then 0x61.

Happy prototyping!

Supporting Library

https://www.dropbox.com/s/46g9dr2213adhj9/MCP4725-master.zip

No comments:

Post a Comment