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.

ADS7924: Alarm threshold question

Part Number: ADS7924

Hi sir :

       when I  used alarm interrupt,I set LLR 0x44(0.8v) , ULR 0x88(1.6V), no alarm intterrupt occurs when coversion result less than 0.8 or greater than 1.6.

But when I set LLR 0x88(1.6V ), ULR 0x44(0.8v), alarm interrupt occurs when conversion result between 0.8 and 1.6.

    This result is differrent from the datasheet V7.3.9.

    Do you have any suggestion  of this question?

   Thanks a lot

  • Hi Yongchao,

    I am working to get the hardware, but in the meantime can you please:

    - Provide a scope capture of your data lines (SDA and SCL)

    Which channel(s) are you setting the alarm for?
  • Hi Yongchao,

    Are you programming the ALMCNT (address 12h) register to specify the number of times the threshold must be exceeded before the alarm trips (see the top of page 30 in the datasheet)? Can you please:

    1) Set the thresholds as you originally specified (LLR = 0x44, ULR 0x88), and take at least 2 samples that are below the LLR or above the ULR before checking the alarm.

    2) Program ALMCNT = 001, with the same thresholds (LLR = 0x44, ULR 0x88) and take only 1 sample before checking the alarm.

    If both of these produce an alarm, then the ALMCNT register was being set to trigger the alarm after a threshold was crossed 2 times.
  • Hi sir :

          Thanks for your reply.

          Listed  below are what I set the registers up as:

          Mode control : I set to awake mode 0x80 then swtich to  manual-single mode 0xc0 (sample with channel0)

          interrupt config : 0x40, exceeding the threshold 1 time genterate an alarm conditon

          interrupt  control:  0x0f, enable channel0~3  alarm

          power-up config: 0x60

          As you saying,I set the LLR =0x44,ULR=0x88, and  take more than 2 samples that are below LLR or above ULR,then I check no alarm occurs.

         I am sorry that I  am not clear about the second suggestion,Do you mean setting  ALMCNT[0:2] =001?

  • Hi Yongchao,

    Thank you for sending your register configurations. Are you sampling only once before checking for an alarm?

    There is a small typo in the interrupt configuration register description (INTCONFIG). 0x40 configures the device alarm to trip after two thresholds are crossed. Please program INTCONFIG = 0x20 and test for the alarm triggering when the input is:

    1) Alarm triggered for input below the LLR

    2) Alarm triggered for input above the ULR

    3) No alarm triggered for input between the LLR and ULR

  • Hi sir :

         Thanks for reply.

        I  programed  INTCONFIG  =0x20,   test  result is :

       1.input below LLR   alarm tirggered

       2.input  above ULR  alarm tirggered

       3.input between LLR and ULR, no alarm triggered

      Now I am confused.  what is the meaning of  setting INTCONFIG to 0x20?    .

      According to datasheet Page 30,    No any description about ALMCNT[2:0]  = 001 in datasheet.

      BTW, if I programed  INTCONFIG  =0x40,  I sample more than 2 times  the input below LLR or above ULR alarm triggedred.

                if I programed  INTCONFIG  =0x80,  I sample more than 4 times  the input below LLR or above ULR alarm triggedred.

    It seems  the number of times the comparator threshold limit are doubled.

  • Hi Yongchao,

    I'm glad to hear that the alarm is now triggering in an expected manner. The INTCONFIG description has a small error, which we are working to correct immediately.

    The configuration of the first three bits of INTCONFIG sets the alarm counter. After a certain count is reached, the alarm will trigger. The following is how the first three bits should be configured, and the number of counts before the alarm triggers:

    000 - Every conversion generates an alarm
    001 - Exceeding the threshold limit 1 time generates an alarm condition (i.e. INTCONFIG = 001x xxxx)
    010 - Exceeding the threshold limit 2 time generates an alarm condition
    011 - Exceeding the threshold limit 3 time generates an alarm condition
    100 - Exceeding the threshold limit 4 time generates an alarm condition
    101 - Exceeding the threshold limit 5 time generates an alarm condition
    110 - Exceeding the threshold limit 6 time generates an alarm condition
    111 - Exceeding the threshold limit 7 time generates an alarm condition

    When INTCONFIG =0x40 (or ALMCNT = 010), this actually set the alarm to trigger after a threshold is crossed twice.
  • OK , Now the chip can work well. Thanks a lot.
  • Happy to help. Please let us know if you have any other questions.