Talking to the ADS7883 with the Arduino Uno

Hey guys, I’m trying to figure out how to get the ADS7883 analog to digital converter (ADC) to talk to the Arduino, but I just can’t seem to get it to work. The datasheet for the chip is located here. I’ve got pin 6 on the chip (CS) hooked up to digital pin 10, pin 5 (SDO) hooked up to digital pin 12, and pin 4 (SCLK) hooked up to digital pin 13.

In addition to that, here’s my code:

#include <SPI.h>

const byte slaveSelectPin = 10; //CS

void setup() {
  digitalWrite(slaveSelectPin,HIGH); //chip active LOW

void loop() {
  long readADC = SpiRead();

long SpiRead(void) {
  long result;
  long b;
  result = SPI.transfer(0xFF);
  result <<= 8;
  b = SPI.transfer(0xFF);
  result |= b;
  result = result>>2;  

All I get returned are a bunch of zeroes, but I’m pretty sure I’ve hooked up everything correctly. If anyone can help me out, that would be great!

Everything looks OK to me. I'd try other SPI Data Modes.

I have since found out that the data mode is actually MODE3, but that doesn't seem to fix the issue. I've checked over my code, but I can't find anything wrong; could someone review the datasheet and tell me if I'm accessing something incorrectly?

I looked at the datasheet. The first read will get no data because it will just turn the power on. The second cycle should have produced a valid value. What voltage are you putting on the input?

I might actually have soldered the 5th pin in wrong, since the oscope readout is a bit finnicky. I’ll try resoldering and get back to you guys.