SPI Iterfacing AD7175

Hello, I want to communicate with AD7175 24bit ADC, but the RDY signal is attached to MISO. Can I use pin define

define MISO 74;

and then to use pinMode(MISO, INPUT); or to separate the DOUT/RDY signal once to MISO and once to additional pin of due and monitor it on this pin. I have to catch the low level of MISO (DOUT/RDY pin of AD7175). Is there any other way to catch the MISO low level ( not interrupt one ) ?

Well, I doubt that the manufacturer would design the chip in a way that makes it impossible for most microcontrollers to talk to it.

Before I start, I will say that most of the SPI work I have done is with the AVR Arduinos, not on the Due, so there may be some critical difference. You will need to test this.

The MISO pin can be used like any other INPUT pin. When you do SPI.begin() it will be configured as an input. Just don't change it to an output as that will probably give the SPI a problem. You can mix digitalRead(MISO) with SPI functions. If you're really pushing the SPI and trying to make it asynchronous (use a send queue while your program does other things) then you may run into trouble trying to sample the input while SPI is part-way through a byte. The standard Arduino functions are synchronous, so you will not have any problem with that.

Reading the datasheet for the AD7175, it looks like the correct way of using it is:

digitalWrite(CS, LOW);
if(!digitalRead(MISO_RDY)) {
  //chip is ready to send data
  //process new data...

} else {
  //chip is not ready

digitalWrite(CS, HIGH); //finish communications with AD7175

Note this is not using the Due's extended SPI methods as we wish to retain control over the CS pin.

I've tried with Arduino Uno and it is OK, but with due can not catch the low level of MISO. May be there is a problem when i declare MISO. I've tried with separate signal but never goes low, or I can not catch, because when I measure the voltage it is 0V. I use due for first time and may be there are some tiny tricks I don't know. Tomorrow I will try again.

Is the ADC connected so that all of its I/O is at 3.3V and VDD is 3.3V?
A connection diagram would help.

On the Due, this is where you connect the SPI signals:

Have you checked out this reference page?

From the datasheet, it mentions that this ADC requires SPI mode 3.

Something like this might get you started (untested):

#include <SPI.h>
#define CS 52  // can use pins 4, 10, or 52 for CS 

void setup()
  SPI.setDataMode(CS, SPI_MODE3);
  SPI.setClockDivider(CS, 6);  // 14MHz (closest available to 16MHz in datasheet)

void loop()
  byte msg1 = 0x02;
  byte msg2 = 0x00;
  byte msg3 = 0x80;
  byte msg4 = 0x00;

  // begin transfer...
  SPI.transfer(CS, msg1, SPI_CONTINUE);  // CS goes LOW
  SPI.transfer(CS, msg2, SPI_CONTINUE);
  SPI.transfer(CS, msg3, SPI_CONTINUE);
  SPI.transfer(CS, msg4);                // CS goes HIGH

SPI is wired correct, VDD is 3.3V. When I wrote 8010HEX to mode register I red 801HEX but when I wrote 801F I red 801F. When I am trying to use MISO as a rdy output data a lot of data is mismatched, I suppose have to try without this signal. I will play more next week because I have other tasks now and I will reply. Thanks for the help.