Microcontrollers are present in many new and existing electronic products, and the PIC microcontroller is a leading processor in the embedded applications market. Students and development engineers need to be able to design new products using microcontrollers, and this book explains from first principles how to use the universal development language C to create new PIC based systems, as well as the associated hardware interfacing principles.

The book includes many source code listings, circuit schematics and hardware block diagrams. It describes the internal hardware of 8-bit PIC microcontroller, outlines the development systems available to write and test C programs, and shows how to use CCS C to create PIC firmware. In addition, simple interfacing principles are explained, a demonstration program for the PIC mechatronics development board provided and some typical applications outlined.

Key Features

*Focuses on the C programming language which is by far the most popular for microcontrollers (MCUs) *Features Proteus VSMg the most complete microcontroller simulator on the market, along with CCS PCM C compiler, both are highly compatible with Microchip tools *Extensive downloadable content including fully worked examples


Engineers new to working with PICs, Students, Hobbyists

Table of Contents

Part 1 PIC Microcontroller Systems 1.1 PIC16 Microcontrollers 1 MCU Features Program Execution RAM File Registers Other PIC Chips 1.2 PIC16 MCU Configuration Clock Options Configuration Options Configuration in C 1.3 PIC16 MCU Peripherals Timers A/D Converter Comparator Parallel Slave Port Interrupts 1.4 PIC16 Serial Interfaces USART SPI Bus I2C Bus 1.5 PIC16 MPLAB Projects MPLAB C Project Project Files 1.6 PIC16 Program and Debug Programming Debugging Design Package Assessment 1 Assignments 1 Part 2 C Programming Essentials 2.1 PIC16 C Getting Started Simple Program Program Creation Program Testing Program Analysis 2.2 PIC16 C Program Basics Variables Looping Decision Making Loop Control FOR Loop SIREN Program Blank Program 2.3 PIC16 C Data Operations Variable Types Assignment Operations Conditional Operations 2.4 PIC16 C Sequence Control While Loops Break, Continue, and Goto If..Else and Switch..Case 2.5 PIC16 C Functions and Structure Basic Functions Global and Local Variables 2.6 PIC16 C Input and Output Serial LCD Keypad and Calculator 2.7 PIC16 C More Data Types Arrays Indirect Addressing Operators Enumeration 2.8 PIC16 C C


No. of pages:
© 2008
Print ISBN:
Electronic ISBN:

About the author

Martin Bates

Martin Bates is one of the leading authors specializing in introductory level texts on PIC microcontrollers for the academic, professional and hobby markets, with 20 years’ experience of teaching microprocessor systems.