Hi
I have cascaded six ADS1298's, but when I read data from several devices, I get garbage samples once in a while. More devices, more channels per device and higher sampling rates make it worse. I suspect it has something to do with the timing requirements, but I cannot figure it out. The image shows one channel from each of the six devices sampled with 2kSPS.
Pseudocode:
SPI_CLOCK = 4MHz
startAll {
for (n = 0; n < 6; n++) {
digitalWrite(ADSs[n]->_CS, LOW);
}
delayMicroseconds(10);
SPI.transfer(START);
for (n = 0; n < 6; n++) {
digitalWrite(ADSs[n]->_CS, HIGH);
}
}
if (all _DRDY == low) { // Obtained through interrupt functions
for (n = 0; n < 6; n++) {
digitalWrite(ADSs[n]->_CS, LOW)
delayMicroseconds(10);
for (n = 0; n < 3; n++) {
_STATUS[n] = SPI.transfer(0x00);
}
for (n = 0; n < 3 * 8; n++) {
_DATA[n] = SPI.transfer(0x00);
}
digitalWrite(_CS, HIGH);
}
}
The CLK's are not connected between the different devices. Could that be the problem? Or do you have any other suggestions?
Best regards,
Sigge Larsen