$24
Overview
This assignment covers low level C programming on the AVR architecture, and is the last piece of the applied programming component of the course. You are already familiar with the task: Implement an accurate stopwatch. In fact, the overall speci cation of the program is identical to assignment 3; the only di erence is that your implementation must be written in C instead of assembly.
Consult the assignment 3 speci cation for details on the expected functionality of the program.
Section 2 below describes the evaluation process for this assignment.
Evaluation
Submit all .c and .h les needed to assemble your assignment electronically via conneX (including all of the necessary LCD library les, even if you did not modify them). Your code must compile, upload and run correctly on the ATmega2560 boards in ECS 249 using the toolchain and method-ology described in Lab 7. If your code does not compile as submitted, you will receive a mark of at most 2.
If your implementation is not written in C, or does not use the C programming environment covered in Lab 7, you will receive a mark of zero.
This assignment is worth 6% of your nal grade and will be marked out of 12. The evaluation will not be demo-based.
The marks are distributed among the aspects of the assignment as follows. The distribution of marks between components is given in the table below. Note that most of the entries refer to sections of the assignment 3 speci cation.
1
Marks
Aspect
6
The basic, non-interactive timer described in Section 2 of the A3 speci cation func-
tions correctly with reasonably accurate timing (such that a human observer cannot
notice any discrepancy). Timing functionality must be implemented using one of the
hardware timers, not software delay loops (including the _delay_ms function).
1
The timing is theoretically accurate to within 1 second out of 10 minutes when the
16Mhz system clock is assumed to be exact.
1
Global variables are used only for global, persistant data (such as the active timer
state). Local variables are used for all other data and temporary storage.
1
The SELECT button correctly implements the start/stop feature described in Section
3 of the A3 speci cation. The code must ensure that a single press of the button be
read only once (regardless of how long the button is held down).
1
The LEFT button correctly implements the clear feature described in Section 3 of the
A3 speci cation.
1
The UP button correctly implements the ‘set lap’ feature described in Section 4 of the
A3 speci cation. Note that unless the display of lap times is correct, it is impossible
to evaluate this component (and the component below).
1
The DOWN button correctly implements the ‘clear lap’ feature described in Section 4
of the A3 speci cation.
Your code should be readable and, at minimum, contain header comments for each function (except main) describing the purpose of the function (and its arguments and return value, if applicable). You should also ensure that your source les contain header comments with your name and student number. If your code does not meet this criteria, a deduction of up to 2 marks may be applied.
You are permitted to delete and resubmit your assignment as many times as you want before the due date, but no submissions or resubmissions will be accepted after the due date has passed. You will receive a mark of zero if you have not o cially submitted your assignment (and received a con rmation email) before the due date. Ensure that each submitted le contains a comment with your name and student number.
Ensure that all code les needed to compile, upload and run your code in ECS 249 are submitted. Only the les that you submit through conneX will be marked. The best way to make sure your submission is correct is to download it from conneX after submitting and test it. You are not permitted to revise your submission after the due date, and late submissions will not be accepted, so you should ensure that you have submitted the correct version of your code before the due date. conneX will allow you to change your submission before the due date if you notice a mistake. After submitting your assignment, conneX will automatically send you a con rmation email. If you do not receive such an email, you did not submit the assignment. If you have problems with the submission process, send an email to the instructor before the due date.
2