Course M103
Introduction to PIC16F C Programming - using the HI-TECH PICC 'C' Compiler
Introduction to PIC16F C Programming - using the HI-TECH PICC 'C' Compiler
| Duration: 3 Days | Microchip Certified Training |
Intended Audience
This course is aimed at engineers with an understanding of microelectronics and programming who intend to create projects using the 'C' language, but who are new to the PIC16F architecture and/or the HI-TECH PICC 'C' compiler. A prior knowledge of generic 'C' programming is assumed, together with familiarity with the Windows environment on a Personal Computer.
Course Overview
This hands-on course aims to provide engineers with an understanding of the PIC16F family of microcontrollers and experience of using HI-TECH and Microchip development tools to create and debug simple 'C' programs.
Key Skills
- Understand the architecture and features of the PIC16F family of microcontrollers
- Gain hands-on experience of Microchip development tools and the HI-TECH PICC compiler for creating and debugging 'C' programs on a target PIC16F microcontroller
- Be introduced to the use of on-chip peripherals to simplify interfaces to the outside world
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 and the Hitech C compiler running on a Windows PC, an ICD programmer/debugger and a target development board containing a PIC16F microcontroller on which programs created during the exercises can be observed to be running in real-time.
Laboratory workshops include:
- Create, build and debug new projects on a target board using the Hitech PICC C Compiler, MPLAB and ICD3
- Set the PIC16F configuration options appropriately for the target system
- Use digital I/O ports to interact with the outside world
- Display information on an LCD module
- Read the value of an analogue input using the A-to-D converter
- Use an interrupt handler to collect data in the background
- 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
Course Contents
Microchip Overview
- Market profile
- Product range
- Key advantages and support network
Overview of Development Tools
- Microchip development software: MPLAB and associated tools
- HI-TECH PICC 'C' compiler
- Microchip In-Circuit Debugger (ICD3) hardware
- The PICDEM 2 Plus demonstration board
The PIC16F Architecture
- Harvard versus Von Neumann architecture
- Organisation of data memory
- On-chip peripherals
- In-Circuit Serial Programming (ICSP) - available on some devices
The HI-TECH PICC Compiler
- Key features and extensions to support the PIC16C / PIC16F architecture
- HI-TECH PICC data types, storage classes and type qualifiers
- Programming style - use of templates and comments
- Debugging at 'C' source level using MPLAB and ICD3
- Inclusion of external source code modules to add functionality to the project
- Interrupt service routines - how to create handlers using HI-TECH PICC
