Kenneth, I didn't get a chance to read through your code today, as I had some other work I needed to finish. I'll give it a look again later. For the code, snippet 1 that doesn't work, what doesn't work? Is it giving bad data, or not giving enough time to complete the conversion? Do you have a logic analyzer to verify timing and the read of the device? It may help to show plots of the SPI communication to verify that the device is being programmed correctly and that the device responds properly. If the problem is in bad data, I'd force a known input, and report back with the ADC code. Just ignore the conversions to voltage and CJC for now and analyze the ADC raw data. Joseph Wu
↧