embedded and real time systems training and consultancy

Course: Introduction to PIC16 and PIC18 C Programming

Duration: 5 Days

Course Background

The C programming language is over 40 years old. It is a testament to the genius of the gifted researchers at Bell Labs who developed it that it is still very widely used. C programming is a mainstay of embedded systems programming. In an age where traditional analog systems have. laregely, been replaced by digital systems capable of capturing and processing analog inputs digitally and controlling analog outputs digitally knowing how to program in C is an essential skill. The genius of C is that it is both a high level programming language, and yet, one that is very close to assembler.

Course Prerequisites and Target Audience

A basic knowledge of programming and working with PC tools is assumed e.g. simple shell programming, JavaScript programming or web programming with PHP. A knowledge of binary, octal and hexadecimal number systems would be helpful.

Course Overview

The course discusses C programming in the context of implementing C applications for 8 bit Microchip 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 the Microchip XC8 Compiler.
You will also learn basic techniques for mixed C and Assembler programming
The hands on exercises also introduce the use of simulation, debugging and In Circuit Debugging techniques, as well as techniques for In System Programming.

Course Benefits

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 - and to circular buffers and stacks and 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 in C.

Course Outline