AnsweredAssumed Answered

AD9833

Question asked by AgentKan on Mar 6, 2017
Latest reply on Mar 12, 2017 by AgentKan

I have some problem with AD9833.

My MCU is DsPIC30F4011

I send SPI data ex.

 

AD9833setFreq(100000);

 

void AD9833setFreq(long freq )
{
long FreqWord = (freq << 28) / 25000000L ;
int MSB = (int)((FreqWord & 0xFFFC000) >> 14);
int LSB = (int)(FreqWord & 0x3FFF);
LSB |= 0x4000;
MSB |= 0x4000;
SPI_AD9833_Write(0x2100);
SPI_AD9833_Write(LSB);
SPI_AD9833_Write(MSB);
SPI_AD9833_Write(0xC000);
SPI_AD9833_Write(0x2000);
}

and the output frequency only 100mHz.

The value of function i put ,any value always output 100mHz or 1~2Hz.

0.6V p-p .

 

 

How can i do to debug the code & circuit .

I test other IC which use SPI .It's no problem.

So think code is correct.

The ad9833 use the datasheet circuit in page 25 .

Outcomes