Table of Contents

Cover

Title Page

Copyright

Dedication

Acknowledgments

Introduction

Part I: Exploring

Day 1: The Adventure Begins

The Plan

Preparation

The Adventure Begins

Compiling and Linking

The Linker Script

Building the First Project

Using the Simulator

Finding a Direction

The JTAG Port

Testing PORTB

Mission Debriefing

Notes for the Assembly Experts

Notes for the PIC MCU Experts

Notes for the C Experts

Tips & Tricks

Exercises

Books

Links

Day 2: Walking in Circles

The Plan

Preparation

The Exploration

While Loops

An Animated Simulation

Using the Logic Analyzer

Debriefing

Notes for the Assembly Experts

Notes for the 8-Bit PIC Microcontroller Experts

Notes for the 16-Bit PIC Microcontroller Experts

Notes for the C Experts

Notes for the MIPS Experts

Tips & Tricks

Notes on Using the Peripheral Libraries

Exercises

Books

Links

Day 3: Message in a Bottle

The Plan

Preparation

The Exploration

Do Loops

Variable Declarations

for Loops

More Loop Examples

Arrays

Sending a Message

Testing with the Logic Analyzer

Testing with the Explorer 16 Demonstration Board

Testing with the PIC32 Starter Kit

Debriefing

Notes for the Assembly Experts

Notes for the PIC Microcontroller Experts

Notes for the C Experts

Tips & Tricks

Exercises

Books

Links

Day 4: NUMB3RS

The Plan

Preparation

The Exploration

On Optimizations (or Lack Thereof)

Testing

Going long long

Integer Divisions

Floating Point

Measuring Performance

Debriefing

Notes for the Assembly Experts

Notes for the 8-Bit PIC® Microcontroller Experts

Notes for the 16-Bit PIC and dsPIC® Microcontroller Experts

Tips & Tricks

Exercises

Books

Links

Day 5: Interrupts

The Plan

Preparation

The Exploration

Interrupts and Exceptions

Sources of Interrupt

Interrupt Priorities

The Interrupt Management Library

Managing Multiple Interrupts

Multivectored Interrupt Management

A Simple Application

The Real-Time Clock Calendar (RTCC)

Debriefing

Tips & Tricks

Books

Links

Day 6: Memory

The Plan

Preparation

The Exploration

Memory Space Allocation

Looking at the Map

Pointers

The Heap

The PIC32MX Bus

PIC32MX Memory Mapping

The Embedded-Control Memory Map

Debriefing

Notes for the C Experts

Notes for the Assembly Experts

Notes for the PIC Microcontroller Experts

Tips & Tricks

Exercises

Books

Links

Part II: Experimenting

Day 7: Running

The Plan

Preparation

The Exploration

Performance vs. Power Consumption

The Primary Oscillator Clock Chain

The Peripheral Bus Clock

Initial Device Configuration

Setting Configuration Bits in Code

Heavy Stuff

Ready, Set, Go!

Fine-Tuning the PIC32: Configuring Flash Wait States

Fine-Tuning the PIC32: Enabling the Instruction and Data Cache

Fine-Tuning the PIC32: Enabling the Instruction Pre-Fetch

Fine-Tuning the PIC32: Final Notes

Debriefing

Notes for the Assembly Experts

Notes for the PlC® Microcontroller Experts

Tips & Tricks

Exercises

Books

Links

Day 8: Communication

The Plan

Preparation

The Exploration

Synchronous Serial Interfaces

Asynchronous Serial Interfaces

Parallel Interfaces

Synchronous Communication Using the SPI Modules

Testing the Read Status Register Command

Writing Data to the EEPROM

Reading the Memory Contents

A 32-Bit Serial EEPROM Library

Testing the New SEE Library

Debriefing

Notes for the C Experts

Notes for the Explorer 16 Experts

Notes for the PIC24 Experts

Tips & Tricks

Exercises

Books

Links

