Post Go back to editing

AD7709 SPI communication problem

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.

Parents
  • Hi,

    Unfortunately we don't have available No-OS driver for this part and we do not usually provide support in terms of coding issue. However, have you checked your SPI code if it is working as it should be? If you could check the digital interface with debug mode or attaching a scope shot to see if the communication work as expected and so that we may able to see how you write and read to a certain register. 

    Thanks,

    Jellenie

Reply
  • Hi,

    Unfortunately we don't have available No-OS driver for this part and we do not usually provide support in terms of coding issue. However, have you checked your SPI code if it is working as it should be? If you could check the digital interface with debug mode or attaching a scope shot to see if the communication work as expected and so that we may able to see how you write and read to a certain register. 

    Thanks,

    Jellenie

Children
No Data