0
\$\begingroup\$

I am trying to use a DAC8571 (datasheet) and I'm trying to set up a communication between this convertor and an Arduino Mega via I2C.

The communication between the Arduino and my computer is done using LabView and LINX VIs (MakerHub).

My I2C communication is already working between a sensor and the Arduino Mega and I just would like to add the DAC. The problem is that the DAC does not react at all when I write on the I2C with the Arduino.

My first worry is that the DAC is not working at all (could I have broken it with the heat while soldering?). I have two of them and I am testing them on a breadboard. When I connect them (pin1 = 5V, pint2 = 5V, pin3 = not connected, pin4 = voltmeter, pin8=gnd, pin7,6 = I2C with 10k pull-ups, A0 = gnd), no one gives 0V at the output as I would expect and they give different outputs (I guess at least one of them is broken). Is there a way to test the DAC without using the I2C communication? I want to avoid the I2C communication because maybe the mistake is there.

Just for additional information I add the VI I used to test the DAC:

Schematic

SITUATION UPDATE: I tried to read the I2C bus at the DAC address (76) and I get a sequence of bytes (0, 30, 16), which is exactly what it should give because it is what I have set... BUT, the DAC output doesn't change :/.

ADDITIONAL INFO: To set the value of the DAC (address 76 = 1001100 plus write bit = 0) I use three Bytes: 16 = 00010000 (Command = Write temporary register and load DAC with data), x (first 8 bit to be loaded starting from MSB) and y (second group of 8 bits). In the picture x = 0 and y = 30. When I read from the DAC, it gives me its status 0, 30 and 16, but the output had not been updated.

I have tried both my DAC and they both react in the same way with respect to the I2C, but one has a fixed output at about 0.5V and the other at 5V.

\$\endgroup\$
9
  • \$\begingroup\$ What're the addresses of the sensor and the dac for i2c? \$\endgroup\$
    – Iancovici
    Dec 2, 2015 at 14:04
  • \$\begingroup\$ 76 for the DAC and 241 for the sensor. But as I said my first worry is not the I2C, but the IC integrity itself. I could order some more and test them, but I'd like to find out what went wrong with these two first. \$\endgroup\$
    – Worldsheep
    Dec 2, 2015 at 14:07
  • \$\begingroup\$ A more electronic schematic (as oppose to labview abstraction) will help us understand if the design is wired correctly. A DAC i.e. requires a voltage reference, and unless we know you're giving it a valid value, we can't tell if it's a software or hardware issue. \$\endgroup\$
    – Iancovici
    Dec 2, 2015 at 14:18
  • \$\begingroup\$ I can provide all the information you need. What do you need in addition to: (pin1 = 5V, pint2 = 5V, pin3 = not connected, pin4 = voltmeter, pin8=gnd, pin7,6 = I2C with 10k pull-ups, A0 = gnd)? \$\endgroup\$
    – Worldsheep
    Dec 2, 2015 at 14:28
  • \$\begingroup\$ Based on the datasheet, it looks like 4 bytes (non-high speed mode), and writing them in binary will help us read it better. Byte1 = Write Addressing, Byte2 = Control Byte, Byte3 = High Byte, Byte4 = Low Byte \$\endgroup\$
    – Iancovici
    Dec 2, 2015 at 15:23

2 Answers 2

2
\$\begingroup\$

Not that I'm aware of, however an alternative solution to debug this is to use an oscilloscope or logic analyzer to check the binary message's Ack bit to see if there's a handshake, bit 9 on SCL signal.

enter image description here

If it doesn't acknowledge, then you either

  • have the wrong address of the DAC
  • setup I2C communication at wrong baudrate
  • missing or have wrong pull-down/up resistors values

If it does acknowledge then you either

  • aren't sending the right messages to make it work
  • don't have a valid voltage for it to reference

Response to Update

You should read the datasheet. It's clear that the DAC responds to the uC, however it's not clear based on what you've given to us whether your set of exchanged messaged with the DAC is appropriate, and it looks like it's a set of bytes that need to be exchanged for a single command.

On top of that, you need to ensure the rest of settings are set to the appropriate application, like power mode, scaling of voltage, etc...

\$\endgroup\$
5
  • \$\begingroup\$ I forgot to say that I don't have much more than a multimeter to debug the system :/. Additionally as I said I am most worried about the integrity of the IC. And I would like to check that independently of the I2C communication. \$\endgroup\$
    – Worldsheep
    Dec 2, 2015 at 14:10
  • \$\begingroup\$ I just tried to read at the I2C address of the DAC after writing the required sequence to change the output and I get a sequence of bytes: 1, 20, 16. I'll check what that means. At least something is there :). \$\endgroup\$
    – Worldsheep
    Dec 2, 2015 at 14:17
  • \$\begingroup\$ I don't understant what you mean by "set of bytes that need to be exchanged for a single command". \$\endgroup\$
    – Worldsheep
    Dec 2, 2015 at 16:33
  • \$\begingroup\$ Just referring to each byte exchange, a r/w byte followed by an acknowledge, as a read/write messages (i.e. set of write messages:{Write, Control, Data high byte, Data low byte}) \$\endgroup\$
    – Iancovici
    Dec 2, 2015 at 16:48
  • \$\begingroup\$ I think it is exactly what I am doing. And I think the DAC "understands" what I am telling him because when I read in his register he gives me the values I wrote in the correct order. Do you understand what Vsense is? \$\endgroup\$
    – Worldsheep
    Dec 2, 2015 at 17:01
0
\$\begingroup\$

I finally bought 3 more DAC8571. Soldering them with extra care (do not heat them too much and grounded myself periodically) solved the problem. I think the ones I was trying previously were dead. In order to have it working I plugged: (pin1 = 5V, pint2 = 5V, pin3 = connected to the output i.e. pin4, pin4 = voltmeter, pin8=gnd, pin7,6 = I2C with 10k pull-ups, A0 = gnd).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.