MICROCHIP PICDEM 2 Plus User Guide

PICDEM 2 Plus
User’s Guide
2004 Microchip Technology Inc. DS51275B
Note the following details of the code protection feature on Microchip devices:
Microchip products meet the specification contained in their particular Microchip Data Sheet.
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip's Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously impro ving the cod e protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. No representation or warranty is given and no liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other intellectual property rights arising from such use or otherwise. Use of Microchip’s products as critical components in life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron, dsPIC, K
EELOQ, MPLAB, PIC, PICmic ro, PI C START,
PRO MATE and PowerSmart are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
AmpLab, FilterLab, microID, MXDEV, MXLAB, PICMASTER, SEEVAL, SmartShunt and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Application Maestro, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, Migratable Memory, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB, rfPIC, Select Mode, SmartSensor, SmartTel and Total Endurance are trademarks of Microchip Technology Incorporat ed in the U.S.A. and other countries.
Serialized Quick Turn Programming (SQTP) is a service mark of Microchip Technology Incorporated in the U.S.A.
All other trademarks mentioned herein are property of their respective companies.
© 2004, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip re cei v ed I S O/T S - 16 949 : 20 02 qu ality system certificat io n f or its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona and Mountain View, California in October
2003. The Com pany’s quality sy stem proces ses and pro cedures are for its PICmicro EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified.
®
8-bit MCUs, KEELOQ
®
code hopping devices, Serial
DS51275B-page ii 2004 Microchip Technology Inc.
Chapter 1. Introduction
1.1 Welcome ............. .. .............. .. ............. .. ............. ... ............. .. ............. ... ........... 1
1.2 PICDEM 2 Plus Demonstration Board ...........................................................2
1.3 Sample Dev ic e s ........... .. .. .............. .. ............. .. .............. ............. .. ............. .. ... 3
1.4 Sample Pro g ra m s .................... ............. .. .............. .. ............. .. .............. .. ......... 3
1.5 PICDEM 2 Plus User’s Guide .........................................................................4
1.6 Referenc e Doc u m e n t s ...... ... ............. .. ............. .. .............. .. ............. .. .............. 4
Chapter 2. Getting Started
2.1 PICDEM 2 Plus as a Stand-Alone Board –
Preprogram me d D e vice ............ ............. .. ............. ... ............. ............. .. ..... 5
2.2 PICDEM 2 Plus Used with an In-Circuit Emulator or
In-Circuit Debugger .......................................................................... ........6
Chapter 3. Tutorial
3.1 Tutorial Pr o g ra m O p e ra t io n ............ .. ............. ............. ... ............. ............. .. ..... 7
3.2 Source Code and Application Notes ..............................................................9
PICDEM™ 2 PLUS USER’S GUIDE
Table of Contents
Appendix A. Hardware Detail
A.1 Processo r Sockets ......... ............. .............. .. ............. .. .............. .. ............. .. ... 11
A.2 Display ................ ............. ... ............. .. ............. .. .............. .. ............. .. ............ 11
A.3 Power Supp ly ...... ............. ... ............. ............. .. .............. .. ............. ............. .. . 1 1
A.4 RS-232 Serial Port ........................................................ ...............................11
A.5 Switches ..................... .. ............. .. .............. .. ............. .. .............. .. ............. .. ... 12
A.6 Oscillato r O p tions ............. ... ............. ............. .. .............. .. ............. ............. .. . 1 2
A.7 Analog In pu t ............................ ............. .. .............. .. ............. ............. ... ......... 12
A.8 ICD Connector ............................... ..............................................................12
A.9 Temperatu re Sensor ...... ............. ... ............. .. ............. ... ............. ............. .. ... 12
A.10 Serial EEPROM .........................................................................................12
A.11 LCD .............................. ............. ... ............. .. ............. .............. .. ............. .. ... 12
A.12 Sample D ev i ce s .. ... .. ............. .. ............. ... ............. .. ............. ... ............. .. ..... 13
A.13 Board Layout and Schematics ....... .. ............. .. .............. .. ............. .. ............ 14
Index..............................................................................................................................17
Worldwide Sales and Service ....................................................................................18
2004 Microchip Technology Inc. DS51275B-page iii
PICDEM™ 2 Plus User’s Guide
NOTES:
DS51275B-page iv 2004 Microchip Technology Inc.

1.1 WELCOME

Thank you for purchasing the PICDEM 2 Plus demonstration board from Microchip Technology Incorporated. The PICDEM 2 Plus is a simple board which demonstrates the capabilities of the 18, 28 and 40-pin PIC16 and PIC18 devices.
The PICDEM 2 Plus can be used stand-alone with a programmed part, with an in-circuit emulator (e.g., MPLAB Sample programs are provided to demonstrate the unique features of the supported devices.
The PICDEM 2 Plus Kit comes with the following:
1. PICDEM 2 Plus Demonstration Board (Figure 1-1)
2. Sample devices
3. CD-ROM, which contains:
If you are missing any part of the kit, please contact your nearest Microchip sales office listed in the back of this publication for help.
PICDEM™ 2 PLUS USER’S GUIDE

Chapter 1. Introduction

®
ICE) or with an in-circuit debugger (e.g., MPLAB ICD 2).
a) Sample programs b) PICDEM 2 Plus Demonstration Board User’s Guide c) Application Notes
2004 Microchip Technology Inc. DS51275B-page 1
PICDEM™ 2 Plus User’s Guide

1.2 PICDEM 2 PLUS DEMONSTRATION BOARD

The PICDEM 2 Plus demonstration board has the following hardware features:
1. 18, 28 and 40-pin DIP sockets. (Although three sockets are provided, only one
device may be used at a time.)
2. On-board +5V regulator for direct input from 9V, 100 mA AC/DC wall adapter or
9V battery, or hooks for a +5V , 100 mA regulated DC supply.
3. RS-232 socket and associated hardware for direct connection to an RS-232
interface.
4. In-Circuit Debugger (ICD) connector.
5. 5 K pot for devices with analog inputs.
6. Three push button switches for external stimulus and Reset.
7. Green power-on indicator LED.
8. Four red LEDs connected to PORTB.
9. Jumper J6 to disconnect LEDs from PORTB.
10. 4 MHz canned crystal oscillator.
11. Unpopulated holes provided for crystal connection.
12. 32.768 kHz crystal for Timer1 clock operation.
13. Jumper J7 to disconnect on-board RC oscillator (approximately 2 MHz).
14. 32K x 8 Serial EEPROM.
15. LCD display.
16. Piezo buzzer.
17. Prototype area for user hardware.
18. Microchip TC74 thermal sensor.
DS51275B-page 2 2004 Microchip Technology Inc.

FIGURE 1-1: PICDEM 2 PLUS HARDWARE

7
9
2
13
Introduction
8
15
3
14
4
16

1.3 SAMPLE DEVICES

Two FLASH devices are included. The device types may change, but will generally include PIC16 and PIC18 40-pin DIP devices.
11
12
18
10
5
17
1
2
6

1.4 SAMPLE PROGRAMS

The PICDEM 2 Plus Kit includes a CD-ROM with sample demonstration programs. These programs may be used with the included sample devices, with an In-Circuit Emulator (ICE) or with an In-Circuit Debugger (ICD). For each type of device (PIC16 or PIC18), demo source code (several ASM files) and compiled code (one Hex file) are provided.
2004 Microchip Technology Inc. DS51275B-page 3
Loading...
+ 15 hidden pages