I'm attempting to use the ADS1255 but I'm running into some issues. First and foremost the ADS1255 seems to be resetting randomly during testing. The configuration I set eventually gets wiped somehow. The following is the initialization function for the ADS1255:
ADS1255CSlow();
while(!SPILock(spiInitData.channel))
;
SPIPut(ADS1255_SPI_CHANNEL,0x0F); // Turn off read continuous mode
SPIGet(ADS1255_SPI_CHANNEL);
DelayMs(1);
SPIPut(ADS1255_SPI_CHANNEL,0xFE); // Reset ADS1255 to defaults
SPIGet(ADS1255_SPI_CHANNEL);
DelayMs(1);
SPIPut(ADS1255_SPI_CHANNEL,0x53); // Write to reg 0x03
SPIGet(ADS1255_SPI_CHANNEL);
SPIPut(ADS1255_SPI_CHANNEL,0x00); // n-1 registers to be written
SPIGet(ADS1255_SPI_CHANNEL);
SPIPut(ADS1255_SPI_CHANNEL,0xA1); // Value to write to register (1000 SPS)
SPIGet(ADS1255_SPI_CHANNEL);
DelayMs(1);
SPIPut(ADS1255_SPI_CHANNEL,0x51); // Write to reg 0x01
SPIGet(ADS1255_SPI_CHANNEL);
SPIPut(ADS1255_SPI_CHANNEL,0x00); // n-1 registers to be written
SPIGet(ADS1255_SPI_CHANNEL);
SPIPut(ADS1255_SPI_CHANNEL,0x00); // Value to write to register
SPIGet(ADS1255_SPI_CHANNEL);
DelayMs(1);
SPIPut(ADS1255_SPI_CHANNEL,0xFC); // Sync A/D conversion
SPIGet(ADS1255_SPI_CHANNEL);
DelayMs(1);
SPIPut(ADS1255_SPI_CHANNEL,0xF0); // Self calibrate command
SPIGet(ADS1255_SPI_CHANNEL);
DelayMs(1);
SPIPut(ADS1255_SPI_CHANNEL,0xFD); // Put ADS1255 into Standby mode
SPIGet(ADS1255_SPI_CHANNEL);
DelayMs(1);
SPIUnLock(spiInitData.channel);
ADS1255CShigh();
Initially the waveform looks correct as would be expected but the data received is completely wrong. The first image is what the waveform looks like initially.
Then all of a sudden the ADS1255 will reset and start producing the correct data but the waveform looks wrong. The second image is what the waveform looks like when the ADS1255 resets. Notice the DRDY line is toggling when it shouldn't be but the data coming back seems correct.
My question is: A) why is the device resetting on its own
B) why does the correct waveform produce wrong data but the bad waveform produces correct data.
Thanks in advance



