Quantcast
Channel: Data converters
Viewing all articles
Browse latest Browse all 27683

Forum Post: RE: ADS1256: Setting up the SPI Logic Analyzer for ADS1256

$
0
0
Here is my setup. I think one of the problem might be the fact that I have to do the following step: SPI.transfer(0x01); // Read Data 0000 0001 (01h) // ********** Step 3 ********** delayMicroseconds(5); adc_val[i] = SPI.transfer(0); adc_val[i] <<= 8; //shift to left adc_val[i] |= SPI.transfer(0); adc_val[i] <<= 8; adc_val[i] |= SPI.transfer(0); delayMicroseconds(2); This part is totally fine on Arduino Uno, but it behaves inconsistently on ESP32. ADS1256 _cmd(spi, cmd); // Read Data 0000 0001 (01h) // ********** Step 3 ********** ets_delay_us(5); adc_val[i] = ADS1256 _read(spi); adc_val[i] <<= 8; //shift to left adc_val[i] |= ADS1256 _read(spi); adc_val[i] <<= 8; adc_val[i] |= ADS1256 _read(spi); ets_delay_us(2); I tried to read all 24 bit at once using RDATAC but what I get is completely trash on my signal readout. Should SDATAC after every readout since I am calling RDATAC at the beginning of every loop? If I going to do so, I have to ensure that SDATAC command must be issue at the next DRDY LOW, right?

Viewing all articles
Browse latest Browse all 27683

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>