Hello. Having bought one of the AD9835 breakout boards from Sparkfun (http://www.sparkfun.com/products/9169
), the lack of a library to control it was rather noticable. As a result, I have decided to write one, called Synthesis.
The intention is for this library to add support for other devices as I acquire them. API documentation is included in the library.
* Fixed-frequency sinusoid generator.
* This example produces a 1MHz sinusoidal signal using the AD9835 class
* from the Synthesis library.
// We begin by creating the AD9835 object with the pin assignments
// that are used. If another pinout is used, this must be
7, // FSYNC
3, // SCLK
2, // SDATA
6, // FSEL
5, // PSEL1
4, // PSEL0
50000000 // hzMasterClockFrequency (50MHz)
// We must first set up all of our output pins.
// We then set the board to produce a 1MHz signal.
// Without modulation the choice of phase offset does not matter,
// but we set it to zero for good measure.
// Finally, we turn on the IC.