AnsweredAssumed Answered

Problems in Interfacing AD9833 with LPC2148

Question asked by Prachi_30 on Mar 23, 2015
Latest reply on Apr 16, 2015 by sitti

Hello everyone!
I am doing a project wherein I will be generating waveforms using the waveform generator IC, AD9833. It is programmed through the LPC2148/LPC2129 microcontroller using SPI communication. The SPI transfer is working just fine i.e. the data can be seen at the SPI_data_out pin of the controller. But however I am facing problems in interfacing this to the controller.

1.) Please guide me as to how I should connect ( power supply, capacitors, resistors, etc. connections if any.) AD9833 to the LPC2148/2129 controller. If possible, could you send a sample block diagram for the same. I connected it on trial basis and the IC began to heat up.

2.) What are the steps to be followed while programming the AD9833? I am using Keil uVision 4 for programming and debugging the code. I have written the following code. Please let me know if any corrections are needed to be made in this.


Thank you!


********************************************code for AD9833****************************************

int main (void)


  int *p;

  unsigned int i, j;

  unsigned long info_4[] = {0x2100, 0x5BF6, 0x4000, 0xC000, 0x2000};    // the order of the data written into the AD9833 with reset


  IODIR1 = 0x00FF0000;            // P1.16-23 defined as output

  IODIR0 = 0x000000D0;

  IOCLR1 = 0x00FF0000;           //

  IOCLR0 = 0x000000D0;







static void Write(int *add)


  unsigned long i,ch,pp,j=0;

  int test_count;



  IOCLR0 = 0x00000080;                // connected to FSYNC pin

  pp=S0SPSR;                              //read status register

  S0SPDR = *add;                         //write data to SPI transfer register

  while(!(S0SPSR&0x80));              //Wait while busy

  IOSET0 = 0x00000080;               //Set Fsync pin high