COMP06189 2013 Introduction to Programming for Mechatronics
This module is a basic introduction to programming techniques. Programs are created graphically using flowcharts. In some instances a short segment of high level code such as C may be inserted into a flowchart. These programs are tested on a microcontroller simulator. Then an actual device is programmed and tested in real time. A typical example of such a device is a robotic buggy with basic sensors and actuators. The purpose of this module is to provide engineering students with a practical application-driven introduction to programming prior to embarking on writing high level code.
On completion of this module the learner will/should be able to;
Convert between decimal, binary and hexadecimal number systems.
Explain how data types, constants and variables are used in computer programming.
Construct a program in the form of a flowchart and / or short segment of high level code.
Write programs / flowcharts to read inputs, process them and write outputs.
Test programs / flowcharts by compiling them, simulating them and downloading them to a microprocessor-based device.
Teaching and Learning Strategies
It is proposed that a workplace engagement component will be introduced to this module via a guest lecturer from industry, an industrial site visit or a work-based assignment where possible.
Number Systems and Codes: Decimal, Binary, Hexadecimal and ASCII.
Data Types: Bit, Byte, Integer, Floating Point, Signed and Unsigned, String.
Constants and Variables.
Programs and Flowcharts.
Memory: Code and Data Memory.
Functions: Component macros.
Inputs: Flowchart to read digital inputs from a bank of switches, a keypad or an ADC to a microprocessor device.
Loops: Conditional and unconditional while loops, Connection Points.
Decisions: If statements and switch statements.
Calculations / Processing: Arithmetic, Modulus, Logical, Shifting, Masking.
Timing: Flowchart with time delays to debounce switches, multiplex seven segment displays and drive servo / stepper motors.
Outputs: Flowcharts to write digital outputs from a microprocessor device to a bank of LEDs, seven segment displays or an LCD.
Computer File System: Flowchart to read a file from and write a file to a memory card.
Integration of Code: Insertion of a small segment of C code into a flowchart.
Testing: Compilation, Simulation and Downloading of Programs to a basic robotic buggy.
Coursework & Assessment Breakdown
|Title||Type||Form||Percent||Week||Learning Outcomes Assessed|
|1||Practical Evaluation Lab Exercises||Continuous Assessment||UNKNOWN||50 %||OnGoing||3,4,5|
|2||Continuous Assessment Quizes||Continuous Assessment||UNKNOWN||20 %||OnGoing||1,2,3,4|
|3||Practical Evaluation Practical Exam||Continuous Assessment||UNKNOWN||30 %||End of Term||3,4,5|
Full Time Mode Workload
|Lecture||Flat Classroom||Theory Lecture||1||Weekly||1.00|
|Laboratory Practical||Engineering Laboratory||Practical||2||Weekly||2.00|
Flowcode software installed in Electronics labs.