This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DAC7750: Current output makes no sense.

Part Number: DAC7750


Tool/software:

Hi,

We are using your DAC7750 in our designs.

Upon design verification we've concluded that the current output is not doing what we expect.

It is configured as a 0-20mA output, and therefore we also use the 0-20mA CODE calculation method.

constexpr uint8_t RANGE_SELECTION = 0b110; // 0-20 mA
The method used to go from milli amps to the CODE is shown here:

uint16_t code = (uint16_t) ((current_ma / 20.0) *

pow(2, RESOLUTION)); // ((current_ma) << RESOLUTION) / 20;

// For DAC7750 the data is stored in DB15:DB4

// Therefore shift code by 4 to left.

// _value will be written by STATE_SET_OUTPUT

_value = code << 4;


When writing the CODE corresponding to 20mA (0x1000) to the device the current output is 10mA.
When writing the CODE corresponding to 10mA (0x0800) to the device the current output is 15mA.
When writing the CODE corresponding to 0mA (0x0000) to the device the current output is 10mA.
The codes are written to the chip using:

uint8_t data_msb = (_value >> 8) & 0xFF; // MSB

uint8_t data_lsb = _value & 0xFF; // LSB

_make_transaction(DATA_REGISTER, data_msb, data_lsb);

 

where make transaction, fills the spi buffer as:

_spi_tx[0] = reg;

_spi_tx[1] = msb;

_spi_tx[2] = lsb;

The output current is measured with a multimeter and a resistor in series on I_out.
The data is actually transmitted as we have measured that with a logic analyzer and verified with toggling OUTEN. Disabling OUTEN disables the current output (0 mA on the outputs.)
Any idea what we are doing wrong here?
  • Hi all,

    Turned out the clock polarity was wrongly configured resulting in clocking in the very first 0 as a 1.
    So if anyone ever gets strange results when writing CODE consider configuring your clock polarity and clock phase correctly.

    Hope this response helps anybody.

  • Robin,


    Thanks for answering your own question! Getting the wrong clock polarity and phase is a very common problem. I always recommend using an oscilloscope or logic analyzer to look at the SPI signals. It's a helpful diagnostic that can also be shown in a post. You can see any problems in timing, noise, or communication structure much easier than you can in code. 

    Again, thanks for posting back. If you haven any other questions about the DAC7750, feel free to post again!

    Joseph Wu

  • As mentioned we've checked with a logic analyzer and that showed no problem.

    Reading back the registers that had been written resulted in the observation.