06-27-2017 04:35 AM
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 ?
Solved! Go to Solution.
06-27-2017 04:39 AM
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 ?
06-27-2017 04:39 AM
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 ?
06-28-2017 09:49 AM
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?
06-28-2017 02:10 PM
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
06-28-2017 02:46 PM
Also, Is the input format that I'm giving to SPI write is correct ?
06-28-2017 05:11 PM
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.
06-29-2017 04:45 PM
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.
07-05-2017 09:01 PM
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