5.4k views
4 votes
Assume you have a button which is subject to bounces which last 10-20ms. An actual button press lasts between 100 and 150 ms and two button presses are separated by at least 300 ms. The system should turn on an LED while the button is pressed and turn it off when the button is released. It should not react to bounces. Assume a sampling rate of 30 ms. Draw a state machine which represents this system (button presses with values of 0 or 1 are your input, and the LED being 1 (on) or 0 (off is our output).

User AjV Jsy
by
4.5k points

1 Answer

4 votes

Answer:

Step-by-step explanation:

The finite state machine that represents this system (button presses with values of 0 or 1.

It should be noted in computer science that information are majoly decoded in binary in the form of 1 or 0.

1 = on

0 = off.

Please find attached diagram illustrating the state machine.

Assume you have a button which is subject to bounces which last 10-20ms. An actual-example-1
User Kuldeep Sakhiya
by
4.1k points