This is very much a learning exercise for me, which I would hope to take in stages.
I am trying to program the control registers within the AD9954 board, for a very basic function i.e. to output a 40 MHz sinewave, using the MKRzero - not having much success.
The first stage is to try and program all the registers and read one of them back and display it on the serial monitor.That way I can prove that my method for reading and writing to the DDS is correct.
The latest sketch I have is included in the attachment. I think the part which reads from AD9954 may be at fault as it reads all zeros - this is at the very end of the sketch.
Unfortunately I do not have any diagnostic tools to help me, so the amount of testing I can do is very limited.
I think I may have bitten off more than I can chew !
Please find attached how I have interconnected the Arduino and AD9954.
Originally I had connected the CS pin to permanent ground. I have been this will not work and I need to toggle it. Therefore I have connected CS to A5 and will add a few lines to the sketch.
I intend to make other changes you have suggested, but thought I would send the wiring diagram in the meantime.
I purchased the board from China off ebay - no schematics.
So you have to reverse engineer that board. Without the schematics you probably won't get that thing to connect correctly to your Arduino. Never, never buy hardware without the needed documentation! For a breakout board schematics are needed to use them (or at least a detailed description of every pin on the connector).
Some questions you have to answer by reverse engineering the board:
do all signals have level converters?
does CS high put SDO into tri-state?
where is UPD connected to?
If you cannot find an answer to these questions your hardware is worthless because you cannot use it, unfortunately.