The AD9834 is a 75 MHz low power DDS device capable of producing high performance sine and triangular outputs. It also has an on-board comparator that allows a square wave to be produced for clock generation. Consuming only 20 mW of power at 3 V makes the AD9834 an ideal candidate for power-sensitive applications. Capability for phase modulation and frequency modulation is provided. The frequency registers are 28 bits; with a 75 MHz clock rate, resolution of 0.28 Hz can be achieved. Similarly, with a 1 MHz clock rate, the AD9834 can be tuned to 0.004 Hz resolution. Frequency and phase modulation are affected by loading registers through the serial interface and toggling the registers using software or the FSELECT pin and PSELECT pin, respectively.
The goal of this project (Microcontroller No-OS) is to be able to provide reference projects for lower end processors, which can't run Linux, or aren't running a specific operating system, to help those customers using microcontrollers with ADI parts. Here you can find a generic driver which can be used as a base for any microcontroller platform and also specific drivers for Renesas platforms.
The driver contains two parts:
The Communication Driver has a standard interface, so the AD9834 driver can be used exactly as it is provided. There are three functions which are called by the AD9834 driver:
The implementation of these three functions depends on the used microcontroller.
The following functions are implemented in this version of AD9834 driver:
|unsigned char AD9834_Init(void))||Initializes the SPI communication peripheral and resets the part.|
|void AD9834_Reset(void)||Sets the Reset bit of the AD9834.|
|void AD9834_ClearReset(void)||Clears the Reset bit of the AD9834.|
|void AD9834_SetRegisterValue(unsigned short regValue)||Writes the value to a register.|
|void AD9834_SetFrequency(unsigned short reg, unsigned long val)||Writes to the frequency registers.|
|void AD9834_SetPhase(unsigned short reg, unsigned short val)||Writes to the phase registers.|
|void AD9834_Setup(unsigned short freq, unsigned short phase, unsigned short type, unsigned short commandType)||Selects the Frequency,Phase and Waveform type.|
This section contains a description of the steps required to run the AD9834 demonstration project on a Renesas RX62N platform.
An EVAL-AD9834SDZ board has to be interfaced with the Renesas Demonstration Kit (RDK) for RX62N:
EVAL-AD9834SDZ test point SDATA → YRDKRX62N J8 connector Pin 19 EVAL-AD9834SDZ test point SCLK → YRDKRX62N J8 connector Pin 20 EVAL-AD9834SDZ test point FSYNC → YRDKRX62N J8 connector Pin 15 EVAL-AD9834SDZ test point FSEL1 → YRDKRX62N JN1 connector Pin 17 EVAL-AD9834SDZ J3 connector Pin AVDD → YRDKRX62N J8 connector Pin 3 EVAL-AD9834SDZ J2 connector Pin DVDD → YRDKRX62N J8 connector Pin 3 EVAL-AD9834SDZ J3 connector Pin AGND → YRDKRX62N J8 connector Pin 4 EVAL-AD9834SDZ J2 connector Pin DGND → YRDKRX62N J8 connector Pin 4
The demo program sets up the AD9834 part to output sinusoidal and triangle waveforms. The frequency and the type of the wave are displayed on the LCD.
This section presents the steps for developing a software application that will run on the Renesas Demo Kit for RX62N for controlling and monitoring the operation of the ADI part.