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.

ADS1015-Q1: ADS1015 configuration

Part Number: ADS1015-Q1
Other Parts Discussed in Thread: ADS1015
Hello
 
We try to configure the ADC in the following way :
  1. At init we enable alert/ready interrupt by setting Hi_thresh register MSB to 1 and Lo_thresh register MSB to 0.
  2. We write the config for HV_Pos and wait for alert/rdy interrupt
  3. In the alert/rdy interrupt we request the data by writing Convert Pointer(0x00)
  4. Wait for the write command to be done(wait until I2C send_end interrupt is triggered) and then read the data
  5. Store the read data and write the config for the next channel(HV_Neg)
 
Is this flow correct?
 
The problem that we encounter Is that after step 2 we do not receive the interrupt if we do not wait for the I2C driver to finish the transaction by checking continuously if the register IICBSY0 has changed.
 
If we wait for that register to change after writing the config, the interrupt is triggered but then, the step 5 will not work because the SW will be stuck in the loop that checks if the IICBSY0 is changing (the register is checked within I2C receive_end interrupt).
 
Do you have any ideas about this?
 
Thanks
Martin
 
  • Martin,


    Generally, yes that is the way you would set up the ADS1015. By writing a 1 to the MSB of the Hi_thresh register, you would guarantee that the digital comparator triggers every single time. This sets the hi threshold to a negative number and the low number stays positive (or really 0).

    For (2), I think that you only need check a few things. First, are you using single-shot conversion mode or continuous conversion mode? If you are using single-shot conversion mode, you need to make sure the register write MSB is a 1 to start the conversion. If you are using continuous conversion mode, have you checked with an oscilloscope for the ALERT/RDY pin? Note that the pulse width is only 8us, so polling this pin may not be as effective as using the pin as an interrupt.

    One other word about continuous conversion mode is that if you change the configuration register, the device does not immediately change the configuration. It waits until the conversion in progress completes, and then makes the change. Because of this, I often recommend using single-shot conversion mode and then wait a specific time to read from the device. It's often more effective than using the ALERT/RDY to time the read and change in configuration.

    If you're having problems with the interrupt, I would verify the write to the threshold registers, verify that you're in some sort of continuous conversion, and look at the ALERT/RDY pin with an oscilloscope to see that there is some sort of periodic pulse indicating the data is ready.


    Joseph Wu

  • This question is being handled offline.

    Joseph Wu