Interfacing Matlab with SPI, AD9959 DDS
Show older comments
Hi,
I am trying to use a DDS evaluation board (AD9959) and am interested in interfacing with it in Matlab. There are a few ways in which might work for this.
- Matlab and NI-845x host adaptor
- Matlab and Arduino Microcontroller (with or without Simulink)
- Matlab with USB to SPI interface adapter (not NI or Ardvark)
In all three types, the problem I run into is how to send data to specific locations of the AD9959 using SPI. The AD9959 has a data sheet which includes a register map. Using it, you can find which feature of the board you want to send data to, and then program the code to send data to the location and bit range given in the table (ex. 0x00 and [7:0]).
In an Arduino and AD9959 setup using C++, there are several online examples of people doing this. However, I have found no examples where, using any of the three methods above, this is utilized.
Is there a way to send data to specific locations using register map values via any of the three ways listed? If so, what does that look like as matlab code, and what functions can be used to do this?
Also, a second question is: Is it possible to write code in Arduino, and be able to adjust those input variable numbers in Matlab. Rather than writing all of your code in Matlab and sending it through the Arduino, you use Matlab to isolate and modify select areas of the Arduino code. So... When you update the variables in Matlab, the new variable values would be reflected in Arduino as well.
Answers (0)
Categories
Find more on Instrument Control Toolbox Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!