Question: Problem 7 How fast can you go!! The aim is to see how many button pushes you can press in 5 seconds. The momentary button

Problem 7

How fast can you go!!

The aim is to see how many button pushes you can press in 5 seconds. The momentary button PA0 is the push button, PA1 is reset button.

To start, push PA0 and keep pushing until the display stops responding, (after 5 seconds) Every downward press should increment the count displayed on PORTC ( note make sure a button release is not counted)

After 5 seconds, stop counting and wait for the reset button to be pressed then clear the count and display.

appear on PORTC, after 5 seconds, the will not incrementThe

use the delay function _delay_ms(1) to time 5 seconds;

NB, in order to use the momentary buttons on the application board, set PE1 to 0, PE0 to 1. Note the button is active low.

PORTC display the numbers

PINA0 start

PINA0 reset

please use AtmelStudio to do structure diagram, C codes, State machine diagram and its C code

Thanks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!