This version (02 Aug 2012 16:52) was approved by William Jahn.

Push and Hold

Click here to return to the GPIO Conditioning page

This block can be used for functions like a pushbutton, to condition a GPIO input to create pulses in response to the user pushing or holding the button.

A typical application would be a volume control comprising two buttons, one for up and the other for down.

  1. Drag the block into the workspace.
  2. Right-click it and select the algorithm:
    • push_hold
    • push/hold 2-in 2-out
    • push/hold with two-button mute
  3. Set the parameters to fit your application:
Hold (ms)Determines how long the signal is held before the repeat pulses are generated.
Repeat (ms)Sets the interval between repeated pulses. Enter the time in milliseconds in the field.

Note: For the picture above right, push_hold was selected. Use push/hold 2-in 2-out to condition two GPIO inputs, for example one up and one down. Push/hold with mute works the similarly but with the extra feature that if both buttons are pressed, a mute pulse is generated (bottom output pin). To un-mute, any of the buttons can be pressed.

resources/tools-software/sigmastudio/toolbox/gpioconditioning/pushandhold.txt · Last modified: 03 Jan 2013 20:42 (external edit)