Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


ENCE260 Embedded Programming Assignment


1. Introduction

You are to write a single board game1 for your UCFK4 microcontroller boards, using the API functions provided. The goals of the assignment are:

1. To program a small-scale embedded system.

2. To use the API modules provided to abstract hardware dependence.

3. To structure the program in multiple C modules.


2.General instructions

1. You will be allocated a project partner by Learn's booking system in Week 3 of Term 4. It is your responsibility to check the details of your lab partner and contact him or her as soon as possible. Your group is registered so each group will have an individual group number. Your git repository name is based on your group number. Login to your git repository and start using it from Week 3. Your code cannot be marked if it is not in your group’s repository. Contact Richard Clare ([email protected]) if you haven’t been allocated a partner by Week 3 or haven’t been able to contact your partner.

2. Develop a single board game for the UCFK4 using the navswitch, pushbutton, and display.

3. Demonstrate your program during your lab session during the last week of Term 4. The first hour of the lab session is for you to set up. You may volunteer to have your assignment marked in the first hour. Otherwise, in the second hour, when the lecturer or TA asks you to demonstrate your game, you need to be ready to demonstrate.

4. Perform a final commit of your program source code to your git repository before the end of your demonstration session. The git repositories will be cloned at the end of the demonstration session.

5. You are encouraged to use the existing API functions in \utils , \drivers, and in \drivers\avr such as pio, timer and tinygl. You cannot use the code in \utils\boing.c and \utils\boing.h.

6. Both members of a group receive the same mark regardless of the contribution. Both members have to attend the demonstration to both be awarded a mark, except if one of the members is affected by local Alert level (eg in Auckland) or is sheltering at home due to a medical condition.


3.Program submission

1. Ensure each of your source modules have both group members’ names and usercodes in a banner at the top of each source file. Your code will be assessed in terms of documentation.

2. Place all your final application modules in your git cloned directory: /ence260-ucfk4/assignment/group-XXX, where XXX is your group number, e.g., group-132 (do not create any subdirs in the dir). By doing this you will be able to periodically push your source files directly from your group-XXX directory to your repository. Better still, the marker will be able to compile your game using your Makefile that provides relative (from your build directory) dependences.

3. Ensure that you have a working Makefile that will build your program. Note that a template is provided. Also note that marks will be lost if your application cannot be built by running make from the files in your repository.

4. Provide a readme file with instructions on how to play your game.


4. Assessment

Your programs will be compiled, checked for compiler warnings and errors, and vigorously checked for plagiarism against other groups from this and previous years and the /apps dir. Marks will be based on the following:

1. How well your program works during a short inspection

2. The complexity and originality of your game. If the game already exists in the /apps dir then it will not be considered particularly original.

3. The modularity of your programs.

4. The readability of your programs (consistent formatting, commenting/documentation, avoidance of embedded constants or magic numbers, consistent naming).

5. The use of git for version control in the project, and the README to describe how to play the game.

The marking rubric for the assignment (demonstration and source code) is available on Learn. The demonstration and source code are weighted equally (ie both are worth 5% of your final grade).


5. Plagiarism

Every year we detect plagiarism in this assignment. We use software to check your source code with material on the web (github etc.), and all groups from this and previous years, and the /apps dir. Any plagiarism will not only result in zero marks being awarded for this assignment, but a referral to the University Proctor who has the power to suspend or terminate your enrolment at this university. You may use other code (such as the API functions provided) if you acknowledge who wrote it. In simple terms, you may not use any part of any other group's code.


6. Suggestions

Programming is fun but not if you leave it to the last minute.

Look at the example apps (in /apps) and the header examples, i.e., pacer.h, button.h, tinygl.h, ir serial.h, etc.

1. Look at the on-line documentation on Learn and the ECE wiki.

2. Write a number of simple test applications, using one of the simple example applications (such as updown2) as a template.

3. Follow a consistent coding style.

4. You don't have a lot of memory (RAM or EEPROM) to play with, so keep things simple.

5. Ensure you commit your game regularly to your git repository.


6. Documentation

Documentation for the UCFK4 can be found at: http://ecewiki.elec.canterbury.ac.nz/mediawiki/index.php/UCFK4