Question: 3. The Task The objective of this assignment is to implement a reaction test timer using the ARM development board. 3.1. Operation The reaction timer
3. The Task
The objective of this assignment is to implement a reaction test timer using the ARM development board.
3.1. Operation
The reaction timer displays the time it takes for the user to react to an LED being illuminated. It displays the time in seconds to an accuracy of one thousandth of a second.
On start-up or after a reaction test has completed, LED 1 should flash to indicate Button 1 is to be pressed to start the next reaction test.
When Button 1 is pressed, the display is zeroed; all the LEDs are turned RED and begin to count down (turn off) at the rate of one per second. The count down can be from left to right or right to left.
3
When the last LED turns off a random LED is lit (turned GREEN) indicating the button that should be pressed to stop the count on the display. At the same time the display begins counting, showing the elapsed time.
When the indicated button is pressed the display stops counting. The timer is ready for the next reaction test (returns to step 1).
If the user presses any button other than the button indicated by the LED the count should continue. If the user fails to react, the count stops at 9.999 seconds.
If the user presses one or more buttons before the countdown of LEDs finishes, the countdown is suspended until all the buttons are released.
Video of the whole operation: Look Assignment 1 - video under Coursework on Moodle to have a better understanding of what you need to achieve.
3.2. Method
The reaction timer should use the Programmable Interval Timer (PIT) to ensure an accurate time period and the SevenSegmentDisplay library to turn the OLED display into a 4-digit seven-segment display device. Lab 5 has introduced these concepts so would be good to revisit it if needed.
You will need to create or use functions to read the state of the Buttons and set the colour of the LEDs. If you wish you could use the provided Button and LED libraries. You have used these libraries through various labs (Lab 1 to Lab 5) so would be good to revisit them if needed.
3.3. Assessment
You will be assessed on the source or pseudo code you submit. Before the deadline, you are asked to demonstrate your code to the modular supervisor or GLA in the lab for on campus students. For remote students, you may be asked to explain your work as part of the assessment. When you are ready for demonstration, just let us know.
Marks will be awarded as follows:
Q1: Well Commented Code (10%) All the functions and other components in the code should be well commented,
describing their purpose and operation. Specially you need to provide detailed
4
comments on how to implement each part of Display Functionality (Q3) and Button/LED Interface (Q4)
Q2: Well Structured Code (10%)
All the code (source or pseudo) produced should be well structured and use appropriate layout and control statements. Use of 'cut and paste' to replicate statement rather using a more recognised approach will result in a lower mark.
Q3: Display Functionality (30%) The marks for the Display Functionality logics are made up as follows:
Use of PIT interrupts (5%) Display of elapsed time (5%) Reaction Time count stops at 9.999 (10%) Accuracy of Reaction Time count (10%)
Q4: Button/LED Interface (40%) The marks for the Button/LED Interface logics are made up as follows:
Implementation of Button functions (10%) Implementation of LED functions (10%) Flashing LED start indicator (10%) 'False Start' detection stops countdown (10%)
Q5: Implementation Quality (10%) This will evaluate your ways to implement the functionality. A higher mark will
be awarded for novel implementations.
Also: Chip is AT91SAM7S. The above implementation should be done using C language on eclipse software
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
