Site Sections => About Us | Consultancy | Training | Software | Publications | Open Source | Support | Open Standards | FAQ | Jobs
Site Style Info

Introduction to C Programming for Embedded Systems — A 5-day Course

Synopsis

This course discusses C programming in the context of implementing C applications for 8 bit and 16 bit micro-controller architectures. A distinction is made between pure ANSI C programming and use of pragmas and extensions as found with various embedded C compilers targeted at specific microcontrollers. General ANSI C programming is taught using a PC oriented IDE such as Microsoft's Visual Studio or the GCC compiler under Eclipse. Embedded target specific aspects are illustrated using one or more C compilers for PIC16, PIC18 and PIC24 / dsPIC architectures.

You will also learn basic techniques for mixed C and Assembler programming. The hands on exercises also cover the use of simulation, debugging and In Circuit Debugging techniques, as well as techniques for In System Programming.

Course Objectives

Students successfully completing this course will have a sound understanding of C programming. You will understand the basic C data types, arrays and pointers. You will have a good appreciation of data structures and their uses, and the use of pointers to data structures and arrays of data structures. You'll learn how to use arrays to implement circular buffers and how to use them, and how to use arrays to implement stacks, and the uses of software stacks.

You will also be introduced to basic techniques of memory management and programming with dynamic data structures - being able to implement circular buffers and stacks using singly linked and doubly linked lists. You'll also learn techniques for implementing interrupt handler code in C, multi-module programming including applications containing a mixture of C and assembly language modules, and techniques for manipulating hardware registers and special function registers.

Suitable for

Programmers and engineers who already have some understanding of programming and who now wish to gain a solid understanding of the use of C for embedded systems software development.

Prerequisites

  • Attendees should have a basic knowledge of programming and computers. No previous knowledge of the C language is assumed.

Delivery

This is instructor led C training. Each section of the material covered by the tutor is followed by hands-on practical exercises for which worked examples of the solutions are typically provided.

Scheduled and On-site Courses

Courses in this subject are scheduled on an 'ad-hoc' basis. We can arrange a course at our Carshalton centre or on customer site for any client wishing to send two or more delegates on the same course.

For courses at the Carshalton Centre the fee will be:

  • £3500 + VAT for the first two delegates
  • £1650 + VAT for the third delegate
  • £1200 + VAT for the fourth delegate
  • £400 + VAT for each additional delegate to a maximum of eight

On-site course fees are as above + expenses recharged at cost.

For a 1:1 course in Carshalton the fee is £2750 + VAT. For a 1:1 on-site course the fee is £2750 + VAT + expenses recharged at cost.

If there are any dates showing below this line, a course has been scheduled and places for individuals are available at £1750. Otherwise, no courses are currently scheduled and the above fees apply.


Contents

An Introduction to C

Basic data types

  • Integer types
  • Floating point types
  • Pointers (pointer arithmetic, pointer derefencing)
  • Arrays
  • The relationship between arrays and pointers
  • Enums

Programming constructs

  • if - else statements
  • switch statements
  • while loops and do - while loops
  • for loops
  • goto statements

Functions in C

  • Function prototypes
  • Understanding C's call by value mechanism for passing arguments
  • Implementing functions
  • Calling functions
  • Using pointers to pass values by reference
  • Passing arrays to functions
  • Understanding C's return value mechanism
  • Using pointers to return values by reference

Data Structures

  • Defining data structures
  • Accessing and manipulating the elements of a data structure
  • Pointers to data structures
  • The arrow (->) operator
  • Using a pointer to traverse an array of data structures

Advanced topics

  • Pointers to pointers
  • Function pointers
  • Const and static keywords - their meanings and uses
  • Casts and casting
  • Using void * pointers
  • Data structures containing pointers to data structures
  • Data structures containing function pointers
  • Function pointers and table driven programming
  • Bit fields in data structures
  • Unions
  • Using arrays to implement circular buffers and stacks
  • Modules as data structures and interfaces
  • Dynamic data structures and their uses
    • Singly linked lists
    • Doubly linked lists

Overview of the C standard library

  • putc, putchar, getc, getchar
  • printf, scanf
  • String manipulation functions ( strcpy, strcat, ... )
  • Embedded System Oriented Topics
  • Setting up port addresses
  • Defining bit oriented data structures
  • Compiler specific features
    • #pragmas
    • Non ANSII C extensions
    • Accessing and manipulating special function registers
    • Implementing interrupt handlers
    • Calling assembly code from C
    • Calling C from assembly code
  • Linkers and linker scripts
  • Understanding target peripheral device libraries and their uses
  • Implementing your own device libraries
  • Timers and their uses
    • Hardware timers
    • Software timers

Basics of event driven programming

  • Port I/O - flashing LEDs
  • Software delays
  • Keypad scanning
  • Basic RS232
  • Basic data acquisition and sensor interfacing
  • Working with EEPROM (on chip and SPI/I2C)

C training UK prices

For publicly scheduled training (individual places), see our UK training schedule.

In-house training for company groups is charged at a daily rate per group — see our In-House UK Training Guidelines.

Publicly Scheduled Training Locations

We currently run public training courses in the following locations:

  • London, UK
  • Leeds, West Yorkshire, UK
  • Birmingham, West Midlands, UK
  • Carshalton, Surrey, UK
  • Chester, North West, UK
  • Coventry, West Midlands, UK
  • Edinburgh, Scotland, UK
  • Glasgow, Scotland, UK
  • Harwell, Oxfordshire, UK
  • Manchester, North West, UK
  • Milton Keynes, Buckinghamshire, UK
  • Newark, Nottinghamshire, UK
  • Reading, Berkshire, UK
  • Slough, Berkshire, UK
  • Stevenage, Hertfordshire, UK
  • Wakefield, West Yorkshire, UK
  • Wokingham, Berkshire, UK

Most UK public training courses are available on a monthly basis.

Please see the individual course outlines or our public training schedule for details.

In-house (on-site) training locations

We deliver in-house courses at client premises and/or training facilities in any part of the world which is practically and commercially accessible.

Our In-house training guidelines outline our basic requirements and our UK pricing structure. To estimate costs for training in other countries, simply convert to your local currency and then make a rough calculation of our tutor's costs for travelling to and staying at your location.


West Yorkshire Office

GBdirect Ltd
Training Division
Bradford Design Exchange
34 Peckover Street
BRADFORD
BD1 5BD
West Yorkshire
United Kingdom

training@gbdirect.co.uk

Training: 0800 651 0338
General: +44 (0)870 200 7273
Finance: +44 (0)1353 615 174

Please call between 0900 and 1700 (UK time) on Monday to Friday


South East Regional Office

GBdirect Ltd
Training Division
18 Lynn Rd
ELY
CB6 1DA
Cambridgeshire
United Kingdom

training@gbdirect.co.uk

Training: 0800 651 0338
General: +44 (0)870 200 7273
Finance: +44 (0)1353 615 174

Please call between 0900 and 1700 (UK time) on Monday to Friday


Please note:
Non-training enquiries should be directed, initially, to our UK national office in Bradford (West Yorkshire), even if the enquiry concerns services delivered in London or South/East England. Clients in London and the South East will typically be handled by staff working in the London or Cambridge areas.