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.

DAC81404EVM: Weird behavior of one DAC channel

Part Number: DAC81404EVM
Other Parts Discussed in Thread: DAC81404, MSP-EXP432E401Y

I was prototyping the DAC81404 evaluation board as it seems to be perfect for my application which requires precise, high-voltage, bipolar DAC. 

I do not have MSP-EXP432E401Y Lauchpad developement board so I was using an Arduino compatible microcontroller development board called Teensy 3.6 based on a ARM Cortex M4F microcontroller (Kinetis K66 from NXP) which can be programmed using the Arduino framework. Getting an SPI ready is anyway simple. 

For writing to the registers I have this simple function 

SPISettings settingsA(4000000, MSBFIRST, SPI_MODE0);

inline void CSON() { digitalWriteFast(DAC_SS_PIN, LOW); }
inline void CSOFF() { digitalWriteFast(DAC_SS_PIN, HIGH); }

void write_reg(uint8_t reg, uint16_t wdata) {
  uint8_t lsb = ((uint16_t)wdata >> 0) & 0xFF;
  uint8_t msb = ((uint16_t)wdata >> 8) & 0xFF;
  
  SPI.beginTransaction(settingsA);
  CSON();
  //delayMicroseconds(1);
  SPI.transfer(reg);
  SPI.transfer(msb);
  SPI.transfer(lsb);
  delayMicroseconds(1);
  CSOFF();
  SPI.endTransaction();
}

The setup function is simple and I am setting a few registers

void setup() {
  Serial.begin(115200);

  // Chip Select 
  pinMode(DAC_SS_PIN, OUTPUT);
  digitalWrite(DAC_SS_PIN, HIGH);

  // reset
  pinMode(DAC_RESET_PIN, OUTPUT);
  digitalWrite(DAC_RESET_PIN, LOW);
  delay(10); 
  digitalWrite(DAC_RESET_PIN, HIGH); 
  delay(10);
  
  // Init SPI0
  Serial.printf("SPI0 init...\n");  
  SPI.begin();
  delay(100);

  // Write
  write_reg(0x03, 0x0A84); // SPICONFIG: DEV-PWDWN=0
  write_reg(0x04, 0x0); // GENCONFIG: REF-PWDWN=0
  write_reg(0x09, 0x0); // DACPWDWN: DACx-PWDWN=0, x={A,B,C,D}
  write_reg(0x05, 0x0); // BRDCONFIG: DACx-BRDCAST-EN=0
  write_reg(0x0A, 0x5555); // DACx-RANGE=0b0101, i.e. +/-5V

}

Then in the main loop I am simply generating some triangular waveform just to see if everything works fine. 

uint16_t i=0;
void loop() {
  write_reg(0x10, (i)%65535 );   // DAC-A
  write_reg(0x11, (2*i)%65535 ); // DAC-B
  write_reg(0x12, (3*i)%65535 ); // DAC-C
  write_reg(0x13, (4*i)%65535);  // DAC-D

  i = (i+64)%65535;  
  delayMicroseconds(5);
}

Problem is DAC channel D doesn't update. No matter whatever DACRANGE I choose, it always stays at DAC_AVSS in bipolar mode or at DAC_AVDD in unipolar mode. 

In this case, DAC_AVDD = +12V, DAC_AVSS = -12V, DAC_DVDD=DAC_IOVDD = 3.3V and it is using its internal reference. All the jumpers of the EVM are at their default position except J11 which is configured to provide DAC_AVSS from external sources. 

Here's the waveform I get

The DSO channel 1/2/3/4 are hooked up to DAC_VOUT_A/B/C/D TPs. The sense pins are left unconnected. You can clearly the mean value of channel 4 is around -12v and it doesn't change. 

What am I missing here?

  • Hi,

    This behavior is expected, as we have designed the DAC_D channel to test out other functionality of the DAC81404. If you look at the schematics, VSENSE_P and VSENSE_N are intentionally reversed for DAC_D channel, that's the reason output of DAC_D is at -12V.

    You can enable the correct functionality of the DAC_D channel by the following the below procedure.

    1. Remove R17 and R12

    2. Connect a jumper wires so that the connections are proper ( you can do these connections in the output terminal block, J15 or in the place of resistor pads of R17 and R12)

    Regards,

    AK

  • Thanks a lot for your response. The problem is fixed. I am just documenting it so that others could be benefitted.

    This is the relevant part of the schematic 

    Though I did not really understand what feature could be evaluated by intentionally flipping the sense pins other than making the channel useless for real-world purposes but it would have been better if this is explicitly mentioned in the User's Guide of the EVM. Also there is a mistake in the top layer PCB layout shown in the guide: 

    The red traces (connecting VSENSE pins of DAC-D ) which I have drawn is missing in the guide but are actually put in the PCB!

    Anyway, thanks a lot for this help. This is how I finally fixed it

  • Hi,

    We will update the User's guide to reflect the same.

    Thanks,

    AK