PICDEM™ 2 Plus User’s Guide 2004 Microchip Technology Inc.
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.
PICDEM™ 2 PLUS USER’S GUIDE Table of Contents Chapter 1. Introduction 1.1 Welcome ........................................................................................................ 1 1.2 PICDEM 2 Plus Demonstration Board ........................................................... 2 1.3 Sample Devices ............................................................................................. 3 1.4 Sample Programs ........................................................................................
PICDEM™ 2 Plus User’s Guide NOTES: DS51275B-page iv 2004 Microchip Technology Inc.
PICDEM™ 2 PLUS USER’S GUIDE Chapter 1. Introduction 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® ICE) or with an in-circuit debugger (e.g., MPLAB ICD 2).
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.
Introduction FIGURE 1-1: PICDEM 2 PLUS HARDWARE 7 2 9 8 15 13 11 10 3 5 14 12 4 17 18 1 16 2 6 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. 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).
PICDEM™ 2 Plus User’s Guide 1.5 PICDEM 2 PLUS USER’S GUIDE This document describes the PICDEM 2 Plus demonstration board, tutorial and demonstration software. Detailed information on individual microcontrollers may be found in the device’s respective data sheet. Detailed information on In-Circuit Emulator (ICE) or In-Circuit Debugger (ICD) systems may be found in the respective tool’s user guide.
PICDEM™ 2 PLUS USER’S GUIDE Chapter 2. Getting Started The PICDEM 2 Plus may be used as a stand-alone board with a preprogrammed device, with an In-Circuit Emulator (ICE) or with an In-Circuit Debugger (ICD). For a list of PICmicro microcontroller compatible ICEs or ICDs, please refer to the Development Systems Ordering Guide or the Microchip Third Party Guide. 2.
PICDEM™ 2 Plus User’s Guide 2.2 PICDEM 2 PLUS USED WITH AN IN-CIRCUIT EMULATOR OR IN-CIRCUIT DEBUGGER To use PICDEM 2 Plus with an In-Circuit Emulator (ICE) or In-Circuit Debugger (ICD), refer to the tool’s user guide for instructions on how to power-up and configure the ICE/ICD, as well as how to connect to target boards (e.g., Figure 2-1). FIGURE 2-1: PICDEM 2 PLUS CONNECTED TO MPLAB ICD 2 USING USB Configure the PICDEM 2 Plus for the desired oscillator as described in Table 2-1.
PICDEM™ 2 PLUS USER’S GUIDE Chapter 3. Tutorial The tutorial program is preprogrammed into the sample device, (i.e., p16demo.hex for a PIC16 device and p18demo.hex for a PIC18 device). Also, this program is on the included CD-ROM program disk for user reference, (i.e., if the sample device has been reprogrammed with another program, the tutorial may be reprogrammed into the device). For detailed information on the PICDEM 2 Plus hardware, please refer to Appendix A. 3.
PICDEM™ 2 Plus User’s Guide FIGURE 3-1: TUTORIAL PROGRAM FLOW CHART Power-up PICDEM™ 2 Plus Voltmeter RA4 = Next RB0 = Now Volts = 0.33V RB0 = Exit Buzzer RA4 = Next RB0 = Now Prd = 128 DC = 128 RA4 = -> RB0 = ++ Temperature RA4 = Next RB0 = Now RA4 = 3 presses Temp = 022°C RB0 = Exit Clock RA4 = Next RB0 = Now 00.00.02 RA4 = Set RB0 = Menu 00.00.03 RA4 = -> RB0 = ++ RA4 = 3 presses DS51275B-page 8 2004 Microchip Technology Inc.
Tutorial 3.2 SOURCE CODE AND APPLICATION NOTES In addition to the assembled tutorial program (Hex files), source code used to create these Hex files is included on the PICDEM 2 Plus CD-ROM. Both source code and related Hex files are found in device-specific directories. Application Notes are also included on the CD-ROM for additional examples of use. For information on how to reprogram the device with new or modified code, or how to restore the tutorial program, please see Section 2.
PICDEM™ 2 Plus User’s Guide NOTES: DS51275B-page 10 2004 Microchip Technology Inc.
PICDEM™ 2 PLUS USER’S GUIDE Appendix A. Hardware Detail The PICDEM 2 Plus hardware is extremely simple and is intended to illustrate the ease of use of various PICmicro MCUs. The PICDEM 2 Plus features the following hardware elements: A.1 PROCESSOR SOCKETS Although three sockets are provided, only one device may be used at a time. • 18-pin socket • 28-pin socket • 40-pin socket A.2 DISPLAY Four red LEDs are connected to PORTB of each processor type. The PORTB pins are set high to light the LEDs.
PICDEM™ 2 Plus User’s Guide A.5 SWITCHES Three switches provide the following functions: • S1 – MCLR to hard reset the processor • S2 – Active-low switch connected to RA4 • S3 – Active-low switch connected to RB0 Switches S1 and S3 have debounce capacitors, whereas S2 does not, allowing the user to investigate debounce techniques. When pressed, the switches are grounded. When Idle, they are pulled high (+5V). A.6 OSCILLATOR OPTIONS • RC oscillator (2 MHz approximately) supplied.
Hardware Detail A.12 SAMPLE DEVICES A sample part programmed with a simple program is included in the PICDEM 2 Plus kits. Table A-1 lists the I/O features and port connections for each processor type.
PICDEM™ 2 Plus User’s Guide A.13 BOARD LAYOUT AND SCHEMATICS The following figures show the parts layout (silkscreen) and schematics for the PICDEM 2 Plus board.
Hardware Detail FIGURE A-2: PICDEM 2 PLUS SCHEMATIC +5V +5V R1 10K R7 4.7K S3 1 2 R19 470 4 3 1 2 +5V S1 C2 4 3 0.1 µF C1 C9 0.1 µF 0.1 µF 5K 1 470 R2 2 3 4 5 6 7 33 34 35 36 37 38 39 40 470 +5V R18 470 R3 4.
PICDEM™ 2 Plus User’s Guide FIGURE A-3: PICDEM 2 PLUS SCHEMATIC (CONTINUED) +5V R20 10K R5 R6 10K 300 LCD1 +5V 3 2 1 14 13 12 15 4 5 6 7 8 9 10 11 DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 E R/W RS VEE VCC GND GND1 D2 R21 470 D3 R22 470 D4 R23 470 D5 R24 470 J6 +5V +5V C11 C12 0.1 VCC 16 0.1 µF U3 2 V+ 11 T1IN 10 T2IN 1 2 3 4 5 T1OUT 14 T2OUT 7 12 R1OUT R1IN 13 9 R2OUT R2IN 8 C2+ 4 3 C1- C2- 5 6 V- 15 0.1 C14 6 7 8 9 DE9S-FRS R14 10.0 C15 GND C13 1 C1+ J1 0.1 MAX232A-ND 0.
PICDEM™ 2 PLUS USER’S GUIDE Index A O A/D Input ...............................................................2, 12 Oscillator Options..................................................... 12 Oscillator Selection .................................................... 6 B Board ............................................................ 1, 2, 5, 11 Parts Layout...................................................... 14 Power Supply.................................................5, 11 Schematics ...........
WORLDWIDE SALES AND SERVICE AMERICAS China - Beijing Korea Corporate Office Unit 706B Wan Tai Bei Hai Bldg. No. 6 Chaoyangmen Bei Str. Beijing, 100027, China Tel: 86-10-85282100 Fax: 86-10-85282104 168-1, Youngbo Bldg. 3 Floor Samsung-Dong, Kangnam-Ku Seoul, Korea 135-882 Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 China - Chengdu 200 Middle Road #07-02 Prime Centre Singapore, 188980 Tel: 65-6334-8870 Fax: 65-6334-8850 2355 West Chandler Blvd.