Hi Khoi, Generally you want DIN to be "0x00" (i.e. NOP) so that the ADC only returns data. If DIN forms a command during data read you might interrupt the data read operation and get invalid data. When you using the RDATA command, is DIN being held low (that is, you send all zeros after the RDATA byte)? For MUXing between channel it may not make sense to use the RDATAC mode at all. You'd have to send RDATAC, read the data, send SDATAC, update the register settings, then repeat. Also take care when reading in the data to a variable and shifting. Make sure the data is cast to the correct datatype, otherwise if you're shifting a "uint8_t" you might get corrupted data just by trying to perform the math operations on the data.
↧