3 Replies Latest reply on Nov 12, 2011 11:19 AM by gautamd_

    Timing a signal using a Counter




      I just cannot seem to understand how the Counter component works. It seems simple, and yet my design doesn't work.


      I have an input pin connected to a signal which is low most of the time, but occasionally sees high pulses lasting a few tens of milliseconds. These occur at random intervals.


      What I would like is to keep a count of the total high time of this signal, and generate an interrupt when it passes some threshold.


      I have attached an image of my schematic. The counter is configured as a UDB down counter, period 200, interrupt on TC.


      Please set me straight.