Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

AD 9910 Control using USB 8451

Solved!
Go to solution

Hello I have been trying to control AD9910 through  LabVIEW using NI USB 8451 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 9
(5,943 Views)

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 2 of 9
(5,940 Views)

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 3 of 9
(5,943 Views)

Can you clarify what your goal is here? For you application, do you need to keep the clock value at 1/8th? What exactly can you not do in LabVIEW that you were able to do with the Arduino specifically? 

 

0 Kudos
Message 4 of 9
(5,892 Views)

Hello Sekine108.

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

 

 

0 Kudos
Message 5 of 9
(5,885 Views)

Also, Is the input format that I'm giving to SPI write is correct ?

0 Kudos
Message 6 of 9
(5,883 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 7 of 9
(5,875 Views)

Have you tested to see if the SPI communication or the IO update is working by themselves? If you can solidify that these two actions are taking place outside of your application, you can solidify a point to focus on in your code. Or at least have a small reproducing case to test for your application.

 

Yeah, as long as the communication is SPI or I2C the USB-8451 should communicate with the application.

 

You should be able to do DIO and SPI in the same VI as long as you have it set up properly. It shouldn't be a problem.

 

As for reading through your Arduino code, I do not think I would be the best person to look through that for you.

 

 

0 Kudos
Message 8 of 9
(5,843 Views)
Solution
Accepted by topic author SadhuM

Hey sekine. I've actually done that and the board was working. I've made the DIO Write, Writing Registers and I/O Update as three different VI's and it is working fine. Thanks for your help though

0 Kudos
Message 9 of 9
(5,817 Views)