LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USP SPI 8451 and AD9833

Hi,
I am using SPI 8451 Module to send commands to AD9833. This is the programmable waveform generator IC.
 
I alreay built VIs that have commands to send and circuit built up
 
My VIs are OK but I can not get my desired waveform out from the AD9833.
 
I have my SCLK @ 1 Mhz, CS0 active low. All these looked OK on the scope.
 
The commands I send to SDO are 100, 2100, 5AEE, C000, 000.
 
For the AD9833, I have Fmclk @ 16 Mhz, FSYNC = CS0, SCLK =SCLK, SDATA = SDO. With this set up, it should give me the 134.2 Khz sinewave at the output of AD9833. However, I have no signal at all at the output.
 
Please, any help will be appriciated.
 
Thanks
 
STEVE
0 Kudos
Message 1 of 8
(6,860 Views)
Hi,
 
I had a look to the attached manual and found Table 5 which explains how to update the complete Frequency register. I wrote an example to do this operation.
Have a look to this code and try to change it to your needs. The 8451 can only bwrite in 8 bit chuncks. Hopefully this is not a problem. for the 9833.
 
Hope it helps
 
DirkW
0 Kudos
Message 2 of 8
(6,833 Views)

Thanks.

I can not open it because of the company network security. I will open it tonight at home.

At this moment I did get the sinewave but it can only give up to 125 khz. With the commands that generate Fout below 125 khz, I can get Fout correctly. But with the ones that generate Fout greater than 125 khz, I only can get 125 Khz.

Here is the link the get the Frequency word

http://designtools.analog.com/dtDDSWeb/dtDDSMain.aspx

I will let you know right after I resolve this issue. Hopefully, It is not going to be too bad

Steve

0 Kudos
Message 3 of 8
(6,819 Views)
Hi DirkW,
I did look at your code. It does not work for my test. But I am appriciate your time.
 
I think the problem I am facing is the SPI 8541 can only write 8 bit word and I am writing 16 bit word to my AD9833.
 
If someone know how to make the usb spi 8541 to write(read) 16 bit word, then my issue is resolved.
 
Again, thanks a lot DirkW.
 
Steve
0 Kudos
Message 4 of 8
(6,797 Views)

Hi DirkW,

Your VI works now but I still have the same problem. It just gave me 125 Khz. I think the problem is the module 8541 can only write 8 bit word. It chopped off the other 8 bits.

Can anyone have any idea?

Steve

0 Kudos
Message 5 of 8
(6,791 Views)

Hi,

It works.

Thanks all

 

Steve

0 Kudos
Message 6 of 8
(6,771 Views)

Hi Steven,

 

it would be really appriciated if you can present your solution for this problem. I was thinking about to use the same AD9833 on a testadapter I am going to build.

 

Thank you und best regards from Switzerland

 

Holger

0 Kudos
Message 7 of 8
(5,131 Views)

Hi Holger,

 

You can send 16 bit signals but there will be a small delay.  Please take a look at the following Knowledgebase article for more details:

 

http://digital.ni.com/public.nsf/allkb/7E9C89D8D59AEE95862571FB0074B61F?OpenDocument

 

Best Regards!

National Instruments
Senior Systems Engineer
0 Kudos
Message 8 of 8
(5,123 Views)