Beaglebone: SPI and a Sparkfun tone generator

One task for telemetry is generating tones.  Sparkfun sells a AD9837 based DDS tone generator.  This blog describes how to interface this board with a beaglebone.  Eventually, I intend to set up a cheaper chip.

The AD9837 requires SPI communication.  So, time to figure out SPI.  I have used i2c, so hopefully they’re similar.

Some internet resources:

minigen

basic spi tests (pocket beagle library)

more spi tests (command line)

minigen code from sparkfun

elinux spidev page

writing to spidev using c

more spi

From the AD9837 data sheet

“To inform the AD9837 that the contents of the control register will be altered, Bit D15 and Bit D14 must be set to 0 …”

The AD9837 seems to be write only.

On the Beaglebone, SPI0 has the following pins:

SDATA is MOSI (P9-21)

FSYNC is CS (P9-17)

SCLK is SCK (P9-22)

MISO (P9-18) – not used for AD9837

pcb123 for windows

lm386 design and info

Posted in: Robotics

Comments are closed.