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.

DAC8771: error to run DAC8771

Part Number: DAC8771

HI, i have some problems to start the dac, i have followed the register tree:

but i coudn´t get anything. have i any errors in the transaction code?

spiWrite(0x02,0b0000000000010000);
delay(1); 
spiWrite(0x06, 0x0000);
delay(1);
spiWrite(0x07, 0b0000001000011111);
delay(1);
spiWrite(0x03, 0b0000000000000000);
delay(1);
spiWrite(0x04, 0b0001000000000000); 
delay(1);
spiWrite(0x05, 0b1111111111111111);
delay(1000);

}


void spiWrite(int address, int value) {
  // take the SS pin low to select the chip:
  digitalWrite(8, LOW);
  delay(100);
  //  send in the address and value via SPI:
  SPI.transfer(address);
   //SPI.transfer(value);
  SPI.transfer16(value);
  delay(100);
  // take the SS pin high to de-select the chip:
  digitalWrite(8, HIGH);
  delay(100);
  SPI.endTransaction();
}


the output is always 0V  and the buck/boost converter  have -2.5V and 3.3V respectively, supply 16VDC i'm using  the evm board throught  spi to arduino uno board. 

thanks.

  • Adrian


    Just based on the VPOS_IN and VNEG_IN voltages, the buck boost isn't even turned on. Have you tried using the device with the GUI software to see if the device is operating? This is a convenient way to see how the device is enabled, configured, and operates. Additionally, it would be convenient to use an oscilloscope or logic analyzer to look at the communication to the device.

    Just to check, can you take a photo of your EVM from the top? I just want to make sure your the jumper connections are correct and that you have power connected to the right place.

    I looked through your code:
    0x02 0x00 0x10 - Set reference
    0x06 0x00 0x00 - Set the buck boost channel
    0x07 0x02 0x1F - Full tracking, buck-boost POS and NEG enabled, ±15V
    0x03 0x00 0x00 - Default Select DAC register
    0x04 0x10 0x00 - Enable output, set the range to 0-5V
    0x05 0xFF 0xFF - DAC data register set

    I don't see anything in the wrong in the code, but I would try reading back from register 0x07 because it would have been written to, and is different than the default setting. Again, I would get an oscilloscope to look that the digital communications. Make sure that the communication matches the timing diagram. There are several things that I would specifically look at. First, make sure that the SPI is the correct mode. The clock dwells low, and the data is clocked into the device at the falling edge of SCLK. Second, make sure that the /SYNC timing is correct based on the timing diagram, and that 24 SCLK falling edges are seen while SYNC is low. Last, I vaguely recall that Arduino sends SPI packets in bytes, so the equivalent /CS is taken low for individual byte transactions. Make sure that the /SYNC is low for the entire 24 byte transaction.

    Take that photo of the EVM and get some scope shots for the communication. Post them back to this thread when you're ready and we can review it.


    Joseph Wu