I am new in this forum and in fact having not a lot of experience in embedded programming and I hope to get help here to move forward my home based hobby project.
I having problem to read from two chained AD7685 ADC's using an ATMEL ATmega1284P microcontroller. The two ADC's are in chained mode that is described in the 22nd page of the datasheet http://www.analog.com/static/imported-files/data_sheets/AD7685.pdf The problem is, following setting the CNV pin high and wait plenty (50us) for letting the conversion to be completed I read four bytes from the two ADC's, but it seems what I am doing is incorrect as the values of the 4 bytes are always 0xff.
The SDO pin of the ADC is connected to MISO (PB6), the CNV to the SS (PB4) and the SCK is to the SCK (PB7) pin of the ATmega chip. The analog input seems correct and the CNV rises when I set the PB4 pin, but the returned data is always 0xff.
I have asked the same question at the AVR forum as well at http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=128642&highlight= and there are more details about my code and schematic.
Would anyone help me with a sample code ideally Atmega, but any hint would be nice that could help me understand better how to read from the ADC please?