LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using SPI write with USB 8451

Hello,

I have been trying to control AD9910 through  LabVIEW using NI USB 8451. After sending DIO lines for Master Reset, I can see the sync clock at 1/8 value which is a known state. The clock changes to 1/4 value after writing to registers. I cant write to the registers. I was successful doing the same with Arduino. Can anyone help me with this. I have attached the code.

 

Also AD 9910 has a bidirectional SDIO. Would that affect the programming ?

0 Kudos
Message 1 of 5
(2,777 Views)

Hey SadhuM,

 

I'm a little confused. Are you unable to write to the registers or is the sync clock giving an unexpected value?

0 Kudos
Message 2 of 5
(2,719 Views)

Hello Steven

So here is the problem. I've been trying to control AD9910 a DDS Signal generator using USB 8451 - SPI Communication. I am using scripting for this purpose. 

 

So as per the control structure of AD9910, I'm using 7 DIO pins, SCLK, CS, SDIO and SDO. I am also using the same ground. 

So the 7 DIO's are Master Reset, External Power Down, IO Reset, 3 Pins for Profile Selection and IO update. 

 

The AD9910 works like this. You need to give a pulse on Master Reset to bring the device into a known state(Default Register Values). The External Power down and IO Reset which I am not using for any function should be on Active low(Not floating). Now, the registers can be written on CS active low(both instruction and data). After the registers are written, they are stored in a buffer, and an active high IO Update pulse should be given to latch the values. 

 

So I was able to give an active high pulse on Master Reset and bring the board to an known state(in this state, I can see the clock value at 1/8 value of reference clock). Now if the registers are written properly, I can bring it to 1/4 value of reference clock). So, the problem is either the SPI communication is not happening or the IO update is not taking place.

 

Here are two questions I have. The AD9910 by default has Serial data IN and Out on one pin i.e SDIO. A register should be written to make SDIO input only pin.(to make SDO and SDI different). My question is if USB 8451 will be able to communicate with it at the first place. 

 

The second one is I am using DIO and SPI in the same VI. Is that a problem.

 

If it is not one of the above, there may be a mistake in the code that I have wrote. Can you please check and help me. I am attaching the working Aurdino file so that you can have a reference.

 

Thank you 

Sadhu Moka

Download All
0 Kudos
Message 3 of 5
(2,714 Views)

So, Here is an update, as I was trying to run the program step by step, I could see the board responding and the registers can be written. But when I step into the run script. it is getting reset(to the default state). I am now doubting about the order in which the Run Script executes the program

0 Kudos
Message 4 of 5
(2,703 Views)

Interesting, it sounds like the issue is due to the script

0 Kudos
Message 5 of 5
(2,700 Views)