Wednesday, November 2, 2011

DDS using AD9833

AD9833 soldered on to a PCB

In a prior research project in the communications field, AD9833 was used to make a DDS (Direct Digital Synthesis). The AD9833 is a low power(12.65 mW) programmable waveform generator which has10-lead MSOP (Mini Small Outline Package) hence soldering onto a regular PCB is very difficult as the lead pins are very small. So a PCB was fabricated to assist easy soldering of the AD9833. The above pictures shows the AD9833 being soldered onto the PCB to make connections easily.


 

A development board is created to test and program the AD9833 using PIC16F84A. A 20Mhz crystal oscillator was used as Master Clock. The pic configuration of AD9833 are:

1 - COMP                    6 - SDATA
2 - VDD                       7 - SCLK
3 - CAP/2.5V               8 - FSYNC

4 - DGND                    9 - AGND
5 - MCLK                   10 - VOUT

The FSYNC, SCLK and SDATA is conneted to the PIC16F84A through Pin 10, Pin 11 and Pin 12. These connections are required to program the AD9833. The FSYNC is basically the Chip Select. The timing diagram below explains the method of loading the required data.

TIMING DIAGRAM

The AD9833 contains a 16-bit control register that allows the user to configure the operation of the AD9833. Hence the control register has to be first initialized before loading the frequency.  The AD9833 as two Frequency Registers and two Phase Registers. Each of the register is 28-bit long. While loading the frequency in the registers 2-bits are used to select the register and we have remaining 14-bits for loading. The Frequency registers are loading using two write cycle. So we require 5 write cycles to be loaded.

0x2100 - Initialize the Control Register
0x____ - 14-bits LSB of the Frequency
0x____ - 14-bits MSB of the Frequency
0x____ - Phase Register
0x2000 - Reset

The 28-bits to be loading in the Frequency register is calculated using the formula:

FreqReg = (Fout x 2^28)/Fmclk = _____d = _______ Hex

To program the PIC16F84A, MPLAB IDE is used to write the program and compile it. The complied HEX file is loaded using a Parallel port programmer. The PIC16F84A was loaded with the program and theAD9833 was successfully loaded with the desired frequency and checked on the oscilloscope.






No comments:

Post a Comment