AnsweredAssumed Answered

Why will the AD5933 will not return real/imaginary data with a BLE112?

Question asked by ryan.holman@ucsf.edu on Apr 28, 2017
Latest reply on May 2, 2017 by musach

I can read the temperature values using the temperature() function.  I can also read and write all the chip registers.  Though, I cannot generate any real or imaginary data.  Also, the status register never set the real/imaginary data bit to 1.  I connected the chip to an oscilloscope and no signal is generated.  My test() function to perform a frequency sweep is listed below.  Could this be a bad chip?

 

procedure temperature()
   #measure temperature 10010001 = 0x91 > 0x80
   #measure temperature 00000000 = 0x00 > 0x81
   call hardware_i2c_write($1A,1,2,"\x80\x91")(i2c_written)
   call hardware_i2c_write($1A,1,2,"\x81\x00")(i2c_written)
   call hardware_i2c_write($1A,1,1,"\x8F")(i2c_written)
   #Status Register Value
   #received 0x91
   #!!! Indicates Valid temperature data
   call hardware_i2c_read($1B,1,1)(val_result,val_len,temp(0:1))
   #positve temperatures are decimal value divided by 32
   i=1
   while i<15
   call hardware_i2c_write($1A,1,1,"\x92")(i2c_written)
   call hardware_i2c_read($1B,1,1)(val_result,val_len,temp(i:1))
   call hardware_i2c_write($1A,1,1,"\x93")(i2c_written)
   call hardware_i2c_read($1B,1,1)(val_result,val_len,temp(i+1:1))
   i=i+2
   end while
   temp(i:1)=0
   i=i+1
   call attributes_write(ad5933_fr, 0, i, temp(0:i))
   #returned 0x02 for Register \x92 = 00000010
   #returned 0xA9 for Register 93 = 101010001
   # corresponds to:  00000010101010001 = 1361
   # Temperature = Returned Bytes / 32 = 1361/32 = 42.53 Celcius
   # This is 108.554 F
end

 

procedure test()
    call hardware_i2c_write($1A,1,2,"\x82\x04")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x83\xE2")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x84\x17")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x85\x00")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x86\x15")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x87\xE0")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x88\x01")(i2c_written)
    call hardware_i2c_write($1A,1,1,"\x88\x00")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x89\x07")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x8A\x00")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x8B\x07")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x80\xB1")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x81\x00")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x80\x11")(i2c_written)
    call hardware_i2c_write($1A,1,2,"\x80\x21")(i2c_written)
    i=0
    while i<13
    call hardware_i2c_write($1A,1,1,"\x8F")(i2c_written)
    call hardware_i2c_read($1B,1,1)(val_result,val_len,test(i:1))
    call hardware_i2c_write($1A,1,2,"\x80\x31")(i2c_written)
    i=i+1
    end while
    call hardware_i2c_write($1A,1,1,"\x94")(i2c_written)
    call hardware_i2c_read($1B,1,1)(val_result,val_len,test(13:1))
    call hardware_i2c_write($1A,1,1,"\x95")(i2c_written)
    call hardware_i2c_read($1B,1,1)(val_result,val_len,test(14:1))
    call hardware_i2c_write($1A,1,1,"\x96")(i2c_written)
    call hardware_i2c_read($1B,1,1)(val_result,val_len,test(15:1))
    call attributes_write(ad5933_fr, 0, 16, test(0:16))
end

Outcomes