User manual

Table Of Contents
PICDEM
LAB DEVELOPMENT
BOARD USERS GUIDE
© 2009 Microchip Technology Inc. DS41369A-page iii
Table of Contents
Chapter 1. Overview
1.1 Introduction ..................................................................................................... 5
1.2 Highlights ........................................................................................................ 5
1.3 PICDEM™ Lab Development Kit Contents .................................................... 5
1.4 PICDEM™ Lab Development Board Construction and Layout ...................... 6
1.5 Target Power .................................................................................................. 7
1.6 Connecting the PICkit™ 2 Programmer/Debugger ........................................ 8
1.7 Solderless Prototyping Area Strip Configuration ............................................ 9
Chapter 2. Getting Started
2.1 Introduction ................................................................................................... 11
2.2 Prerequisites ................................................................................................ 11
2.3 The Software Control Loop .......................................................................... 11
2.4 MPLAB
®
IDE Download Instructions ............................................................ 12
2.5 Installing the Included Lab Files ................................................................... 16
Chapter 3. General Purpose Input/Output Labs
3.1 Introduction ................................................................................................... 17
3.2 General Purpose Input/Output Labs ............................................................. 17
3.3 GPIO Output Labs ........................................................................................ 18
3.3.1 Reference Documentation ......................................................................... 18
3.3.2 Equipment Required for GPIO Output Labs .............................................. 18
3.3.3 PICDEM Lab Development Board Setup for GPIO Output Labs ............... 18
3.3.4 Lab 1: Light LEDs ...................................................................................... 19
3.3.5 Lab 2: Flash LEDs (Delay Loop) ............................................................... 25
3.3.6 Lab 3: Simple Delays Using Timer0 .......................................................... 29
3.3.7 Lab 4: Rotate LEDs ................................................................................... 34
3.4 GPIO Input Labs ........................................................................................... 38
3.4.1 Reference Documentation ......................................................................... 38
3.4.2 Equipment Required for GPIO Input Labs ................................................. 38
3.4.3 PICDEM Lab Development Board Setup for GPIO Input Labs ................. 38
3.4.4 Lab 5: Adding a Push Button ..................................................................... 39
3.4.5 Lab 6: Push Button Interrupt ..................................................................... 48
3.4.6 Lab 7: Push Button Interrupt-on-Change .................................................. 53
3.4.7 Lab 8: Using Weak Pull-Ups ..................................................................... 58