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
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.
Chapter 1: Introduction – This chapter introduces the PICDEM 2 Plus and provides a brief description of the hardware.
Chapter 2: Getting Started – This chapter goes through a basic step-by-step process for getting your PICDEM 2 Plus up and running as a stand-alone board or with an ICE or ICD.
Chapter 3: Tutorial – This chapter provides a detailed description of the tutorial program.
Appendix A: Hardware Description: This appendix describes in detail the hardware of the PICDEM 2 Plus board.

1.6 REFERENCE DOCUMENTS

Reference Documents may be obtained by contacting your nearest Microchip sales office (listed in the back of this document) or by downloading via the Microchip web site (www.microchip.com).
• Individual Data Sheets and Reference Manuals:
- PIC16F87X Data Sheet (DS30292)
- PIC18FXX2 Data Sheet (DS39564)
- PICmicro
- PICmicro
- TC74 Data Sheet (DS21462)
MPLAB
MPASM™ User’s Guide with MPLINK™ Linker and MPLIB™ Librarian (DS33014)
PRO MATE
PICSTART
MPLAB
MPLAB
Microchip Third Party Guide (DS00104)
®
Mid-Range MCU Family Reference Manual (DS33023)
®
18C MCU Family Reference Manual (DS39500)
®
IDE Simulator, Editor User’s Guide (DS51025)
®
II User’s Guide (DS30 082)
®
Plus User’s Guide (DS51 028 )
®
ICE User’s Guide (DS51159)
®
ICD 2 Quick Start Guide (DS51268)
DS51275B-page 4 2004 Microchip Technology Inc.
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.1 PICDEM 2 PLUS AS A STAND-ALONE BOARD – PREPROGRAMMED DEVICE

