Course M323
PIC32 Embedded Systems C Programming
PIC32 Embedded Systems C Programming
| Duration: 5 Days | Microchip Certified Training |
Intended Audience
This course is aimed at engineers with an understanding of microelectronics and programming who will be developing PIC32 embedded systems applications in C.
A Prior knowledge of generic 'C' programming as well as embedded systems programming is assumed. The emphasis of the course is on developing the modular and structured programming techniques needed to develop applications that will make best use of the computing resources available on PIC32 processors.
Course Overview
This "hands-on" course aims to provide engineers with an understanding of the PIC32 family of microcontrollers and experience of using Microchip development tools to create and debug simple 'C' programs. It also aims to provide an appreciation of the more advanced data structures, algorithms and modular programming techniques required when implementing embedded systems applications using the much greater memory and processing resources of the PIC32.
The emphasis is on providing a solid foundation of knowledge on the architecture and features of this range of microcontrollers, together with practical experience of the development tools and code libraries available for PIC32 application developers.
Key Skills
- Understand the architecture and features of the PIC32 family of microcontrollers
- Understand the structured software analysis and design techniques needed when developing complex projects for the PIC32
- Become more aware of the uses and applications of various dynamic data structures and algorithms that can be used in embedded systems application development.
Practical Work
The course includes many practical workshop exercises which are interleaved with the relevant presentation material for maximum impact and variety. These exercises are carried out using MPLAB software running on a Windows PC, an ICD3 programmer/debugger and a target development board containing a PIC32 microcontroller on which programs created during the exercises can be observed to be running in real-time.
You will learn how to:
- Program object code into a target PIC32 microcontroller using MPLAB and ICD3
- Create, build and debug new projects using the Microchip C32 compiler, MPLAB and ICD3
- Set the PIC32 configuration options appropriately for the target system
- Use digital I/O ports to interact with the outside world
- Customise library functions to enable data to be displayed on an LCD module
- Create a real-time clock display (with stop/start) using timers and external interrupts
- Read and display the value of an analogue input using the A-to-D converter
- Set up a Pulse Width Modulation (PWM) output with a variable duty cycle
- Communicate with a PC over a serial interface using the USART peripheral using circular buffers
- Write and read data to/from an external EEPROM chip
- Understand SD Card filesystems and file I/O using such systems
- Learn Finite State Machine (FSM) based approaches to multi-tasking in event and data driven applications
Course Contents
Microchip Overview
- Market profile
- Product range
- Key advantages and support network
Overview of Development Tools
- Microchip development software: MPLAB, C32, MPSIM and associated tools
- Microchip In-Circuit Debugger (ICD3) and In-Circuit Emulator (ICE) hardware
- Device programmers, and the design option of In-Circuit Serial Programming (ICSP)
- Demonstration boards and kits
- Third-party development tools
The PIC32 Architecture
- Harvard versus Von Neumann architectures
- MIPS architecture as applied to the PIC32
- Organisation of program and data memory
- On-chip peripherals and clock options
- Interrupts
- Direct Memory Access (DMA) and DMA programming techniques
The C32 Compiler
- Key features and extensions to support the PIC32 architecture
- Programming style - use of templates and comments
- Debugging at 'C' source level using MPLAB, MPSIM and ICD3
- Working with linker scripts, command files and map files
- Creating and working with libraries
- Interrupt service routines
- C32 code optimisation
