代写CSSE2010 / CSSE7201 Assignment 2 Semester 1, 2025代做R编程

School of Electrical Engineering and Computer Science

Semester 1, 2025

CSSE2010 / CSSE7201 Assignment 2

Due: 4:00pm Friday May 30th, 2025

Weighting: 20% (100 marks)

Objective

As part of the assessment for this course, you are required to undertake an assignment which will test you against some of the more practical learning objectives ofthe course. The assignment will enable you to demonstrate your understanding of

•   C programming

•   C programming for the AVR

You are required to modify a program in order to implement additional features. The program is a basic template of an Elevator Emulator (a description is given on page 3).

The AVR ATmega324A microcontroller runs the program and receives input from a number of sources and outputs a display to an LED display board, with additional information being output to a serial terminal and – to be implemented as part of this assignment – a seven segment display and other LEDs.

The version of the Elevator Emulator supplied to you has basic functionality only – it will present a start screen upon launch, respond to button presses or a terminal input ‘s’ to start, then display the  emulator.  A  list  of features  and  their  implementation  details  are  provided  in  “Program Features” . The different features have different levels of difficulty and will be worth different numbers of marks.

Dont Panic!

You have been provided with approximately 2000 lines of code to start with – many of which are comments. Whilst this code may seem confusing, you don’t need to understand all of it. The code provided does a lot of the hard work for you, e.g., interacting with the serial port and the LED display. To start with, you should read the header (.h) files provided along with Elevator- Emulator.c. You may need to look at the AVR C Library documentation to understand some of the functions used.

Academic Merit, Plagiarism, Collusion and Other Misconduct

You should read and understand the statement on academic merit, plagiarism, collusion and other misconduct contained within the course profile and the document referenced in that course profile. You must not show your code to or share your code with any other student under any circumstances. You must not post your code to public discussion forums or save your code in publicly accessible repositories. You must not look at or copy code from any other student. All submitted files will be subject to electronic plagiarism detection and misconduct proceedings will be instituted against students where plagiarism or collusion is suspected. The electronic plagiarism detection can detect similarities in code structure even if comments, variable names, formatting etc. are modified. If you copy code, you will be caught.

Grading Note

As described in the course profile, if you do not score at least 10% on this assignment (before any penalty) then your course grade will be capped at a 3 (i.e. you will fail the course). If you do not obtain at least 50% on this assignment (before any penalty), then your course grade will be capped at a 5. Your Assignment 2 mark (after any penalty) will count 20% towards your final course grade.

Program Description

The program you have been provided with has several C files which contain groups of related functions. The files provided are described below. The corresponding .h files (except for Elevator- Emulator.c) list the functions that are intended to be accessible from other files. You may modify any of the provided files. You must submit ALL files used to build your assignment, even if you have not modified some provided files. Many files make assumptions about which AVR ports are used to connect to various IO devices. You are encouraged not to change these.

Elevator-Emulator.c – this is the main file that contains the event loop and examples of how time-based events are implemented. Here also, you will find the implementation of the elevator and the floors, as well as code that handles the movement of the elevator. You should read and understand this file.

display.h/display.c – this file contains the implementation for displaying the current state of the board. This file contains useful functions for changing the state of the LED matrix.

buttons.h/buttons.c – this contains the code which deals with the IO board push buttons. It sets up pin change interrupts on those pins and records rising edges (buttons being pushed).

ledmatrix.h/ledmatrix.c – this contains functions which give easier access to the services provided by the LED matrix. It makes use of the SPI routines implemented in spi.c.

pixel-colour.h – this file contains definitions of some useful colours.

serialio.h/serialio.c – this file is responsible for handling serial input and output using interrupts. It also maps the C standard IO routines (e.g. printf () and fgetc ()) to use the serial interface so you are able to use printf() etc for debugging purposes if you wish. You must include serialio.h in the relevant file for the functions to work. You should not need to look in serialio.c, but you may be interested in how it works and the buffer sizes used for input and output (and what happens when the buffers fill up).

spi.h/spi.c – this file encapsulates all SPI communication that is used to communicate with the LED Matrix.

terminalio.h/terminalio.c – this encapsulates the sending of various escape sequences which enable some control over terminal appearance and text placement – you can call these  functions  (declared  in  terminalio.h)  instead  of  remembering  various  escape sequences. Additional information about terminal IO will be provided on the course Blackboard site.

timer0.h/timer0.c – sets up a timer that is used to generate an interrupt every millisecond and update a global time value.

Elevator Emulator Description

This assignment involves creating an elevator emulator. The LED Matrix shows four floors in green (referred to as floors 0 through 3) and a 2x3 red LED grid which represents the elevator, on the left-hand side. Note that the X and Y coordinate system used (seen in Figure 1) does not correspond with the X and Y coordinates labelled on the LED Matrix PCB.

Figure 1: Initial layout of elevator emulator (note that pixel positions are referenced from the bottom left)

Travellers appear on each floor and the elevator moves to their floor, picks them up and takes them to their destination floor. The elevator moves up and down and, for the sake of algorithmic simplicity, is only capable of moving one traveller at a time. Each traveller can be one of four colours, with each different colour corresponding to a different destination floor.

In the following example (Figure 2) a light red passenger appears on floor 1. Light red indicates the traveller’s destination is floor 0. The elevator moves to their floor, picks them up and then moves down to the destination. Note that there is a fixed amount of time (defined in code) between each of the frames shown.


Figure 2: Example, moving a traveller from floor 1 to floor 0



热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图