Accessibility statement

Programming and Digital Interfacing - ELE00042C

« Back to module search

  • Department: Electronic Engineering
  • Credit value: 20 credits
  • Credit level: C
  • Academic year of delivery: 2023-24
    • See module specification for other years: 2024-25

Module summary

This module will introduce you to the power of programming, and how it can be used as a tool to help create interactive engineered systems. We will start from the very beginning, looking at the basics of programming, before moving on to look at more advanced concepts and techniques, using a restricted subset of the C++11 programming language.

We’ll be programming a microcontroller, designed to be embedded inside other systems. Alongside the programming, we will look at interfacing - the process of getting signals into and out of the microcontroller - reading inputs such as buttons, switches and sensors, and driving devices like LEDs and motors.

Module will run

Occurrence Teaching period
A Semester 1 2023-24

Module aims

Subject content aims:

  • To introduce programming as a tool for creating systems with embedded processors

  • To introduce imperative programming, structured programming, and object-oriented programming

  • To introduce event-driven and concurrent (multi-threaded) programming techniques

  • To introduce a subset of the features of the C and C++ languages

  • To introduce various types of simple interface, including GPIO, ADC and synchronous serial

  • To introduce binary and hexadecimal number representations, including 2’s complement binary representation, to provide context for choosing integral data types and for GPIO interfacing

  • To introduce the basics of CPU architecture, including a simple memory model, to provide context for learning about pointer types

  • To provide experience with creating small embedded systems using a subset of C++11 and the Mbed OS platform

Graduate skills aims:

  • To develop skills in numeracy, number base conversion and numerical equivalence

  • To develop critical thinking and problem solving skills

  • To develop writing skills

Module learning outcomes

Subject content learning outcomes

After successful completion of this module, students will:

  • Be able to explain the basics of imperative programming, and of structured and object-oriented approaches

  • Be able to describe C/C++ syntax, and a variety of C/C++ keywords and structures

  • Be able to explain binary and hexadecimal number representations

  • Be able to describe how a CPU functions at the basic block level, and how memory is organised in a typical microcontroller

  • Be able to design and develop small embedded systems using C/C++

  • Be able to discuss how signals get into and out of microcontrollers, and how to choose a suitable interface for a given task

Graduate skills learning outcomes

After successful completion of this module, students will:

  • Be able to write about basic technical concepts concisely and accurately

  • Be able to think creatively about designing solutions to problems

Module content

Programming:

Introduction to programming as a concept

Imperative programming, statements and execution (high-level), syntax

Expressions, operators, literals, variables and types

Conditions, conditional statements, loops

Pointers and arrays

Functions, parameters, return types, lexical scope, structured programming

Object-orientation, classes and objects

Projects and packaging (effective use of source and header files)

Event-driven programming

Concurrent programming, including the use of deferred execution of interrupt-triggered code

Interfacing:

Basic GPIO, first bitwise, then wider (LEDs, buttons and switches, other simple digital peripherals)

Debouncing and Schmitt trigger inputs

Pull-up and pull-down resistors on inputs, open-drain outputs, etc.

ADC

I2C or SPI, depending on the available hardware

Other related:

Binary and hexadecimal number representation

Overview of CPU architecture and memory organisation

Indicative assessment

Task % of module mark
Essay/coursework 100

Special assessment rules

None

Indicative reassessment

Task % of module mark
Essay/coursework 100

Module feedback

'Feedback’ at a university level can be understood as any part of the learning process which is designed to guide your progress through your degree programme. We aim to help you reflect on your own learning and help you feel more clear about your progress through clarifying what is expected of you in both formative and summative assessments. A comprehensive guide to feedback and to forms of feedback is available in the Guide to Assessment Standards, Marking and Feedback.

The School of PET aims to provide some form of feedback on all formative and summative assessments that are carried out during the degree programme. In general, feedback on any written work/assignments undertaken will be sufficient so as to indicate the nature of the changes needed in order to improve the work. The School will endeavour to return all exam feedback within the timescale set out in the University's Policy on Assessment Feedback Turnaround Time. The School would normally expect to adhere to the times given, however, it is possible that exceptional circumstances may delay feedback. The School will endeavour to keep such delays to a minimum. Please note that any marks released are subject to ratification by the Board of Examiners and Senate. Meetings at the start/end of each term provide you with an opportunity to discuss and reflect with your supervisor on your overall performance to date.

Indicative reading

Reading materials to be provided in class



The information on this page is indicative of the module that is currently on offer. The University constantly explores ways to enhance and improve its degree programmes and therefore reserves the right to make variations to the content and method of delivery of modules, and to discontinue modules, if such action is reasonably considered to be necessary. In some instances it may be appropriate for the University to notify and consult with affected students about module changes in accordance with the University's policy on the Approval of Modifications to Existing Taught Programmes of Study.