This version (22 Jun 2012 19:33) was approved by William Jahn.The Previously approved version (22 Jun 2012 17:49) is available.Diff

Pulse Counter

Click here to return to the Counters page

The Pulse Counter block, counts the number of non-zero inputs it receives. There is a start/stop pin to initiate and pause the count, and also a reset pin to set the count back to zero. Any non-zero input on the pulse input pin, is considered a pulse and will be counted when the count is enabled.

Input Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: Start/Stopint - controlWhen this pin is high, the algorithm is counting the Pulse input. When it is low, the algorithm holds the last count value
Pin 1: Resetint - controlWhen this pin is high, it clears the count value back to zero.
Pin 2: Pulse Inputint - controlInput signal to monitor and count pulses

Output Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: Count Outputint - controlCount Value indicating number of pulses

Algorithm Description

The purpose of the Pulse counter, is to count the number of pulses during a specified amount of time. The time is dictated by the signal on the start/stop pin. When the start/stop pin is high, the algorithm is counting pulses, otherwise the last count value is output. The reset pin clears the count value and counting can resume from 0 whenever the start pin is high.

The graph below shows the interaction between the start/stop and reset pins when a pulse train signal is present on the Pulse Input pin. The reset signal is in red. The start/stop signal is in blue, and the counter output is the second graph in yellow.


The Pulse Counter is very useful to use with the Value Cross Detection algorithm. For an application in which you need to monitor the number of value-crossings (zero-cross counter) during a specified time the two blocks together can help achieve this. The following image uses a sine tone input, on/off switches, Pulse Counter, Readback cell, and GPIO output.

Algorithm Details

Toolbox PathCounters - Counters - Pulse Counter
Cores SupportedAD1940
“Grow Algorithm” Supportedno
“Add Algorithm” Supportedno
Subroutine/Loop Basedno
Program RAM12
Data RAM3
Parameter RAM0
resources/tools-software/sigmastudio/toolbox/counters/pulsecounter.txt · Last modified: 22 Jun 2012 19:33 by William Jahn