首页 > > 详细

辅导C++程序语言、辅导program编程

Microcontroller Programming – Assignment 2 – Remote
This assignment is due on Sunday the 31st of October at 23:59.
• This is an individual assignment.
• You are expected to submit 2 files via MyUni.
– A report with a filename of ‘a1234567’ in ‘.pdf’ format.
– A folder titled ‘a1234567’ in ‘.zip’ format.
This folder that contains all project files created by the Keil IDE. In addition, your project must be
saved-as ‘a1234567’ and within each ‘.c’ and ‘.h’ file you must write your student number.
• Your report will be checked for plagiarism with Turnitin.
• We have methods to check for plagiarism of the code.
• You will be assessed based upon the rubric on MyUni.
I. INTRODUCTION
Peak Ground Acceleration (PGA) is a measure of the severity of an earthquake. The magnitude 9 Tohoku quake
of 2011 had a PGA of 2.99g. Earthquake shaking generally occurs in all three directions (PGA is often split into
the horizontal and vertical components) and the 3-axis data is important for earthquake engineering. Damage to
buildings and infrastructure is related more closely to ground motion, of which PGA is a measure, rather than the
magnitude of the earthquake itself.
II. SPECIFICATION
A digital seismometer is to be designed that measures 3-axis accelerations and transmits that data over a serial
interface to a desktop personal computer.
TABLE I. The data sheet of the 3-axis accelerometer. All channels have the same properties.
Supply Voltage Range Offset (0g voltage) Sensitivity
5V ±2g 2.5V 1V/g
The sensor provides 3 analogue outputs, with the voltage directly proportional to acceleration for each of the 3
axes. The microcontroller to be used is the C167, and each of the 3 analogue voltages needs to be connected to an
individual channel on the ADC. The serial port of the C167 is to be used to stream the acceleration data as ASCII
text with 2 decimal places. A comma should separate each axis and a set of 3 readings should be followed by a
carriage return character (ASCII code 13 decimal), for example:
Serial Window
1.10, 1.34, −0.84
−1.24, 0.65, 1.22
...
Each set of 3 ADC readings should be converted as fast as possible in order to minimize the time skew between
the 3 axis readings. The data needs to be transmitted before the next set of readings. There should be a 0.1s delay
between subsequent sets of readings and this process should be repeated continuously.
NOTE: The lectures, tutorials, and ‘KeilC167 self paced labs’ document has examples of how to configure and
operate all the necessary peripherals. You may also be able to re-use some of your code (if it was modular and/or
extensible) from Assignment 1.
2
III. ASSESSMENT
In order to know exactly what is required for your code and report, you should refer to the rubric on MyUni. This
may be subject to minor changes, only for the purpose of clearing up any possible confusion. A summary is below.
Your code and flowcharts (50%) are marked independently of the functionality and report (50%). This means the
person marking your code will not see your report - you need to ensure that they understand what your code is trying
to achieve. The person marking your report will not see your code - you will need to convince them that your code
works.
• 10% Flowcharts
• 40% Code
• 20% Functionality
• 30% Report
IV. REPORT STRUCTURE
You report is to be structured as below. Use the rubric to determine the amount of time investment you should
make in each section. There is two exemplar reports available on MyUni for you to get a gauge on the expected
quality. Do not assume these reports received full marks as the rubric has changed.
• Introduction - What are you doing?
• Specification - How are you doing it?
• Assumptions - What are you assuming in order to complete this task?
• Conceptualisation - Flowchart & optional pseudo-code
• Implementation - What are your ‘.c’ and ‘.h’ file names? What does each do? What registers are you using?
• Operation - Screenshots of your program outputs at each stage of your flowchart. Demonstrate the functionality
of your code with simulated inputs for all output states.
• Discussion - Are there any limitations to this program? Are there any changes you would make?
• Conclusion - Did you complete the project? How did you complete it? Are there any notable outcomes? How
extensible is your solution?

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!