LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to give command packet to usb8451 to AD5628 - DAC CHIP

I am trying to write data to DAC AD5628 by using USB 8451 SPI communication.I am bit confused how to give data format to spi write function and I am not able to change any parameters of the ADC by using different formats of commands.

 

Here is the attached data sheet for the usb 8451 and AD5628 CHIP.

I am trying  the below format of commands to write to 8451

kotha_mahesh_0-1579880903675.png

Download All
0 Kudos
Message 1 of 7
(2,688 Views)

Please attach your code.  Attach the actual LabVIEW VIs, not pictures of VIs.  I have a USB-8451 device on my desk, and have used it to drive a different 12-bit DAC.  You need to select and set up the Slave device, then send the appropriate 32-bit command sequence.

 

Bob Schor

Message 2 of 7
(2,652 Views)

Hi,

 

Thanks alot for the reply and here attached for the reference code I have written and given some sample inputs in the code.Please give a solution array by that I could be thankful to you alot

0 Kudos
Message 3 of 7
(2,515 Views)

Do you have any experience with the SPI protocol?  Do you know how your D/A Chip works, and in what order you need to send the bytes?  It looks fairly simple to me, but I'd want to check it with a scope -- the chip appears to want a 32-bit command (4 bytes) that include command bits, address bits, and data bits (as well as unused bits).  Build the 32-bit "command" for the 32-bit shift register, send it with, say, 0x0000, 0x7FFF, and 0xFFFF, as the 16-bit data, look at the output voltage, and if you don't get anything sensible out, try reversing the byte order of the command (as you send bytes using the USB-8451 to the SPI chip).

 

Bob Schor

Message 4 of 7
(2,505 Views)

I have good knowledge on SPI and I tried many ways to give commands to the chip.I have observed that the scope reading are coming at a point but with low amplitudes and very fast in nature.I was unable to capture the outcome of those sparks. I have been getting confused at LDAC initialization process as the shift register get to initialize the data write process and we need to restart it when its initialize. I have tried those sequences but was unable to grab the voltages at tapping points.Please suggest me the sequence to initialise-write-DeInitialze process of LDAC registers

0 Kudos
Message 5 of 7
(2,496 Views)

@kotha_mahesh wrote:

I have observed that the scope reading are coming at a point but with low amplitudes and very fast in nature.  You have set the SPI clock to 1000 kHz = 1 MHz.  Is your oscilloscope (and its probe!) capable of seeing these signals at that clock rate?  If not, try using a slower clock.

I have been getting confused at LDAC initialization process as the shift register get to initialize the data write process and we need to restart it when its initialize.  Spend some time studying the SPI examples that ship with LabVIEW.


SPI Slave chips are all very different, even if from the same Chip manufacturer.  Sometimes the only real way to figure out how to control these chips is to get a good fast scope, preferably one that knows how to read/interpret digital signals (and even lets you label them -- my colleagues have a scope that shows us MOSI and MISO, labelled as such), and try to do things until you figure out "what works".

 

Bob Schor

Message 6 of 7
(2,455 Views)

I came to know that the input reference register to be enabled to get the output voltage .I have tried to enable input reference register to get output voltage but I am still getting doubt as how the write function takes my data? I am giving data in array form and number of bits per sample as 8 so is it from MSB to LSB or LSB to MSB or the hex data into integer ??? I am still in confusion as my trials got failed to set output voltage values

0 Kudos
Message 7 of 7
(2,139 Views)