Hi
I ported my code that works perfectly with the AD5933 EVM to Arduino Uno(16bit).
I'm no longer using the EVM instead I'm using AD5933 chip with a custom board.
The board seems to function correctly. I have one problem though, the complex numbers computed with this custom board are different from the EVM - the difference is in their signs. (Again the same code is used with both the Arduino and the EVM.).
As can be seen below, it does compute the correct impedance(due to the nature of the computation), however, the sign issue is utterly wrong and should be fixed. Any ideas of what could be the cause of this would be highly appreciated.
Output from the custom board: (Rcal = 200k, Rfb = 100k)
----------------------------------------
frequency: 30000.00
impedance: 199984.78
phase: 0.05
real: -1614.00
img: 4623.00
----------------------------------------
----------------------------------------
frequency: 30002.00
impedance: 199984.78
phase: 0.05
real: -1614.00
img: 4623.00
----------------------------------------
----------------------------------------
frequency: 30004.00
impedance: 199984.78
phase: 0.05
real: -1614.00
img: 4623.00
----------------------------------------
EVM:
Frequency | Impedance | Phase | Real | Imaginary | Magnitude | |
30000 | 200048 | 0 | 1628 | -4597 | 4877 | |
30002 | 200049 | 0 | 1629 | -4596 | 4877 | |
30004 | 200021 | 0 | 1629 | -4597 | 4877 | |
30006 | 200044 | 0 | 1629 | -4596 | 4877 | |
30008 | 200023 | 0 | 1630 | -4597 | 4877 |
Mike