TI's ADS1148 ADC SPI Interface Help

Hello,
I’m attempting to interface an 7 channel 16bit ADC from Texas Instruments along with a 16bit DAC from Analog Devices with my Arduino for a project I’ve been working on for a while now. It is a Programmable Lab Power Supply based largely on Dave Jones PSU project. It is mostly the analog circuitry that I am borrowing from his project. I’m using the Atmega32u4 chip that is in the leonardo as my uController. I chose this chip over the UNO chip for a number of reasons, mainly because it has standard USB capability, and 4 external interrupts for the Rotary Encoders. Right now I’m creating a basic P controller to adjust for the error in the DAC with the high performance Delta Sigma ADC.

My problem right now is interfacing the ADS1148 ADC with my Arduino. This chip is much more complicated then what I’ve interface with previously. The chip has alot of other features like IDAC’s, a Gain Amp, and Digital Filtering, all of which are controlled with registers. I was able to get the Analog Devices DAC working perfectly, but have yet to figure out this ADC. If someone could point me in the right direction as far as coding to get me reading individual channels it would be appreciated.

The chip has a standard SPI interface, which is full-duplex (or can be). I dont know if the arduino supports full duplex SPI or not. The ADC has a “START” pin and a “DRDY”. You can either hold the START pin high to have the ADC continuously do conversions and load them into the output register, or you can just pulse the pin high for a short time and read back the data. The DRDY pin pulses low to indicate there is new data in the register to be read, so what i did was hook up the DRDY pin to the interrupt pin on the Arduino to calculate to speed of conversion, which came to 5SPS (This is default, you can change the conversion speed up to 2kSPS via a register). So i know the chip is doing conversions, I just dont know how to read them back, or how to choose what channel to return. I also dont know how to change or read back registers.

I’ll attach the the code I have right now below, Also the datasheet for the ADC.
Also there is a snipping from page 47 of the data sheet showing what I was trying to duplicate with the code below.

This code is returing only 0’s for my upperByte and lowerByte in the serial monitor.

#include <SPI.h>

#define START 7        // start conversion pin
#define DRDY 6        // not used in this code, this pin with pulse low when data is in output register.

byte upperByte;
byte lowerByte;

byte NOP = 0b11111111; //NO information, just used pulsing the SPI clock

unsigned int adcValue;

void setup()
{
  digitalWrite(START, LOW);
  Serial.begin(9600);
  SPI.begin();
  SPI.setDataMode(SPI_MODE2);  // I tried both MODE0 and MODE 2, because I know clock is normally low. Polarity im not sure about.
  SPI.setBitOrder(MSBFIRST);
}

void loop()
{
  digitalWrite(START, HIGH);   //pulsing the START pin high for 50 milliseconds to initiate a new conversions.
  delay(50);
  digitalWrite(START, LOW); 
  delay(500);                    // pulling START pin low and waiting 500 milliseconds to be sure the data is in the output register and ready to be read.
  getADCChannel();       // calling my function that gets the value from the output register.
}

void getADCChannel()
{
  SPI.transfer(0b00010010); //this is what page 47 of the datasheet shows to read data from the output register.
  upperByte = SPI.transfer(NOP);
  lowerByte = SPI.transfer(NOP);
  Serial.println("NEW TRANSFER: ");
  Serial.print("HIGHBYTE: ");    //Right now I'm just printing the returned byte to see if they change when i apply voltage to the input pins.
  Serial.print(upperByte);
  Serial.print(" LOWBYTE: ");
  Serial.println(lowerByte);
  Serial.println();
}

ArduinoPSU_ADS1148_ADC_Datasheet.pdf (1.7 MB)