Day 9: Asynchronous Communication

The Plan

Preparation

The Exploration

UART Configuration

Sending and Receiving Data

Testing the Serial Communication Routines

Building a Simple Console Library

Testing a VT100 Terminal

The Serial Port as a Debugging Tool

The Matrix Project

Debriefing

Notes for the C Experts

Notes for the PIC® Microcontroller Experts

Tips & Tricks

Exercises

Books

Links

Day 10: Glass = Bliss

The Plan

Preparation

The Exploration

HD44780 Controller Compatibility

The Parallel Master Port

Configuring the PMP for LCD Module Control

A Small Library of Functions to Access an LCD Display

Building an LCD Library and Using the PMP Library

THE EXPLORER.C LIBRARY

Creating the include and lib Directories

Advanced LCD Control

Progress Bar Project

Debriefing

Notes for the PIC24 Experts

Tips & Tricks

Exercises

Books

Links

Day 11: It’s an Analog World

The Plan

Preparation

The Exploration

The First Conversion

Automating Sampling Timing

Developing a Demo

Creating Our Own Mini ADC Library

Fun and Games

Sensing Temperature

Debriefing

Notes for the PIC24 Experts

Tips & Tricks

Exercises

Books

Links

Part III: Expansion

Day 12: Capturing User Inputs

The Plan

Preparation

Buttons and Mechanical Switches

Button Input Packing

Button Inputs Debouncing

Rotary Encoders

Interrupt-Driven Rotary Encoder Input

Keyboards

PS/2 Physical Interface

The PS/2 Communication Protocol

Interfacing the PIC32 to the PS/2

Input Capture

Testing Using a Stimulus Scripts

The Simulator Profiler

Change Notification

Evaluating Cost

I/O Polling

Testing the I/O Polling Method

Cost and Efficiency Considerations

Keyboard Buffering

Key Code Decoding

Debriefing

Notes for the PIC24 Experts

Tips & Tricks

Exercises

Books

Links

Day 13: UTube

The Plan

Preparation

The Exploration

Generating the Composite Video Signal

The Output Compare Modules

Image Buffers

Serialization, DMA, and Synchronization

Completing a Video Library

Testing the Composite Video

Measuring Performance

Seeing the Dark Screen

Test Pattern

Plotting

A Starry Night

Line Drawing

Bresenham Algorithm

Plotting Math Functions

Fractals

Text

Printing Text on Video

Text Test

The Matrix Reloaded

Debriefing

Notes for the PIC24 Experts

Tips & Tricks

Exercises

Books

Links

Day 14: Mass Storage

The Plan

Preparation

The Exploration

The Physical Interface

Interfacing to the Explorer 16 Board

Starting a New Project

Selecting the SPI Mode of Operation

Sending Commands in SPI Mode

Completing the SD Card Initialization

Reading Data from an SD/MMC Card

Writing Data to an SD/MMC Card

Testing the SD/MMC Interface

Debriefing

Tips & Tricks

Exercises

Books

Links

Day 15: File I/O

The Plan

Preparation

The Exploration

Sectors and Clusters

The File Allocation Table

The Root Directory

The Treasure Hunt

Opening a File

Reading Data from a File

Closing a File

The Fileio Module

Testing fopenM() and freadM()

Writing Data to a File

Closing a File, Take Two

Accessory Functions

Testing the Complete Fileio Module

Code Size

Debriefing

Tips & Tricks

Exercises

Books

Links

Day 16: Musica, Maestro!

The Plan

Preparation

The Exploration

OC PWM Mode

Testing the PWM as a D/A Converter

Producing Analog Waveforms

Reproducing Voice Messages

A Media Player

The WAVE File Format

The play() Function

The Audio Routines

A Simple WAVE File Player

Debriefing

Tips & Tricks

Exercises

Books

Links

Disclaimer

Final Note for the Experts

Who Should Read this Book?

Structure of the Book

What this Book is Not

Checklists

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.72.245