Hi all,
I am planning to use the AD5780 Demo board for a project. I used Ardunio for simplify the setup. However, despite the correct wiring and connections, it appears that the board does not give a valid read out. Specifically, I connected the AD5780 via SPI interface with Arduino, my code simply do two things, reset and read a "control register". If I understand it correctly, after each reset, the control register should return the same data (the initial default setting after hardware reset). However, what I see is that every cycle, it returns some random number that I cannot find the pattern.
I tracked the connection and power supply, they work as expected, so I am quite sure that they are not hardware failure. The code itself, and a couple of logic analyzer capture are attached for analytics.
Thanks in advance!
#include <SPI.h>
SPISettings settings(1000000, MSBFIRST, SPI_MODE1);
void setup() {
pinMode(2, OUTPUT); //Used as Chip-Select, CS PIN
digitalWrite(2, HIGH);
SPI.begin();
SPI.beginTransaction(settings);
//reset seq
delayMicroseconds(50);
//Assert RST
digitalWrite(2, LOW);
SPI.transfer(0x40);
SPI.transfer(0x00);
SPI.transfer(0x04);
digitalWrite(2, HIGH);
delayMicroseconds(50);
//De-assert RST
digitalWrite(2, LOW);
SPI.transfer(0x40);
SPI.transfer(0x00);
SPI.transfer(0x00);
digitalWrite(2, HIGH);
//Attempt read
delayMicroseconds(50);
//Read Control REG
digitalWrite(2, LOW);
SPI.transfer(0xA0);
SPI.transfer(0x00);
SPI.transfer(0x00);
digitalWrite(2, HIGH);
delayMicroseconds(50);
digitalWrite(2, LOW);
unsigned long a = SPI.transfer(0x00);
unsigned long b = SPI.transfer(0x00);
unsigned long c = SPI.transfer(0x00);
digitalWrite(2, HIGH);
SPI.endTransaction();
SPI.end();
}
void loop() {
// put your main code here, to run repeatedly:
}
The code is attached above, it is the simplest version (purely for debug purposes).

First execution, you can see that the first two communications are attempting to reset the AD5780, second attempt is to read out the register.

Second image, despite transferring exact same information, the output is different.
The config of the logic analyzer is as follows:







