Hi, I am trying to interface AD7887 with Atmega32, and I am stuck with how to read Spi for continuous 16 clock cycles. Also, I came across this code for AD7887_Read16Bits(), where one needs to pass 2 control bytes. What are these control bytes?
As you can see in AD7887_Read16Bits() function comments, the first control byte is the control register of AD7887
and the second byte is a "don't care" one in order to have 2 bytes received, because the number of bytes
transmitted and received must be the same in SPI_Read() function. If you want to know more about the
SPI communication for Xilinx platform drivers, you can find here:
no-OS/Communication.c at master · analogdevicesinc/no-OS · GitHub. The Communication.h file is included
in ad7887.h file, so these are the protocols used for SPI communication.
Retrieving data ...