This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1158: Potentiometers and switches

Part Number: ADS1158

Hi!

I want to check if I can use the ads1158 for this:

Reading of 16 potentiometers(analog inputs)  and 8 switches(gpio) all at once directly to ADC and Spi to MCU. (0-5v)

If this is possible. What are the basic connections the ic needs to operate in single ended mode apart from spi pins. MUXOUT to ADCINN? 

Do I need xtal or oscillator to operate?

  • Hi Robin Arne Barstow,

    The only way to read 16 single-ended inputs with the ADS1158 is to use Autoscan mode. This mode will cycle through all of the inputs. You can implement this continuously i.e. it will read all 16 channels then wrap back around and start again at the first channel. Or you can do this in single shot / pulse convert mode where the device will cycle through all 16 channels and then stop, waiting for you to start conversions again. This might be necessary if you also intend to read the state of the GPIO pins

    What are the basic connections the ic needs to operate in single ended mode apart from spi pins. MUXOUT to ADCINN? 

    If your inputs are low impedance and do not require gain, you can use the internal MUXOUT / ADCINN connection and leave these pins floating.

    Do I need xtal or oscillator to operate?

    We recommend a 16 MHz, discrete clock oscillator for the ADS1158

    -Bryan

  • Ok thank you for your answer. 

    To clarify further. It will be on a shared SPI bus so according to datasheet i will use the "channel data read command". Does this mean I can ignore DRDY and START pins completely? I can "check the Status Byte when the NEW bit = 1, which indicates new channel data." Even in single shot/pulse convert mode?

  • Hi Robin Arne Barstow,

    You can use DRDY with the channel data read command, but it is not necessary. It is often easier to use DRDY as otherwise you have to continuously poll the STATUS byte to see if the NEW bit has toggled. This could become a challenge if you are trying to sample data quickly.

    If you want to use Auto-scan mode and cycle through all 16 channels, then stop, you will need to use the START pin. The pulse convert command only converts the current channel, then stops. So if uses the pulse convert command with Autoscan mode, the device would convert on channel 1, then stop. When you reissue the pulse convert command, the device will convert on channel 2, then stop, and so on.

    So there is flexibility in how you control the ADS1158, but some of that flexibility requires you to control the START pin

    -Bryan

  • ok it makes sense to have the DRDY pin wired back to MCU.

    One more thing. in the datasheet it states "Hardware Pins: START, DRDY, RESET, and PWDN. These pins allow direct pin control of the ADS1158. The equivalent of the START and DRDY pins is provided via commands through the SPI interface;"

    So it seems I can send the start command via SPI to save pins on the MCU? 

  • Hi Robin Arne Barstow,

    As mentioned, you can identify when a new conversion is ready by using the NEW bit in the STATUS byte. So no, the DRDY pin is not strictly necessary as long as you are using the data read command.

    The pulse convert command replaces the START pin, and is described below. As noted previously, the START pin allows for both continuous and pulse conversions, while the pulse convert command only allows for pulse conversions i.e. one channel is converted per command

    -Bryan