The PICDEM 2 Plus may be demonstrated immediately by following the steps listed below:
• Place the preprogrammed sample device in the appropriate socket on the PICDEM 2 Plus board.
• Place a jumper on J6 (to enable the LEDs).
• Verify that the board is set up for a 4 MHz canned oscillator (i.e., no jumper on J7; a 4 MHz oscillator in Y2; Y1, C4 and C5 are empty).
• Apply power to the PICDEM 2 Plus. For information on acceptable power sources, see Appendix A.
To reprogram the sample device, the following will be necessary:
1. Program source code.
User source code may be used to program the device or, if this has previously been done, the sample program may be restored from the file on the included CD-ROM.
2. An assembler, such as MPASM™ assembler (available with MPLAB IDE), or a
compiler, such as MPLAB C18 (PIC18 devices only). Source code must be assembled or compiled into a Hex file before it can be
programmed into the device. Microchip Technology’s MPASM assembler or MPLAB C18 C compiler may be used. Both are compatible with MPLAB IDE. However, other assemblers/compilers may be used. For a list of these PICmicro MCU compatible language tools, please refer to the Microchip Third Party Guide.
3. A device programmer, such as PRO MATE
PICSTART MPLAB IDE v6.00 or greater).
Once the sample program is in Hex file format, a programmer may be used to program a Flash device. Microchip Technology’s PRO MATE II device programmer, PICSTART Plus development programmer or MPLAB ICD 2 may be used. All are compatible with MPLAB IDE. However, other programmers may be used. For a list of these PICmicro MCU compatible programmers, please refer to the Microchip Third Party Guide.
If the code protection bit(s) have not been programmed, the on-chip program memory can be read out for verification purposes.
®
Plus or MPLAB® ICD 2 (programmer functionality available with
®
II, MPLAB® PM3
(1)
®
,
Note 1: The MPLAB PM3 device programmer will be available in Q2 2004. Check
the Microchip web site (www.microchip.com) for further information.
2004 Microchip Technology Inc. DS51275B-page 5
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. Refer to the ICE/ICD user’s guide for any oscillator configuration requirements.

TABLE 2-1: OSCILLATOR SELECTION

Oscillator Selection on
PICDEM 2 Plus
RC J7 installed, Y2 empty, Y1 empty Crystal J7 removed, Y2 empty, crystal in Y1, caps in C4 and C5 Canned Oscillator J7 removed, oscillator in Y2 (Y1, C4, C5 empty) Resonator – no internal caps J7 removed, Y2 empty, resonator in Y1, caps in C4 and C5 Resonator – with internal ca ps J7 removed, Y2 empty, resonator in Y1, C4 and C5 empty
Modification on PICDEM 2 Plus
DS51275B-page 6 2004 Microchip Technology Inc.
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.1 TUTORIAL PROGRAM OPERATION

The tutorial program is made up of four components, which are individually displayed on the LCD.
1. Voltmeter This mode uses the A/D module to measure the voltage of the R16 pot and display a voltage between 0.00V and 5.00V on the LCD. Voltage is continually updated until the mode is exited by pressing RB0.
2. Buzzer This mode turns on the Piezo buzzer, using the CCP1 module I/O pin, RC2. The period and duty cycle of the CCP1 frequency can be changed while the buzzer is on. The changes in period and duty cycle are recognized immediately in the buzzer tone. To change the period and/or the duty cycle, press RB0 under the “Buzzer” menu. The buzzer will then sound off with the default setting of 80h for the period and duty cycle. The cursor will flash over the period’s first digit, indicating that the PR2 register is ready to be incremented. To change the duty cycle, press RA4 once and the cursor will now flash over the duty cycle’s first digit, indicating it is now ready to increment the CCPR1L register. The next press of RA4 will exit the buzzer function.
3. Temperature This mode uses a TC74 thermal sensor to measure ambient temperature in Celsius and then display that temperature on the LCD. Communication between the PICmicro MCU and sensor is accomplished using the MSSP module. This mode is exited by pressing RB0. This mode contains code that will write to the external on-board EEPROM. Every two seconds, the code will write to a defined EEPROM address and store the current temperature in that address.
4. Clock Once this mode is entered from the main menu, a real-time clock will start counting from 00:00:00. The Timer1 module and a 32 kHz clock crystal are used to establish a real-time clock. By pressing RA4, the clock time can be set to the user’s preference. When RA4 is pressed to set the time, the cursor will flash over the hours ten digit. Press RA4 again and the cursor will now flash over the minutes ten digit. RB0 is used to increment hours and minutes whenever the cursor is flashing over either. After the minutes have been set, press RA4 and the time will be set and the LCD is returned to an active clock display.
The data that is sent to the LCD is also sent to the RS-232 serial port using the USART on the PICmicro MCU. A HyperTerminal™ program on the PC will be able to display the same information that is displayed on the LCD
2004 Microchip Technology Inc. DS51275B-page 7
PICDEM™ 2 Plus User’s Guide

FIGURE 3-1: TUTORIAL PROGRAM FLOW CHART

Power-up
PICDEM™ 2 Plus
Voltmeter RA4 = Next RB0 = Now
Buzzer RA4 = Next RB0 = Now
Temperature
RA4 = Next RB0 = Now
Volts = 0.33V
RB0 = Exit
Prd = 128 DC = 128 RA4 = -> RB0 = ++
RA4 = 3 presses
Clock RA4 = Next RB0 = Now
Temp = 022°C
RB0 = Exit
00.00.02
RA4 = Set RB0 = Menu
00.00.03
RA4 = -> RB0 = ++
RA4 = 3 presses
DS51275B-page 8 2004 Microchip Technology Inc.

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.1 “PICDEM 2 Plus as a
Stand-Alone Board – Preprogrammed Device”.
Tutorial
2004 Microchip Technology Inc. DS51275B-page 9
PICDEM™ 2 Plus User’s Guide
NOTES:
DS51275B-page 10 2004 Microchip Technology Inc.

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. These LEDs may be disconnected from PORTB by removing jumper J6.
One green LED is provided to determine whether there is power to the PICDEM 2 Plus board (LED on) or not (LED off).
PICDEM™ 2 PLUS USER’S GUIDE

A.3 POWER SUPPLY

There are three ways to supply power to the PICDEM 2 Plus:
• A 9V battery can be plugged into J8.
• A 9V, 100 mA unregulated AC or DC supply can be plugged into J2. A power supply can be purchased through Microchip, Part #AC162039.
• A +5V, 100 mA regulated DC supply can be connected to the hooks provided.
Note: The PICDEM 2 Plus kit does not include a power supply.
MPLAB ICE 2000 users have a regulated +5V power supply available in the logic probe connector and can easily connect to the hooks on PICDEM 2 Plus (Red probe to +5V and Black probe to GND).
MPLAB ICD 2 users may use the ICD to power the target board to 5V , up to 200 mA, if the MPLAB ICD 2 is connected to the PC with a serial cable.

A.4 RS-232 SERIAL PORT

An RS-232 level shifting IC has been provided with all necessary hardware to support connection of an RS-232 host through the DB9 connector. The port is configured as DCE and can be connected to a PC using a straight-through cable.
The PIC16/PIC18 RX and TX pins are tied to the RX and TX lines of the MAX232A.
2004 Microchip Technology Inc. DS51275B-page 11
PICDEM™ 2 Plus User’s Guide

A.5 SWITCHES

Three switches provide the following functions:
• S1 – MCLR
• 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. This oscillator may be disabled by removing jumper J7.
• Pads provided for user furnished crystal and two capacitors.
• Removable 4 MHz canned oscillator.
• 32.768 kHz (watch type) crystal for Timer1.

A.7 ANALOG INPUT

A 5 K potentiometer is connected through a series 470 ohm resistor to AN0. The pot can be adjusted from V
an A/D module.
to hard reset the processor
DD to GND to pr ov id e an a n al og input to the parts with

A.8 ICD CONNECTOR

By way of the modular connector (J5), the MPLAB ICD 2 can be connected for low-cost debugging. The ICD connector utilizes RB6 and RB7 of the microcontroller for in-circuit debugging.

A.9 TEMPERATURE SENSOR

This is a serial digital thermal sensor (TC74) connected to the 28 and 40-pin microcontrollers via RC3 and RC4. Communication is accomplished with the TC74 via it’s 2-wire I
2
C™ compatible serial port. This device has an address of 1001101b.

A.10 SERIAL EEPROM

A 24L256 256K (32K x 8) serial EEPROM is included on the board to illustrate I2C bus concepts.

A.11 LCD

An LCD display with two lines, 16 characters each, is connected to the 28 and 40-pin sockets. There are three control lines (RA3:RA1) and four data lines (RD3:RD0).
A 5 K pot may be installed into R20 to adjust contrast on the LCD. If this is done, R5 and R6 need to be removed.
DS51275B-page 12 2004 Microchip Technology Inc.

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.

TABLE A-1: PORT CONNECTIONS

Hardware Detail
Device LEDs RS-232 S1 S2 S3
18-pin RB3:RB0 N/A MCLR 28-pin RB3:RB0 RC6/RC7 MCLR 40-pin RB3:RB0 RC6/RC7 MCLR
RA4 RB0 RA0 N/A N/A N/A RB6/RB7 N/A Yes RA4 RB0 RA0 RA3:RA1 RC3/RC4 RC2 RB6/RB7 RC3/RC4 Yes RA4 RB0 RA0 RA3:RA1
Pot
R16
LCD EEPROM Buzzer ICD
RC3/RC4 RC2 RB6/RB7 RC3/RC4 Yes
RD3:RD0
Temp
Sensor
Y1/Y2
2004 Microchip Technology Inc. DS51275B-page 13
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.

FIGURE A-1: PICDEM 2 PLUS PARTS LAYOUT

+9V IN
U8
J2
ICD
J8
5V BATTERY
CR1
CR2
C16
J1
R14
C13
RS-232
R10
Q1
C18
C17
C11
C12
U4U3
C15
J5
J9
C14
P1
R11
PWR
R15
R4
J7
C4
Y1
C5
C10
Y3
R8
R9
U5
(
D1
C3
U6
18 PIN
C7
C1
R1
)
()()()(
J6
R24
R23
U2
C19
C6
28 PIN
1
RESET
R17
S1
RB0RB1RB2RB3
)
R22
R21
R5
R20
111
C8
C20
R18
RA4
S2
R6
CONTRAST
U1
40 PIN
C9
RB0
S3
RA0
R2
R16
0
C2
1 2 3 4 5
RB PORT
RA PORT
RC PORT
R7
R19
Y2
R3
LCD1
RE PORT
+5V
0 1 2
0 1 2 3 4 5 6
+5V
7
+5V
+5V
+5V
RD PORT
GND GND
PICDEM 2 PLUS DEMO BOARD
GND GND
GND
©2002
DS51275B-page 14 2004 Microchip Technology Inc.

FIGURE A-2: PICDEM 2 PLUS SCHEMATIC

+5V +5V
Hardware Detail
RB0
J2
DJ005B
R19 470
S1
+5V
S2
4 3
R16
5K
+5V
4 3
PIEZO_BUZ
2.2K
R11
R1 10K
R3
4.7K
P1
C1
0.1 µF
+5V
C2
0.1 µF
0.1 µF
U1
10
RE2
9
RE1 RE0 RD7 RD6 RD5 RD4 RD3 RD2 RD1 RD0 RC7 RC6 RC5 RC4 RC3 RC2 RC1 RC0
OSC2
OSC1
8 30 29 28 27 22 21 20 19 26 25 24 23 18 17 16 15
14
13
+5V
R8
4.7K
Y1
TBD
C4
0.1
R9
4.7K
+5V
C10
0.1 µF
U4
8 7 6 5
V WP SCL SDA
1
A0
CC
2
A1
3
A2
4
GND
24LC256_DIP
1 2
NC/OE GND
V
OUT
4
CC
3
+5V
Y2
TBD
+5V
C5
0.1
R4
4.7K
J7
U2
21
RB0
22
RB1
23
RB2
24
RB3
25
RB4
26
RB5
27
RB6
28
RB7
11
RC0
12
RC1
13
RC2
14
RC3
15
RC4
16
RC5
17
RC6
18
RC7
Y3
32.768 kHz
C6
22 pF
+5V
C7
22 pF
C19
C3
22 pF
11
DD
V
32
VDD
1
MCLR
2
RA0
3
RA1
4
RA2
5
RA3
6
RA4
7
RA5
33
RB0
34
RB1
35
RB2
36
RB3
37
RB4
38
RB5
39
RB6
40
RB7
12
V
SS
31
VSS
+5V
470
R17
470
R2
R18
470
R10 470
40-PIN DEVICE
3
Q1
2
2N2222 TO-92
1
+5V
C8
20
VDD
1
MCLR
2
RA0
3
RA1
4
RA3
5
RA3
6
RA4
7
RA5
9
OSC1
10
OSC2
8
V
SS
19
VSS
28-PIN DEVICE
C9
0.1 µF
R7
4.7K
124
S3
3
1 2
1 2
J9
0.1 µF
U6
14
DD
V
4
MCLR
17
RA0
18
RA1
1
RA2
2
RA3
3
RA4/T0CKI
16
OSC1/CLKI
15
OSC2/CLKO
5
VSS
18-PIN DEVICE
RB0/INT
RB1 RB2 RB3 RB4 RB5 RB6 RB7
6 7 8 9 10 11 12 13
C18 220
+5V
R15 470
D1
1
C16
2 3
0.1
CR1
CR2 1N914
LM340T-5.0
13
INU8OUT
COM
2
C17 220
J8
9V
U5
1
NC
VDD
2
SDA
4
SCL
GND
TC74_TO-220_5P
+5V
5
3
C20
0.1
2004 Microchip Technology Inc. DS51275B-page 15
PICDEM™ 2 Plus User’s Guide

FIGURE A-3: PICDEM 2 PLUS SCHEMATIC (CONTINUED)

+5V
10K
R20 10K
R5
300
R6
R21 470
D2
+5V
LCD1
3
E
2
R/W
1
RS
14
EE
V
13
VCC
12
GND
15
GND1
DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7
4 5 6 7 8 9 10 11
R22 470
D3
R23 470
D4
R24 470
D5
J6
+5V
+5V
2
9
1
3
6
U3
V+
T1IN T2IN
R1OUT R2OUT
C1+
C1-
V-
C11
0.1 µF
1615
VCC
T1OUT T2OUT
R1IN R2IN
C2+
C2-
GND
MAX232A-ND
J1
1
6
14 7
13 8
4
5
2 3 4 5
DE9S-FRS
R14
10.0
7 8 9
C15
0.1
C13
0.1
C12
0.1
C14
11 10
12
0.1
ICD CONNECTOR
+5V
J5
1 2 3 4 5 6
RA RB RC RD
1 2 3 4 5 6
1 2 3 4 5 6 7 8
1 (RC0) 2 (RC1) 3 4 (RC3) 5 (RC4) 6 7 (RC6) 8 (RC7)
1 2 3 4 5 6 7 8
RE
1 2 3
DS51275B-page 16 2004 Microchip Technology Inc.
PICDEM™ 2 PLUS USER’S GUIDE

Index

A
A/D Input................ ..... ...... ..... ...... ...... ...................2, 12
B
Board ............................................................1, 2, 5, 11
Parts Layout...................................................... 14
Power Supply.................................................5, 11
Schematics....................................................... 14
Silkscreen.........................................................14
Buzzer........................................................................ 7
Buzzer, Piezo............................................................. 2
C
Clock.......................................................................... 7
D
Demonstration Board. See Board. Demonstration Programs. See Sample Programs.
E
EEPROM, Serial...................................................2, 12
H
Hardware .................................................................11
I
ICD Connector.........................................................12
K
Kit Components ......................................................... 1
L
LCD.......................................................................2, 12
LEDs
Green Power..................................................2
Red Display ...............................................2
, 11
, 5, 11
M
MPASM Assembler....................................................5
MPASM Assembler User’s Guide with
MPLINK Linker and MPLIB Librarian...................... 4
MPLAB C18............................................................... 5
MPLAB ICD 2..........................................1
MPLAB ICD 2 Quick Start Guide............................... 4
MPLAB ICE.......................................................1, 6, 11
MPLAB ICE User’s Guide..........................................4
MPLAB IDE................................................................5
MPLAB IDE User’s Guide..........................................4
, 5, 6, 11, 12
O
Oscillator Options..................................................... 12
Oscillator Selection.................................................... 6
P
PIC16F87X Data Sheet.............................................. 4
PIC16.........................................................................1
Tutorial Program......................... ..... ...... ..... ........ 7
PIC18FXX2 Data Sheet.............................................4
PIC18.........................................................................1
Tutorial Program......................... ..... ...... ..... ........ 7
PICDEM 2 Plus Board. See Board. PICDEM 2 Plus Kit. See Kit Components.
PICSTART® Plus.......................................................5
PICSTART® Plus User’s Guide.................................4
Piezo Buzzer.............................................................. 2
PRO MATE® II...........................................................5
PRO MATE® II User’s Guide..................................... 4
Push Buttons. See Switches.
R
Reference Documents ...............................................4
RS-232................................................................. 2
, 11
S
Sample Devices................................................1, 3, 13
Sample Programs .................................................. 1
Sockets .................................................................... 11
Switches............................................................... 2
, 3
, 12
T
TC74 .......................................................................... 2
TC74 Data Sheet ....................................................... 4
Temperature...............................................................7
Temperature Sensor................................................12
TC74................................................................. 12
Tutorial.......................................................................7
Tutorial Program
Flow Chart...........................................................8
Source Code, Application Notes.........................9
V
Voltmeter.................................................................... 7
2004 Microchip Technology Inc. DS51275B-page 17

WORLDWIDE SALES AND SERVICE

AMERICAS
Corporate Office
2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel : 480-7 92- 72 00 Fax: 480-792-7277 Technical Support: 480-792-7627 Web Address: http://www.microchip.com
Atlanta
3780 Mansell Road, Suite 130 Alpharetta, GA 30022 Tel : 770 -6 40- 003 4 Fax: 770-640-0307
Boston
2 Lan Drive, Suite 120 Westford, MA 01886 Tel : 978 -6 92- 384 8 Fax: 978-692-3821
Chicago
333 Pierce Road, Suite 180 Itasca, IL 60143 Tel : 630 -2 85- 007 1 Fax: 630-285-0075
Dallas
4570 Westgrove Drive, Suite 160 Addison, TX 75001 Tel : 972 -8 18- 742 3 Fax: 972-818-2924
Detroit
Tri-Atria Office Building 32255 Northwestern Highway, Suite 190 Farmington Hills, MI 48334 Tel : 248 -5 38- 225 0 Fax: 248-538-2260
Kokomo
2767 S. Albright Road Kokomo, IN 46902 Tel : 765 -8 64- 836 0 Fax: 765-864-8387
Los Angeles
18201 Von Karman, Suite 1090 Irvine, CA 92612 Tel : 949 -2 63- 188 8 Fax: 949-263-1338
San Jose
1300 Terra Bella Avenue Mountain View, CA 94043 Tel : 650 -2 15- 144 4 Fax: 650-961-0286
Toronto
6285 Northam Drive, Suite 108 Mississauga, Ontario L4V 1X5, Cana da Tel : 905 -6 73- 069 9 Fax: 905-673-6509
ASIA/PACIFIC
Australia
Suite 22, 41 Rawson Street Epping 2121, NSW Australia Tel : 61- 2- 986 8-6 73 3 Fax: 61-2-9868-6755
China - Beijing
Unit 706B Wan Tai Bei Hai Bldg. No. 6 Chaoyangmen Bei Str. Beijing, 100027, China Tel : 86- 10 -85 282 100 Fax: 86-10-85282104
China - Chengdu
Rm. 2401-2402, 24th Floor, Ming Xing Financial Tower No. 88 TIDU Street Chengdu 610016, China Tel : 86- 28 -86 766 200 Fax: 86-28-86766599
China - Fuzhou
Unit 28F, World Trade Plaza No. 71 Wusi Road Fuzhou 350001, China Tel : 86- 59 1-7 503 506 Fax: 86-591-7503521
China - Hong Kong SAR
Unit 901-6, Tower 2, Metroplaza 223 Hing Fong Road Kwai Fong, N.T., Hong Kong Tel : 852 -2 401 -1200 Fax: 852-2401-3431
China - Shanghai
Room 701, Bldg. B Far East International Plaza No. 317 Xian Xia Road Shanghai, 200051 Tel : 86- 21 -62 75- 57 00 Fax: 86-21-6275-5060
China - Shenzhen
Rm. 1812, 18/F, Building A, United Plaza No. 5022 Binhe Road, Futian District Shenzhen 518033, China Tel : 86- 75 5-8 290 1380 Fax: 86-755-8295-1393
China - Shunde
Room 401, Hongjian Building, No. 2 Fengxiangnan Road, Ronggui Town, Shunde District, Foshan City, Guangdong 528303, China Tel: 86-757-28395507 Fax: 86-757-28395571
China - Qingdao
Rm. B505A, Fullhope Plaza, No. 12 Hong Kong Central Rd. Qingdao 266071, China Tel: 86-532-5027355 Fax: 86-532-5027205
India
Divyasree Chambers 1 Floor, Wing A (A3/A4) No. 11, O’Shaugnessey Road Bangalore, 560 025, India Tel: 91-80-2290061 Fax: 91-80-2290062
Japan
Benex S-1 6F 3-18-20, Shinyokohama Kohoku-Ku, Yokohama-shi Kanagawa, 222-0033, Japan Tel : 81- 45 -47 1- 616 6 Fax: 81-45-471-6122
Korea
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
Singapore
200 Middle Road #07-02 Prime Centre Singapore, 188980 Tel: 65-6334-8870 Fax: 65-6334-8850
Taiwan
Kaohsiung Branch 30F - 1 No. 8 Min Chuan 2nd Road Kaohsiung 806, Taiwan Tel: 886-7-536-4818 Fax: 886-7-536-4803
Taiwan
Taiwan Branch 11F-3, No. 207 Tung Hua North Road Taipei, 105, Taiwan Tel: 886-2-2717-7175 Fax: 886-2-2545-0139
EUROPE
Austria
Durisolstrasse 2 A-4600 Wels Austria Tel: 43-7242-2244-399 Fax: 43-7242-2244-393
Denmark
Regus Business Centre Lautrup hoj 1-3 Ballerup DK-2750 Denm ark Tel: 45-4420-9895 Fax: 45-4420-9910
France
Parc d’Activite du Moulin de Massy 43 Rue du Saule Trapu Batiment A - ler Etage 91300 Massy, France Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79
Germany
Steinheilstrasse 10 D-85737 Ismaning, Germany Tel: 49-89-627-144-0 Fax: 49-89-627-144-44
Italy
Via Quasimodo, 12 20025 Legnano (MI) Milan, Italy Tel: 39-0331-742611 Fax: 39-0331-466781
Netherlands
P. A. De Biesbosch 14 NL-5152 SC Drunen, Netherlands Tel: 31-416-690399 Fax: 31-416-690340
United Kingdom
505 Eskdale Road Winnersh Triangle Wokingham Berkshir e, England RG41 5TU Tel: 44-118-921-5869 Fax: 44-118-921-5820
01/26/04
DS51275B-page 18 2004 Microchip Technology Inc.
Loading...