Hi,
I first read those posts :
https://ez.analog.com/data_converters/precision_adcs/f/q-a/25598/ad7709-converter-problem/50749#50749
https://ez.analog.com/data_converters/precision_adcs/f/q-a/25357/ad7709-interface-problem
And look after help on internet, but I found no answers.
My problem : I can't communicate properly with AD7709, I tried several codes with several SPI Mode (datasheet says Active edge is Falling edge, does active edge means edge validating datas or edge toggling bits?) and SPI Frequency (never more than 1MHz).
I can't even read a correct answer from statut register.
My configuration: dsPIC33EP512GM706 connected to the AD7709 for RTD (3 wires config) reading.
My algorithm:
--------------------------------------------------------------------------------------------------------------------------------
PORTEbits.RE13 = 0; //CS low
PORTEbits.RE14 = 0; //Reset
__delay_ms(1000); //Delay_s();
PORTEbits.RE14 = 1;
Write_SPI(0x22); //Low Power Mode + Filter Register
Write_SPI(0xFF); //5.35 Hz = 186.77 ms
__delay_ms(300);
while(1)
{
Write_SPI(0x01); //Write Enable + Write Operation + Power Up OSC + Configuration Register
Write_SPI(0x09); //Config23 - 16
Write_SPI(0x00); //Config15 - 8
Write_SPI(0x0F); //Config7 - 0
while(PORTEbits.RE12 == 1); // Polling on RDY pin
Write_SPI(0x43); //Read Operation + ADC Data register
__delay_us(10);
msb = Read_SPI_AD7709(); //Read ADC Data register
lsb = Read_SPI_AD7709();
}
--------------------------------------------------------------------------------------------------------------------------------
I also tried to put delays between write & read operation. Same for Frequency clock, from 15kHz to 1 Mhz.
Can you please send me an example and/or give some advice ?
Thank you.