AnsweredAssumed Answered

AD5934 status Register problem

Question asked by Maria Employee on Mar 20, 2017
Latest reply on Mar 21, 2017 by musach

i am using Ad5934 . i stuck at program flow at poll the status register(0x8f) to check wthere valid data is at present  .status bit D1 should be set after  start frequency sweep command but it not.. i have cheeked  i2c write/read  data  is ok .

the flow of my program is

1.reset part

2.Program the start frequency

3.Program Δf

4.Program the number of increments

5.Program the delay in the measurements

6.Initialize the system & Wait few ms

7.Frequency sweep.

8 check status register ox8f ( i stuck at this place) ///// reset the part /// i2c_write ( 0x81, 0x10); Delay_ms(100);

 

// program 30khz start frequency assuming internal osc of 16.776Mhz i2c_write ( 0x84, 0xC5); i2c_write ( 0x83, 0xF3); i2c_write ( 0x82, 0x00);

 

 

// program 10hz frequency increment assuming internal osc of 16.776Mhz i2c_write ( 0x87, 0xE2); i2c_write ( 0x86, 0x79); i2c_write ( 0x85, 0x00); Delay_ms(100);

 

// Transmit to NUMBER OF INCREMENTS =10 register i2c_write ( 0x89, 0x0A); i2c_write ( 0x88, 0x00); Delay_ms(200);

 

// Transmit to settling time cycles register // program 12output cycles at each frequency before a adc conversion i2c_write ( 0x8B, 0x0C); i2c_write ( 0x8A, 0x00);

 

// place the AD5934 in standby mode

// i2c_write ( 0x80, 0xB0);

 

// initialise the sensor with contents of start frequency regsister with range 1 (2vp-p, 1.6v) PGA = x1 status_register Delay_ms(8000);

 

// start of frequency sweep (2vp-p, 1.6v) PGA = x1 i2c_write ( 0x80, 0x21); Delay_ms(8000);

 

status_register = AD5934_Read(0x8F);

 status_register = (status_register & 0x02); while(!(status_register));

 

after step 2,3,4, i have checked the value of status register is =0x40; it is not changing after step 6 and 7 it remains 0x40 .

Outcomes