Programming 32-bit Microcontrollers in C: Exploring the PIC32 (Embedded Technology)

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Author(s): Lucio Di Jasio
Year: 2008

Language: English

Front Cover
Programming 32-bit Microcontrollers in C: Exploring the PIC32
Copyright Page
Contents
Introduction
Part 1: 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
Interrupt Handlers Declaration
The Interrupt Management Library
Single Vector Interrupt Management
Managing Multiple Interrupts
Multivectored Interrupt Management
A Simple Application
The Secondary Oscillator
The Real-Time Clock Calendar (RTCC)
Debriefing
Notes for the PIC Microcontroller Experts
Tips & Tricks
Exercises
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 2: 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 PIC® 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
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 3: 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
Two-Dimensional Function Visualization
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
Index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Z