Push-On/Push-Off Buttons

Design Challenge, Problem 1

Push-On/Push-Off Buttons

Design Challenge, Problem 1

Write the code that converts the three momentary contact pushbuttons to operate as push-on/push-off buttons and that satisfies the following specifications:

  1. The state of the three buttons is displayed on LED1 through LED3.
  2. The function provides for a 20 ms debounce period.
  3. The new button state is reported at the start of the 20 ms debounce period.
  4. The button polling function is non-blocking during the 20 ms debounce period.


  • Other product and company names mentioned herein are trademarks or trade names of their respective companies. © 2014 Digilent Inc. All rights reserved.