Programming in C

 Home / MG2I-C0108
Programming in C

Course Rationale

A comprehensive understanding of Low Level Programming allows engineers to implement efficient and

resilient software within computer based solutions as well as providing a strong grounding in the various

microprocessor/microcontroller architectures available. The ‘C’ low level programming language is a

widely used and versatile general purpose computer programming language found in many engineering

applications such as Embedded Computing. It has many derivatives within areas such as GUI

development, gaming and control.

Pre-Requisites

The learner should have these skills or prior knowledge to be able to follow the course with success, however if entry

requirements are satisfied admission into the course will still be allowed. 


  • General computer skills.
  • Knowledge of some programming background can help too.

Unit Description

A comprehensive understanding of Low Level Programming allows engineers to implement efficient and

resilient software within computer based solutions as well as providing a strong grounding in the various

microprocessor/microcontroller architectures available. The ‘C’ low level programming language is a

widely used and versatile general purpose computer programming language found in many engineering

applications such as Embedded Computing. It has many derivatives within areas such as GUI

development, gaming and control.

This is a skills based unit and will allow learners to demonstrate they have the necessary skills to be

able to design, program and test ‘C’ based low level programs for various applications. The unit will

guide learners through the principles of constructing programs using libraries, header files and pre-

processor directives, working with data types and data management as well as dealing with memory

management, interrupts, Networks and Files. This unit is a continuation from Programming Concepts 1

(Level 4) and it is expected that Learners will be familiar with this unit’s content.

Learning Outcomes

On completion of this unit the student will be able to Outcome 1 concentrates on the typical requirements for embedded low level programs. The learner will familiarise themselves with the process of compiling and linking ‘C’ programs including libraries as well as using header files and pre-processor directives. The learner will also use an Integrated Development Environment tool set to test and debug code.

Outcome 2 focuses on dealing with the application structure and code logic of a ‘C’ program. Learners will use a range of data types and manipulate them using common ‘C’ commands including bitwise logic and arithmetic operations as well as string manipulation.

Outcome 3 emphasises flow control, arrays and pointers. Learners will build an understanding of various flow control techniques including, if-else, switch-case, while and for loops as well as investigating types of arrays and pointer, their construction and manipulation.

Outcome 4 highlights the implementation of functions or subroutines. Learners will also demonstrate their mastery of the Unit by developing a ‘C’ language program implementing all of the features they have studied in order to solve a specified engineering problem.

Unit Content

1. Construct a viable Low Level Language development environment (‘C’).

Understand the typical features found within a low level (‘C’) Integrated Development

Environment (IDE):

· Project space management

· Program editor

· Build tools (Compiler, Linker, Libraries)

· Debug tool-set (Hardware interface, Run tools, Watch)

Use relevant header files and pre-processor and directives:

· Pre-processor directives (#include, #define, #ifndef)

· Pragmatic statements (pragma)

2. Demonstrate the ability to manipulate various data types using arithmetic means

Use relevant mobile ‘C’ program concepts and commands to manipulate data:

· Use of variables, data types, sizes and type conversions

· Bitwise operations

· Arithmetic operations 

3. Produce ‘C’ programs with the ability to change flow and use data structures

Use relevant mobile ‘C’ program concepts and commands to implement looping, conditional flow control and pointer & array manipulation:


  • Looping (for, while)
  • Conditional selection (if-else, switch-case)
  • Array initialisation and management
  • Pointer initialisation and management
  • Creation and use of appropriate data structures

4. Construct ‘C’ programs using subroutine structures (functions)

Use relevant mobile ‘C’ program concepts and commands to arrange ‘C’ program functionality into appropriate subroutine functions:


  • Function declaration and implementation
  • Produce a solution to engineering problem (code development and documentation)

Assesment Method

This Unit contains an essential mix of theory and practical based activities. To ensure learners have a strong basis in the fundamentals of the topic it is vital that each individual topic introduced is backed up with practical examples and tasks to secure Knowledge and Understanding. As such it is assumed that the appropriate tools are available to learners at lecture time or in associated lab time. It would also be beneficial for learners to have access to programming tools either at home or at the Centre. As such any development environment should be chosen suitably. Where appropriate individual topics should be introduced in relation to previous outcomes in order to build upon previous learning throughout the Unit. Outcome 1 – Mixes theoretical and practical requirements. This outcome will be delivered through a number of lectures, in-class discussions with a final laboratory exercise. Students will complete the assessment tasks in the classroom under lecturer supervision and guidance. It is suggested that students build up a portfolio of assessment materials throughout the unit. Outcome 2, 3 and 4 – These outcomes will be delivered through a number of lectures and hands-on lab sessions with a set of mini tasks. It is recommended that students discuss/work in groups when developing solutions to mini tasks but should work independently when being assessed. Recommended assessment would be an in-lab, supervised, system and program development with demonstration of working program and commented code print-out for validation.



 


js files