AD9834 SPI interface

Questions on other types of hardware and getting it talking to the ARM CPU
Post Reply
YahooArchive
Posts: 1463
Joined: Fri Oct 19, 2012 5:11 am

AD9834 SPI interface

Post by YahooArchive » Tue Feb 12, 2013 12:06 am

>from the help line
>I have been trying for some time now to get the SPI interface to work on the
ARMite board with an AD9834 DDS with no success. The AD9834 requires an FSYNC
line to be brought low before it will recognize the data. Many of the examples
provided in the manual are in BASIC only or only allow of CS to be high during
programming. I have tried extensively to use the provided Csample.c, however it
does not expand much from the data provided in the manual. Is there a c++
version SPI function I can use to program this chip via the ARMite?

I took a quick look at the AD9834 spec, and it looks like a traditional SPI
interface, FSYNC would be equivalent to CS

The SPI routines in both BASIC and C are bit banged and the source for those are
in SPI.bas and cor_bitbang.c respectively.

As the "stock" routine should work on this device, have you probed with a scope
to see what's happening? Either use a digital scope and capture a transaction,
or put the code in a loop for an analog scope.

Without a scope, get a meter out and check all your connections, again. That
includes power and ground. "If I had a dime for everytime a power or ground was
missing I'd be part of the 1%" I've seen that here numerous times in the forum.
Also the AD9834 requires an MCLK before anything happens, is that there?

As this device is basically a write only device, you can only see effects on its
outputs based on commands you send it. If all the connections look correct,
write a short test program to wiggle each line in the interface and you should
be able to see that on a meter.

The source is there so you can modify it, as there is no SPI standard, sometimes
CS needs to go high, sometimes the clock is too fast, recently I had to generate
my own CS as the device wanted it high while selecting a channel and low to read
the data out.



Post Reply