Programming 8-bit PIC Microcontrollers in C, 1st Edition

Programming 8-bit PIC Microcontrollers in C, 1st Edition,Martin Bates,ISBN9780750689601






235 X 191

Step-by-step, practical instruction on how to program PICs in C, with no prior experience necessary!

Print Book + eBook

USD 59.34
USD 98.90

Buy both together and save 40%

Print Book

In Stock

Estimated Delivery Time
USD 50.95

eBook Overview

VST (VitalSource Bookshelf) format

DRM-free included formats : EPUB, Mobi (for Kindle), PDF

USD 47.95
Add to Cart

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


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.


Engineers new to working with PICs, Students, Hobbyists

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.

Affiliations and Expertise

Martin Bates, Lecturer in Microelectronics (retired), Sussex Coast College, UK; formerly Course Leader, Foundation Degree Engineering (University of Brighton) and Course Manager, PIC Microcontroller Short Courses, Hastings Innovation Centre

View additional works by Martin P. Bates

Programming 8-bit PIC Microcontrollers in C, 1st Edition

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
A/D Converter
Parallel Slave Port
1.4 PIC16 Serial Interfaces
I2C Bus
1.5 PIC16 MPLAB Projects
MPLAB C Project
Project Files
1.6 PIC16 Program and Debug
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
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
Indirect Addressing Operators
2.8 PIC16 C Compiler Directives
Program Directives
Header File
2.9 PIC16 C Assembler Routines
Program Compilation
Assembler Block
PIC Assembly Language

Assessment 2
Assignments 2

Part 3 C Peripheral Interfaces
3.1 PIC16 C Analog Input
Analog Setup
Voltage Measurement
3.2 PIC16 C Interrupts
C Interrupts
Interrupt Example
Interrupt Statements
3.3 PIC16 C Hardware Timers
Counter/Timer Operation
PWM Mode
Compare Mode
Capture Mode
3.4 PIC16 C UART Serial Link
3.5 PIC16 C SPI Serial Bus
3.6 PIC16 C I 2 C Serial Bus
3.7 PIC16 C Parallel and Serial Interfaces
Parallel Slave Port
Comparison of Communication Links
3.8 PIC16 C EEPROM Interface
3.9 PIC16 C Analog Output
Assessment 3
Assignments 3

Part 4 C Mechatronics Applications
4.1 PICDEM Mechatronics Board Overview
PICDEM Hardware
Motor Drives
Test Program
4.2 PICDEM Liquid Crystal Display
LCD Connections
LCD Test Program
BCD Count Program
4.3 PICDEM DC Motor Test Programs
Basic Control
Rev Counter
4.4 PICDEM Stepper Motor Control
Stepper Motor Test
Direction Control
4.5 PICDEM Analog Sensors
Light Sensor
Temperature Measurement
4.6 PICDEM Temperature Controller
I/O Allocation
4.7 PICDEM Board Simulation
Circuit Description
Demo Applications
Assessment 4
Assignments 4

Part 5 PIC16 C Applications and Systems 5.1 PIC16 C Application Design
Hardware Design
Software Design
Application Debugging and Testing
5.2 PIC16 C Temperature Controller
System Operation
Software Design and Implementation
5.3 PIC16 C Data Logger System
BASE Board
Program Outline
5.4 PIC16 C Operating Systems
Polled I/O
PC Operating System
Real-Time Operating System
5.5 PIC16 C System Design
Hardware Selection
Hardware Design
Software Design
Assessment 5
Assignments 5

Appendix A Hardware Design Using ISIS Schematic Capture
Design Specification
Schematic Circuit
Schematic Edit

Appendix B Software Design Using CCS C
BAR1 Source Code
PIC Registers
BAR1 List File

Appendix C System Testing Using Proteus VSM
Attaching the Program
Program Debugging
Typical Errors

Appendix D C Compiler Comparison
Microchip C18
Hi-Tech PIC C
Mikro C
Matrix C
Summary of C Compilers

Appendix E CCS C Programming Syntax Summary
Compiler Directives
Program Blocks
Basic I/O Functions

Appendix F CCS C Programming Function Reference

Free Shipping
Shop with Confidence

Free Shipping around the world
▪ Broad range of products
▪ 30 days return policy

Contact Us