AnsweredAssumed Answered

AD9834 SIGN BIT OUT

Question asked by floriantiner on Feb 7, 2017
Latest reply on Feb 13, 2017 by mcee

Hello,

 

i am struggling getting an output on the SIGN BIT OUT Pin. Do I need a special initialization sequence?

If i replace the OPBITEN with MODE,  I get the triangular output as expected.

Mclk=75MHz

SIGN BIT OUT= only connected to an oscilloscope

 

 // Bits in the Control Register

 

 #define B28         0x2000    //DB13 28bit frequency register MSB,LSB in one command
 #define HLB         0x1000    //DB12 ignored because B28 == true
 #define FSEL        0x0800    //DB11 select FREQ0 or FREQ1 data
 #define PSEL        0x0400    //DB10 select PHASE0 or PHASE1 data
 #define PIN_SW      0x0200    //DB09 0=functions are controlled using control bits
 #define RESET       0x0100    //DB08 1=reset int registers to 0; set DAC to mid scale
 #define SLEEP1      0x0080    //DB07 disable MCLK, DAC value is hold
 #define SLEEP12     0x0040    //DB06 power down chip DAC
 #define OPBITEN     0x0020    //DB05 enable the SIGN_BIT_OUT pin
 #define SIGN_PIB    0x0010    //DB04 configure the SIGN_BIT_OUT
 #define DIV2        0x0008    //DB03 digital output/2
 #define MODE        0x0002    //DB01 1 = triangle output, 0 = sin output

 

         AD9834_config =B28 | RESET | OPBITEN;
         spi_Write(AD9834_config); //0x2100
         spi_Write(FREQ0_ADDR | 0x0001);
         spi_Write(PHASE0_ADDR);
         spi_Write(FREQ1_ADDR | 0x001);
         spi_Write(PHASE1_ADDR);
         AD9834_config &=~RESET;
         spi_Write(AD9834_config); //0x2000


         AD9834_SetFrequency(3000000L);

Outcomes