I am working with the ADS124S08. I am able to write and read back register settings, I have accessed the internal temperature sensor and am able to display the data.
Problem is with trying to access CH1 conversion data.
I get FF FF Ex for the three bites read if I short the CH1+ and CH1- lines together. I am using REF0 at 5V.
My setup registers are as follows
output_low(CS_ADC);
delay_us(ADC_DELAY);
SPI_XFER_124S08(ADS124S08_WAKE_UP); // WAKEUP command
SPI_XFER_124S08(ADS124S08_RESET); // RESET command
delay_us(ADC_DELAY);
SPI_XFER_124S08(ADS124S08_WREG | ADS124S08_STATUS); // WREG register starting with STATUS register 0x43H
// write only status reg
SPI_XFER_124S08(0x00); // 1-1 = 0
SPI_XFER_124S08(0x00); // clear POL bit on Status reg
delay_us(ADC_DELAY);
SPI_XFER_124S08(0x42); //WREN REG starting with MUX reg at 0x02
SPI_XFER_124S08(0x03); //write to four regs MUX PGA RATE and REF
SPI_XFER_124S08(0x01); // MUX Register
// CH 1 selected
SPI_XFER_124S08(0x08); // PGA Register
// Gain = 1
SPI_XFER_124S08(0x09); // Sample Rate Register
SPI_XFER_124S08(0x30); // REF register
then I loop the following code for the data:
delay_ms(100);
output_high(START_ADC); // Start Line high
// Conversion starts here
output_high(CS_ADC);
delay_us(ADC_DELAY); // Just a small delay here
//DRDY_ticks = 0; // initialize safety counter prior to polling
DRDY_flg = 0; // clear flag for conversion
while(!DRDY_flg) {
// hang here waiting for ADS124S08 conversion to occur
delay_ms(100);
output_toggle(G0_SELECT); // used by scope to check where code is running.
} // end conversion wait loop
output_low(CS_ADC);
delay_ms(ADC_DELAY);
if(DRDY_flg) { // conversion occurred
SPI_XFER_124S08(0x12); // RDATA Register
DATA_1 = SPI_XFER_124S08(0);
DATA_2 = SPI_XFER_124S08(0);
DATA_3 = SPI_XFER_124S08(0);
output_low(START_ADC);
//output_high(CS_ADC); // disable ADC communication
DRDY_flg = 0;
ADC_DELAY is 100
I believe I am set up correctly, and it does run, just not reading the right values I feel. if I open the CH+ and CH1- lines so they are floating, I lower data like 00 0A 23 and it sort of floats around.
I can post more information if you need it.