The AD9833 is a programmable waveform generator. It is capable of producing sine, triangular, and square wave between 0MHz to 12.5MHz with a resolution of 0.1Hz.

It is used in the CJMCU-9833 signal generator module.

The data sheet can be found at: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9833.pdf

CJMCU-9833 Module Usage[edit | edit source]

The CJMCU-9833 module bundles the AD9833 with the required 25MHz reference clock. The internal DAC is a 10-bit DAC with an on-board 200 ohm resistor and outputs a voltage of 0.6V peak to peak.

The module wirings are:

Pin Description
REF output from onboard 25MHz clock
VCC 2.3V - 5.5V input
GND
DAT data, MOSI
CLK clock, SCK
FNC Fsync, SS
OUT Signal Output

The module has a 0.1uF ceramic capacitor and 10uF tantalum capacitor in parallel with the power input to the AD9833 as required by the data sheet.

Interfacing with the AD9833[edit | edit source]

Regardless of whether you're using the module or working with the chip directly, you control the unit by sending a 16bit control word via the SPI serial interface. This control word defines the configuration of the AD9833 and how it should operate.

Bits counted from 0...
When I refer to the 1st bit, I mean 1UL << 1.

There are 4 additional registers that specify the frequency (FREQ0, FREQ1 -- both 28 bits each) and phase (PHASE0, PHASE1 -- both 12 bits each).

The frequency registers can be written to by setting the 13th bit of the control word followed by 2 16-bit words containing the LSB and MSBs of the 28-bit frequency value. Each of these words contain 2 bits for the target register (FREQ0, 01 or FREQ1, 10) with the remaining 14 bits for the frequency.

The phase is set by writing to the control word with bits 14 and 15 set, with the 13th bit defining whether it's for PHASE0 or PHASE1, followed by 1 bit that's ignored, then the 12 bits.

Working with the Output[edit | edit source]

The output signal will need be amplified if you want to use it as a proper signal generator. You could use a digital potentiometer such as X9C104P to make the signal's amplitude something desirable.

For something more serious, you can look at the schematics for the Ascel ae20125 function generator which also uses the AD9833 as a signal generator. The ae20125 uses a LM6181 opamp as well as provide the ability to control the signal's amplitude and DC offset.

See Also[edit | edit source]

There are some other instructable projects that build on this module, including: