Institutional Access

Resources

Secure Checkout

Personal information is secured with SSL technology.

Free Shipping

Free global shipping No minimum order.

Description

PIC Projects and Applications Using C details how to program the PIC microcontroller in the C language. The book takes a learn-by-doing approach, with applications covering topics such as inputs, outputs, keypads, alphanumeric displays, analogue-to-digital conversion, radio transmitters and receivers, data EEPROM, interrupts and timing. To aid debugging, the book provides a section detailing the use of the simulator and in-circuit debugger.

With this book you will learn:

How to program the PIC microcontroller in C

Techniques for using the simulator and debuggers to find faults on your code

The ins and outs of interfacing circuits, such as radio modules and liquid crystal displays

How to use the PIC on-board functions, such as interrupts and timing modules, and make analogue measurements

Key Features

Relevant parts of the language are introduced and explained when required for those new to the subject

Core principles are introduced gradually for self-paced learning

Explains how and why a software program works, and how to alter and expand the code

Readership

Electronics engineers, including embedded systems designers and control engineers, technicians in industry, hobbyists needing a more complete grounding in microcontroller principles and applications. Students taking introductory level classes in courses in electronics / microelectronics.

Table of Contents

Preface

Chapter 1: Introduction to the Microcontroller and C

Chapter 2: First C Program

MPLAB and MPLABX Installation

A Brief Introduction to C for the Microcontroller

Writing the Code Using MPLAB IDE

Types of Errors

Programming the Microcontroller

Writing the Code Using MPLABX

Creating a New Project

Chapter 3: Using Eight Outputs

Explanation of the Code

Looping in a Program

The Disco Code

The Header Program

Chapter 4: Inputs

IF Statement

If–Else

Using Several Inputs

Chapter 5: Keypad Scanning

Four Digit Code

Putting the Scan Routine in a Header File, dwsScan.h

Chapter 6: Analogue to Digital Conversion

Configuring the A/D Device

ADCON0 A–D Control Register 0

ADCON1 A–D Control Register 1

ADCON2 A–D Control Register 2

ADRESH and ADRESL: A/D Result Registers High and Low Byte

The Thermistor

Making an A/D Reading with the Thermistor

The LM335 Temperature Sensing IC

Operation of the LM335

A/D Application

Question

Using Several A–D Inputs

Solar Panel Heating System

Microcontrollers with More A/D Inputs

The PIC18(L)F43K22 28A/D Inputs

Chapter 7: Alpha Numeric Display

Configuring the Display

Program LCD.C

Using Header: dwsLCD.h

Program LCDh.C

Character Display Address

Displaying Measurements

Displaying Room Temperature

RoomTemperature.C

Chapter 8: Porting Code to Other Microcontrollers

The Header Code

Chapter 9: Timer/Counter Modules

TMR0 Prescaler

Timing an Event

An Accurate 1 s Time Period

An Accurate 1 min Delay

24 h Clock

30 min Delays and Longer

Chapter 10: Interrupts

Explanation of the Program RBinterrupt.C

TMR0 Overflowing Interrupt

Chapter 11: Fault Finding, Using the Simulator, and the In-Circuit Debugger

The Simulator Using MPLAB

Setting Breakpoints

Stopwatch

Further Information

Chapter 12: Radio Transmitters and Receivers

The Transmitter

The Receiver

Examples

Chapter 13: EEPROM Data Memory

Chapter 14: Projects

Project 1: Countdown Timer

Project 2: Chess Clock

Project 3: Resistance Meter

Project 4: Capacitance Meter

Project 5: Voltmeter

Chapter 15: C Extra

Data Types

Conditional Operators

Appendix A: Data Sheets

Appendix B: Useful Contacts

Index

Details

About the Author

David W Smith

David Smith has had 30 years experience in the Electronics Industry. Before arriving at MMU he worked as an Electronics Design Engineer for ICL and Marconi. His teaching interests are focused on enabling Design and Technology students to implement microcontroller designs into their projects.

Affiliations and Expertise

Reviews

“…the presentation is first-class: concepts are explained very clearly, code is commented on almost line by line, and constant reference to the environment greatly simplifies learning. For all of these reasons, this is undoubtedly a book for beginners: they can use it either on their own, as self-teaching material, or in a class of some sort.”--ComputingReviews.com,June 18,2014

Ratings and Reviews

Request Quote

Tax Exemption

We cannot process tax exempt orders online. If you wish to place a tax exempt order
please contact us.