• Resolved

ADS1015: how to calculate Lo_thresh and Hi_thresh ?

Part Number: ADS1015

Hi, Team

We want to configure Lo_thresh and Hi_thresh register on ADS1015.

Could you let me know how to calculate value of Lo_thresh and Hi_thresh?

Please help to provide the example to calculate these values for Lo_thresh and Hi_thresh.

  • more question,

    1)     How to generate normal interrupt, one interrupt and one conversion.

    2)     How to configure comparator, like COMP_MODE, COMP_POL, COMP_LAT, COMP_QUE.

    3)     Need configure Lo_thresh and Hi_thresh for every channel?

  • In reply to Ray Chang:

    Hi Ray,

    Most of this detail is already in the ADS1015 datasheet - send me a note and we'll try to get you going on this.

     

    Regards,

    Tom

  • In reply to Ray Chang:

    Ray,


    Were you able to find the answers in the datasheet? Tom was correct that the datasheet covered these topics.

    The Lo_thresh and Hi_thresh are calculated the same as the output data is. You can use the Full-scale range table on page 12 of the datasheet to calculate the value. It is also found in the Data Format section on page 20. Note that the data is in two's complement notation. The Lo_thresh and Hi_thresh setting is for any data coming from the ADC. If you need different settings for each channel, then you'd need to write a new setting before you use each channel.

    Settings for the COMP_MODE, COMP_POL, COMP_LAT, and COMP_QUE are all explained in the Config Register Field Descriptions table on page 23. There is more detail in pages 12-14 of the datasheet. These sections explain how the comparator is used and the modes of alerts. However I do believe that the Traditional Comparator Mode and Window Comparator Mode figures are swapped in Figure 13.

    As for generating a normal interrupt, or one interrupt and one conversion, this is similar to running the device in Single-Shot Mode as described on page 15 of the datasheet. Just note that once the conversion is started in Single-Shot Mode, you won't be able to restart a new conversion until the first conversion has completed.

    Hopefully, these answer your questions. I'll close this post out for now. If you have follow-up questions, you can post back. If you are locked out of this post, just start a new thread.


    Joseph Wu