Quad 12-bit DAC MCP4728 libary

Hey,

i have a question:

is this libary compatible with Arduino 1.5.6 an Arduino Due?

I had a quick look at the library and I did not see incompatible code (that is no guarantee BTW ;)

Thanks for the quick reply.

I will test it with the Arduino Due and write my solution here.

I actually get this output:

LDAC pin seem to be connected

Now checking current device ID of mcp4728... Current device ID of MCP4728 = 7

Checking communication to mcp4728...

Sucessfully communicate with mcp47280

My device ID is actually 0 but it keeps saying it's 7. I'm using Arduino Leonardo. Do you see any reason why this should not work?

Best wishes,

Robin

RobinReumers: I actually get this output:

My device ID is actually 0 but it keeps saying it's 7. I'm using Arduino Leonardo. Do you see any reason why this should not work?

Robin, unless you're not writing the I2C address, keep LDAC pin connected to ground. The address 7 instead of 0 means your Arduino is not connected properly with the MCP4728. Double check if you have pull up resistors (3.6k-4k7 for 5V) connected on SCL and SDA lines of I2C. The library works ok with Arduino uno.

Vasile

i am new to embedded systems, can any help to interface mcp3248 with arduino mega 2560 circuit please.

sorry not mcp3248 it is MCP4728

How much of the previous posts do you understand?

thank you friend, my code giving wprogram.h no such file or directory error can any one help me please.

Just wanted to say thanks for the library. I’m using this to control a couple POTS, and some tachometers. Here is a “library.properties” file for the Arduino IDE 1.6.12 version. Please adjust if you want E-Mail…add file to the mcp library folder.

name=MCP4728
version=1.3
author=Neuroelec
maintainer=Neuroelec inbox@neuroelec.com
sentence=MCP4728 12-Bit Quad DAC I2C
paragraph=Library for the Arduino IDE to interface with a Microchip MCP4728 Quad DAC controller via I2C. Includes EEPROM reset.
category=Signal Input/Output
url=https://code.google.com/archive/p/neuroelec/downloads
architectures=*

:Bug Fix:
From()

uint8_t mcp4728::eepromReset()
{
  _values[0] = _values[1] = _values[2] = _values[3] = 0;
  _intVref[0] = _intVref[0] = _intVref[0] = _intVref[0] = 1;
  _gain[0] = _gain[1] = _gain[2] = _gain[3] = 0;
  _powerDown[0] = _powerDown[0] = _powerDown[0] = _powerDown[0] = 0;
  return seqWrite();
}

To()

uint8_t mcp4728::eepromReset()
{
  _values[0] = _values[1] = _values[2] = _values[3] = 0;
  _intVref[0] = _intVref[1] = _intVref[2] = _intVref[3] = 1;
  _gain[0] = _gain[1] = _gain[2] = _gain[3] = 0;
  _powerDown[0] = _powerDown[1] = _powerDown[2] = _powerDown[3] = 0;
  return seqWrite();
}

library.properties.txt (360 Bytes)

gnomathibus: Is it possible to have a 0-10v output with this IC?

Yes it is, using the DEVO-4DAC+ shield: http://www.innoesys.com/?p=77

@neurostar thx for providing your library. I got it working right away, no hassles. Awesome work :)

I get different values for the A and B channels than for the C and D channels. Any idea why this may be? I am just writing the same value to all, so they should be equal.

dalz4isael: I get different values for the A and B channels than for the C and D channels. Any idea why this may be? I am just writing the same value to all, so they should be equal.

You have posted a brand new question in a 3-years-dead Thread.

I suggest you start your own Topic and describe your problem from the start - including posting your program.

...R