AD9833: Difference between revisions
m Added categories |
m →Usage |
||
| Line 5: | Line 5: | ||
The data sheet can be found at: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9833.pdf | The data sheet can be found at: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9833.pdf | ||
== Usage == | ==CJMCU-9833 Module Usage== | ||
The AD9833 | 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: | The module wirings are: | ||
| Line 34: | Line 34: | ||
|Signal Output | |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 == | |||
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. | |||
{{Info | |||
| title = Bits counted from 0... | |||
| message = When I refer to the 1st bit, I mean <code>1UL << 1</code>. | |||
}} | |||
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. | |||
<br /> | |||
[[Category:Arduino]] | [[Category:Arduino]] | ||
{{Navbox Tinkering}} | {{Navbox Tinkering}} | ||
[[Category:Tinkering]] | [[Category:Tinkering]] | ||
Revision as of 06:50, 9 August 2020
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
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
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 mean1UL << 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.