3 Replies Latest reply on May 4, 2017 1:15 PM by MarkS_11


      hi every one 


      i want to calculate the number of pulse of a signal, u think that is possible with this example by using juste only an input +interruption and than count the number of rising edge ....?


      thank u every one ^^ 

        • 1. Re: input+interruption

          Counting the pulses that way will work when the frequency is not too high (< 2-3kHz). At higher frequencies you will need a counter. For your current project, using a counter (that can be reset by pressing a switch) will make some things easier.





          • 2. Re: input+interruption

            i totally agree with you, just was wondering if their is any easy solution to realize the project just only with a pine +isr but actually ill work with a higher frequency sow is better to use a counter, u can tack a look for wath i did if you want ^^, is worked with a counter.

            • 3. Re: input+interruption

              As Bob says, I would configure a TCPWM component as a Timer/Counter with the count input enabled and set to rising edge. Connect the pin to that terminal and a fast clock (fast compared with the counting frequency) to the clock input. The TCPWM is 16 bits wide so you have 65535 counts before it overflows.

              1 of 1 people found this helpful