Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 22030

Re: AD9912 I use spur killer, I need killed spur harmonic 2, It should write 0x01 or 0x02 to the register 0x0500 ?

$
0
0

LouijieC написал(а):

 

It was described in the data sheet that 4 LSB's is enough to create an output which approximately 60 dB below the full scale DAC code.  In your case the value of 0x0501 would be 0x0F. For the phase offset value, a 180 degree phase shift would just equal to b100000000 wherein bit 9 is set to 1. I just want to emphasize that you still need to experiment to get the maximum attenuation of the spur by adjusting your phase offset greater/less than 180 degree offset.

 

Best Regards

Louijie

I did what you wrote to me, but had no effect.

quote a fragment of the code, initialization Spur Killer

---------------------------------------------------------------------------------------

#define Spur_A_Harmonic_Add     0x0500    // address AD9912

#define Spur_A_Magnitude_Add    0x0501

#define Spur_A_Phase1_Add       0x0503   // 1-8 bit

#define Spur_A_Phase2_Add       0x0504   // 9bit End

---------------------------------------------------------------------------------------

//***********I/O Register Map section

void IO_UPDETE(void)

{

    Nop();

    PORTBbits.RB2  = 1;                 //  set IO_UPDETE

    Nop();

    PORTBbits.RB2  = 0;                 // reset IO_UPDETE

    Nop();

}

-----------------------------------------------------------------------------------------------------

    DDS_FREQ_WRITE(LookUpFTW[190]);                          // Value = Fout(Mhz) - 10

    Nop();

    SPI_24(WORD_DATA(Spur_A_Harmonic_Add, 0x02));   // Set SpurKillerharmonic

    IO_UPDETE();    // M IO_UPDETE

    SPI_24(WORD_DATA(0x0013, 0x80));                            // Set bit 7 PD fund DDS

    IO_UPDETE();    // M IO_UPDETE

    SPI_24(WORD_DATA(Spur_A_Harmonic_Add, 0x82));   // Enable SpurKiller Set harmonic

    IO_UPDETE();    // M IO_UPDETE

    SPI_24(WORD_DATA(Spur_A_Magnitude_Add, 0x0F));   //  SpurKiller

    IO_UPDETE();    // M IO_UPDETE

    SPI_24(WORD_DATA(0x0013, 0x00));                              // Clear bit 7 PD fund DDS

    IO_UPDETE();    // M IO_UPDETE

    SPI_24(WORD_DATA(Spur_A_Phase1_Add, 0x00));       // Setting Phase inverting 180

    IO_UPDETE();    // M IO_UPDETE

    SPI_24(WORD_DATA(Spur_A_Phase2_Add, 0x01));       // Setting Phase sign minus-

    IO_UPDETE();    // M IO_UPDETE

 

Look at the chart FFT, you can see that the 2 nd harmonic large, Spur Killer does not give effect. I think that is not correct initialization, or incorrect values I write to the registers.

Output Spur 24.09.2014.bmp


Viewing all articles
Browse latest Browse all 22030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>