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 improving the code 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 provided only for your convenience
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, K
EELOQ, KEELOQ logo, microID, MPLAB, PIC,
PICmicro, PICSTART, PRO MATE, PowerSmart, rfPIC, and
SmartShunt are registered trademarks of Microchip
Technology Incorporated in the U.S.A. and other countries.
AmpLab, FilterLab, Linear Active Thermistor, Migratable
Memory, MXDEV, MXLAB, PS logo, SEEVAL, SmartSensor
and The Embedded Control Solutions Company are
registered trademarks of Microchip Technology Incorporated
in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, ECAN,
ECONOMONITOR, FanSense, FlexROM, fuzzyLAB,
In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi,
MPASM, MPLAB Certified logo, MPLIB, MPLINK, PICkit,
PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal,
PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB,
rfPICDEM, Select Mode, Smart Serial, SmartTel, Total
Endurance, UNI/O, WiperLock and ZENA are trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
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.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona, Gresham, Oregon and Mountain View, California. The
Company’s quality system processes and procedures are for its PIC
MCUs and dsPIC® DSCs, KEEL
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.
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the page number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
For the most up-to-date information on development tools, see the MPLAB
Select the Help menu, and then Topics to open a list of available on-line help files.
The VL logo is a registered logo of Varitronix Limited. The illustrations on pages 20, 21,
25, 27, 30 and 33 are copyrighted materials of Varitronix and VL Electronics. Reprinted
with permission.
®
IDE on-line help.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
PICDEM™ LCD 2 Demonstration Kit User’s Guide. Items discussed in this chapter
include:
• About this Guide
• Conventions Used in this Guide
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
• Customer Support
ABOUT THIS GUIDE
Document Layout
This document describes how to use the PICDEM LCD 2 as a development tool to
emulate and debug firmware on a target board. The manual layout is as follows:
• Chapter 1. Introduction – Describes the hardware of the PICDEM LCD 2
Demonstration Board.
• Chapter 2. Getting Started – Describes how to use the PICDEM LCD 2
Demonstration Board.
• Chapter 3. Using the Demo Software – Describes how to use the application in
Demo mode and also how it can be customized.
• Appendix A. Board Technical Information – Shows the schematic and layout
diagrams for the PICDEM LCD 2 Demonstration Board.
This user’s guide describes how to use the PICDEM LCD 2 Demonstration Kit. Other
useful documents are listed below. The following Microchip documents are available
and recommended as supplemental reference resources.
Readme Files
For the latest information on using other tools, read the tool-specific Readme files in
the Readmes subdirectory of the MPLAB
contain update information and known issues that may not be included in this user’s
guide.
The following documents are comprehensive references for Microchip’s enhanced
microcontrollers with LCD driver:
“PIC18F85J90 Family Data Sheet”
“PIC18F6390/6490/8390/8490 Data Sheet”
“PIC16C9XX Data Sheet”
“PIC16C925/926 Data Sheet”
“PIC16F917/916/914/913 Data Sheet”
THE MICROCHIP WEB SITE
Microchip provides online support via our web site at www.microchip.com. This web
site is used as a means to make files and information easily available to customers.
Accessible by using your favorite Internet browser, the web site contains the following
information:
• Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents,
latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program
member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices,
distributors and factory representatives
DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE
Microchip’s customer notification service helps keep customers current on Microchip
products. Subscribers will receive e-mail notification whenever there are changes,
updates, revisions or errata related to a specified product family or development tool of
interest.
To register, access the Microchip web site at www.microchip.com, click on Customer
Change Notification and follow the registration instructions.
The Development Systems product group categories are:
• Compilers – The latest information on Microchip C compilers and other language
tools. These include the MPLAB C17, MPLAB C18 and MPLAB C30 C compilers;
MPASM™ and MPLAB ASM30 assemblers; MPLINK™ and MPLAB LINK30
object linkers; and MPLIB™ and MPLAB LIB30 object librarians.
• Emulators – The latest information on Microchip in-circuit emulators. This
includes the MPLAB ICE 2000 and MPLAB ICE 4000.
• In-Circuit Debuggers – The latest information on the Microchip in-circuit
debugger, MPLAB ICD 2.
• MPLAB IDE – The latest information on Microchip MPLAB IDE, the Windows
operating system Integrated Development Environment for development systems
tools. This list is focused on the MPLAB IDE, MPLAB SIM and MPLAB SIM30
simulators, MPLAB IDE Project Manager and general editing and debugging
features.
• Programmers – The latest information on Microchip programmers. These include
the MPLAB PM3 and PRO MATE
PICSTART
®
Plus development programmer.
®
II device programmers and the
®
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
• Development Systems Information Line
Customers should contact their distributor, representative or field application engineer
(FAE) for support. Local sales offices are also available to help customers. A listing of
sales offices and locations is included in the back of this document.
Technical support is available through the web site at:
http://support.microchip.com
In addition, there is a Development Systems Information Line which lists the latest
versions of Microchip’s development systems software products. This line also
provides information on how customers can receive currently available upgrade kits.
The Development Systems Information Line numbers are:
Thank you for purchasing the PICDEM LCD 2 Demonstration Kit from Microchip
Technology Incorporated. The PICDEM LCD 2 demonstrates the capabilities of the
PIC18FXXJ90, PIC18FXX90 and PIC16X9XX families of devices.
The PICDEM LCD 2 can be used stand-alone with a preprogrammed part, with an
in-circuit emulator (e.g., MPLAB
ICD 2). Sample programs are provided to demonstrate the unique features of the
supported devices.
The PICDEM LCD 2 Demonstration Kit comes with the following:
1. PICDEM LCD 2 Demonstration Board (Figure 1-1)
2. Sample Plug-in Module (PIM)
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.
1.2PICDEM LCD 2 DEMONSTRATION BOARD HARDWARE FEATURES
The PICDEM LCD 2 Demonstration Board has the following hardware features; each
feature’s number corresponding to the number in Figure 1-1:
1. The demonstration board provides a daughter board option for the
PIC18F85J90, PIC18F8490, PIC16F914/917 and PIC16F946 families of devices
and MPLAB ICE. The board is also supplied with a PIM populated with a
PIC18F85J90 device.
Note:Optional PIMs populated with PIC18FXX90 and PIC16F9XX devices are
available for purchase from Microchip Direct (www.microchipdirect.com).
The MPLAB ICE can be plugged onto the board without any transition socket for
PIC18FXX90 devices. For other devices, a transition socket may be needed.
2. On-board adjustable voltage regulator for direct input from 9V, 100 mA AC/DC
wall adapter or 3V button cell battery.
3. Jumper J15 to select different power options.
4. Green power-on indicator LED for direct input from 9V.
5. Varitronix custom segmented LCD display.
6. Jumpers, COM0, COM1, COM2 and COM3, to disconnect COM pins from
on-board LCD and allow the usage of any customized LCD glass.
7. RS-232 connection and associated hardware for direct connection to RS-232
interface.
8. Jumpers, JP13 and JP14, to disconnect TX and RX.
9. In-Circuit Debugger (ICD) connector.
10. R44, 10 kΩ, potentiometer for devices with analog inputs.
11. Five push button switches (S1 through S5) for external stimulus and Reset.
12. Jumpers, JP19, JP18, JP1 and JP2, to disconnect switches from RB6, RB7, RA6
and RA7 input pins.
13. Jumper, J11, to select either 10 kΩ (POT R44) or the S1-S4 switches to AN0
(RA0).
14. Two green LEDs connected to RC3 and RC4 (device dependent).
15. Jumpers in J14 to disconnect LEDs from RC3 and RC4.
16. A slide switch (S6) to select either the resistor ladder or the charge pump option
for generating the bias values for the LCD pins.
17. Jumper, JP21, to physically tie the resistor ladder to ground.
18. Unpopulated holes provided for crystal connection.
19. Jumpers, JP11 and JP12, to disconnect crystal from OSC1 and OSC2.
20. 32.768 kHz crystal with Timer1 for Real-Time Clock (RTC) operation.
21. A Microwire EEPROM 93AA46C provided on a socket.
22. Jumpers, JP15 and JP16, to disconnect EEPROM from CK and DT. Jumper, J6,
to connect CS to GND or to RC4 (device dependent). Jumper, J13, to select
either 128 x 8 or 64 x 16 memory organization.
23. Thermistor for sensing temperature.
24. Jumper, JP5, to connect thermistor to AN1 (RA1) (device dependent).
25. Jumper, JP17, to select either V
26. Unpopulated option for TC77 temperature sensor.
27. Prototype area for user hardware.
28. PICtail™ daughter board connection. (The pin names on the board are valid only
for the PIC18F8490 device. For other devices, the PICtail daughter board pin
connections may be different or not connected.)
A PIM, populated with the PIC18F85J90, is included.
1.4SAMPLE PROGRAMS
The PICDEM LCD 2 Demonstration Kit includes a CD-ROM with sample demonstration
programs. Depending on the device, these programs may be used with some of the
included sample devices with an In-Circuit Emulator (ICE) or with an In-Circuit
Debugger (ICD). For each type of device (PIC16F946, PIC16F917, PIC18F8490 and
PIC18F85J90), demo source code, several C and/or .asm files and compiled code
(one HEX file) are provided.
The PICDEM LCD 2 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 PIC
Development Systems Ordering Guide”
2.1PICDEM LCD 2 AS A STAND-ALONE BOARD – PREPROGRAMMED DEVICE
The PICDEM LCD 2 may be demonstrated immediately by following the steps listed
below:
• Apply power to the PICDEM LCD 2. For information on acceptable power
microcontroller compatible ICEs or ICDs, please refer to the
(DS30177)
sources, see Appendix A. “Board Technical Information”.
Note:In the event that the preprogrammed PICDEM LCD 2 Demonstration Board
with the PIC18F85J90 PIM does not operate, check the following
conditions:
- The jumper, J15, is configured as per the power supply used. The slide
switch, S6, is switched to C.
- JP1, JP2, JP6, JP18 and JP19 are connected.
- The middle two jumpers of J14 are connected.
- JP9 and JP10 are connected.
- J11 connecting POT to AN0 and JP17 connecting V
The status of all other jumpers will not affect the preprogrammed
demonstration.
Refer to Figure A-1 in Appendix A. “Board Technical Information”.
.
“Microchip
CC to I/O.
To reprogram the sample device, the following will be necessary:
1. User source code may be programmed to the device or the sample program may
be restored from the file on the included CD-ROM.
2. An assembler, such as the MPASM™ Assembler (available with MPLAB IDE), or
a compiler, such as MPLAB C18 C Compiler (PIC18XXXX/18XXJXX devices
only) must be used.
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.
3. Once the sample program is in the HEX file format, it can be programmed to a
Flash device using an MPLAB ICD 2 or PM3 with an ICSP™ module. Microchip
Technology’s MPLAB ICD 2 is compatible with MPLAB IDE.
If the code protection bit(s) have not been programmed, the on-chip program
memory can be read out for verification purposes.
2.2PICDEM LCD 2 USED WITH AN IN-CIRCUIT EMULATOR OR IN-CIRCUIT
DEBUGGER
To use the PICDEM LCD 2 with an In-Circuit Emulator (ICE) or In-Circuit Debugger
(ICD), refer to the tool’s user’s guide for instructions on how to power-up and configure
the ICE/ICD, as well as how to connect to target boards.
Configure the PICDEM LCD 2 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™ LCD 2
CrystalJP9 and JP10 not connected. No canned oscillator on board,
crystal in Y2, JP11 and JP12 connected, caps in C16 and C17.
Canned OscillatorPut canned oscillator on socket Y3. Y2 empty, JP9, JP11 and
JP12 not connected.
Device Internal OscillatorJP11 and JP12 not connected. No canned oscillator on board.
Ceramic Resonator – no
internal caps
Ceramic Resonator – with
internal caps
JP9 and JP10 not connected. No canned oscillator on board,
resonator in Y2, JP11 and JP12 connected, caps in C16 and
C17.
JP9 and JP10 not connected. No canned oscillator on board,
resonator in Y2, JP11 and JP12 connected, C16 and C17
empty.
Modification on PICDEM™ LCD 2
Note:The MPLAB ICE can be plugged onto the board without any transition
socket for PIC18FXX90 devices. For other devices, a transition socket may
be needed.
The demo programs are preprogrammed into the sample devices. Also, this program
is included on the CD-ROM program disk for user reference. This demo program uses
the functions or macros provided by the firmware LCD driver module to display the
required characters, strings or icons on the LCD.
3.1DEMO FIRMWARE OPERATION
The demo firmware is made up of four components, which are individually displayed on
the LCD. The PIC microcontroller’s internal RC oscillator is used as the system clock
source.
1. Voltmeter (F1)
This mode uses the A/D module to measure the voltage of the R44 pot through
analog channel AN0, and displays a voltage between 0.00V and 3.30V on the
LCD using the LCD module. Voltage is continually updated until the mode is
exited by pressing either the S1 or S2 switch.
2. Thermometer (F2)
This mode uses the A/D module to measure the voltage of the thermistor R11
through analog channel AN1, and converts to temperature both in Celsius and
Fahrenheit and displays the temperature on the LCD using the LCD module.
Temperature is continually updated until the mode is exited by pressing either the
S1 or S2 switch.
3. Clock (F3)
This mode uses the Timer1 module and a 32 kHz clock crystal. Once this mode
is entered from the main menu, the Real-Time Clock will start counting from
00:00:00. The S3 switch is used to increment minutes and the S4 switch is used
to increment hours. To perform the increment operations, press and hold the
switches. The clock keeps running continuously until the mode is exited by
pressing either the S1 or S2 switch.
4. Charge Pump and Software Contrast (F4)
This mode is available only for the PIC18F85J90 family of devices and uses the
on-board charge pump and LCD voltage regulator. The LCD module is configured in Charge Pump mode and software contrast is achieved by either pressing
S3 to increase the contrast or S4 to decrease the contrast until the mode is exited
by pressing either the S1 or S2 switch. By exiting this mode, the Voltmeter mode
is entered and retains the contrast level.
(1)
KIT USER’S GUIDE
(1)
Note 1:For low-power battery operation in JP17, remove jumper on Vcc and I/O
The PICDEM LCD 2 hardware is not complicated and is intended to illustrate the ease
of use of various PIC
hardware elements.
Note:Many of the following hardware sections will require specific demo board
jumper configurations. If a jumper is not listed in a particular section, then
that jumper has no effect on the circuitry within the hardware section you
are working. Figure A-1 shows a diagram of the PICDEM LCD 2 silkscreen
with all necessary jumpers highlighted in gray. Also, refer to the schematic
for circuit connections.
®
microcontrollers. The PICDEM LCD 2 features the following
While there is no actual processor populated on the board, a processor is provided with
the plug-in module (PIM) that is shipped with the demonstration board. The default
processor on the PIM is the PIC18F85J90.
The board also supports the PIC18F8490, PIC16F946 and PIC16F917 processors,
which have been designed for use with the PICDEM LCD 2. These three processors
are in the PICDEM LCD 2 PIM Pack which is available for separate purchase.
The part numbers for a replacement PIC18F85J90 and the PIM pack are given in
Ta bl e A - 1.
TABLE A-1:PART NUMBERS
ItemPart number
PICDEM LCD 2 PIM Pack
• PIC18F8490 PIM
• PIC16F946 PIM
• PIC16F917 PIM
PIC18F85J90 PIMMA180022
For the availability and pricing of parts, go to www.microchipdirect.com.
A custom made segmented LCD glass, manufactured by the Varitronix Corporation, is
provided as shown in Figure A-2. This LCD has 4 commons and 32 segments.
Table A-2 provides a few of the specifics for the display. Refer to the Varitronix
specification sheet (VL_5573_V00) for additional details.
Since the glass used on the PICDEM LCD 2 operates at 3V, there is a voltage protection circuit on the LCDBIAS3 pin, which is enabled in the default configuration. When
enabled, even if the V
DD is greater than 3V, it regulates the LCDBIAS3 voltage such
that it always maintains the value to 3V. This is not necessary for operation of the LCD
module, but it is a protection circuit to prevent accidentally applying voltages higher
than 3V to the LCD glass present on the board.
Legend: Unshaded cells indicate a perfect match between the PIM and the glass.
A.3LED DISPLAY
Two green LEDs are connected to RC3 and RC4 of U1A through the J14 pins, 1, 2 and
7, 8 (outer ends), respectively.
One green LED is provided to determine whether there is power to the LCD 2
Demonstration Board (LED on) or not (LED off).
PIC16F917 PortPIC16F917 PinICE PinICE Port
RA0AN0AN0RA0
RA1AN1AN1RA1
RA6T1OSCOT1OSCORC0
RA7T1OSCIT1OSCIRC1
RB0RB0RB0RB0
RB5COM1COM1RE4
RB6RB6RB6RB6
RB7RB7RB7RB7
RC0VLCD1BIAS1RE0
RC1VLCD2BIAS2RE1
RC3SEG6SEG11RB4
RC4SEG11SEG14RA4
RC6TX/CKTX/CKRC6
RC7RX/DTRX/DTRC7
Shaded cells indicate the pins that are remapped to the corresponding pin on the PIM.
Note 1:For the PIC18F85J90 PIM, the RG2 and RG3 pins are connected to RC3
and RC4 of U1A, respectively.
2:For the PIC16F17 PIM, the RD1 and RD2 pins are connected to RC3 and
RC4 of U1A, respectively.
3:For the PIC18F8490 PIM, the RC3 and RD4 pins are connected to RC3
and RC4 of U1A, respectively
A.4CHARGE PUMP AND VLCAP
For charge pump mode operation in PIC18F85J90 devices, it is required that RC3 and
RC4 of U1A connect to charge pump capacitor C7 through the J14 pins, 3, 4 and 5, 6
(inner pins), respectively.
A.5RESISTIVE LADDER VERSUS CHARGE PUMP
The switch, S6, allows the connection of either the resistor ladder or the capacitors to
the BIAS pins to generate the BIAS voltages for the LCD operation. For the charge
pump mode operation in PIC18F85J90 devices, it is required that the S6 switch is
flipped towards C and the VLCAP is connected through the inner jumpers of J14. For
the resistor ladder, S6 must be flipped towards R. The R45 potentiometer controls the
contrast to the LCD in the Resistive Ladder mode.
A.5.1Jumper JP21
When jumper JP21 is on, the LCDBIAS0 is physically tied to ground. The jumper needs
to be on for PIC18F85J90 devices when the bias voltages are generated through the
resistor ladder.
The on-board firmware uses the internal RC oscillator running at 8 MHz.
• Internal RC oscillator running at 8 MHz can be used.
• Pads provided for user-furnished crystal/resonator (Y2) and two capacitors
(C16 and C17).
• Socket provided for a canned oscillator (Y3). This oscillator can be disabled by
removing jumpers, JP9, JP11 and JP12.
• 32.768 kHz (watch-type) crystal for Timer1 (Y1) is always connected to RC0 and
RC1.
A.7RS-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 (PI). The port is configured
as DCE and can be connected to a PC using a serial cable.
A.8REAL-TIME CLOCK
This circuit allows the user to configure a PIC microcontroller for timekeeping using a
32.768 kHz clock crystal connected to Timer1 module’s T1OSO and T1OSI pins.
A.9SERIAL EEPROM
A socket for a Microwire EEPROM is provided on the board to illustrate usage of
the Synchronous mode of operation of the USART module. For its operation:
• Jumpers, JP15 and JP16, should be connected.
• In the jumper, J6, U9-CS should be connected with RB5.
• In the jumper, J13, U9-ORG (pin 6) should be connected to GND.
Note 1:For the PIC18F85J90 PIM, the RG2 and RG3 pins are connected to RC3
2:For the PIC16F917 PIM, the RD1 and RD2 pins are connected to RC3
3:For the PIC18F8490 and the PIC16F946 PIMs, the RC3 and RC4 pins
A.10ANALOG INPUT
A 10 kΩ potentiometer is connected through a series of 100Ω resistors to AN0. The
potentiometer can be adjusted from V
connecting the potentiometer to AN0.
and RC4 of U1A, respectively.
and RC4 of U1A, respectively.
are connected to RC3 and RC4 of U1A, respectively.
A 10 kΩ TC thermistor (R11) is provided to sense the temperature. It is connected to
AN1 (RA1) through the jumper, JP5. An optional unpopulated TC77-based circuit is
provided to read the temperature serially using the USART module. The jumpers, JP15
and JP16, are to be connected and RA1 of U1A should be made digital to be used to
enable TC77.
Note 1:For the PIC18F85J90 PIM, the RA2 pin is connected to RA1 of U1A and
AN2 is used instead of AN1.
2:For the PIC18F8490, PIC16F946, and PIC16F917 PIMs, the RA1 pin is
connected to RA1 of U1A.
A.12SWITCHES
Four switches provide the following functions for digital I/Os:
• S1 – Active-low switch connected to RB6.
• S2 – Active-low switch connected to RB6 and RB7.
• S3 – Active-low switch connected to RB6, RB7 and RA6.
• S4 – Active-low switch connected to RB6, RB7, RA6 and RA7.
For this type of sensing, the jumpers, JP1, JP2, JP6, JP18, JP19, JP9 and JP10,
should be connected and the potentiometer should be connected to AN0 through J11.
Sensing should be done in the sequence, S1, S2, S3 and S4, only. Individual switch
sensing is not allowed.
Additionally, the four switches provide the following functions for analog input (AN0):
• S1 – AN0 will be approximately at V
• S2 – AN0 will be approximately at V
• S3 – AN0 will be approximately at V
• S4 – AN0 will be approximately at V
For this type of sensing, the jumpers, JP1, JP2, JP6, JP18 and JP19, should not be
connected and the SWT should be connected to AN0 through J11.
CC/2.
CC/3.
CC/5.2.
CC/7.7.
A.13ICD CONNECTOR
By way of the modular connector (J37), the MPLAB ICD 2 can be connected for
low-cost debugging. The ICD connector utilizes RB6/PGC and RB7/PGD of the
microcontrollers for in-circuit debugging.
There are four ways to supply power to the PICDEM LCD 2:
• A 3V button cell (CR2032) can be plugged into BT1.
• A 9V, 100 mA unregulated AC to DC supply can be plugged into J5. A
power supply can be purchased through Microchip Technology
(Part Number AC162039).
• A 100 mA regulated DC supply of maximum +5V can be connected to the hooks
provided.
Note:There is one J15 jumper associated with the power supply circuit. This
jumper must be correctly connected to select the required power supply.
Refer to Figure A-9 for jumper setting examples.
MPLAB ICD 2 users may use the ICD to power the target board to 5V, up to 200 mA,
for the following devices
PIC18F85J90 family of devices do not support this capability.
The default power on the board is 5V. The board voltage can be varied based on
resistors populated on the PIM in conjunction with the processor being used.
FIGURE A-9:J15 POWER SUPPLY CIRCUIT SETTING EXAMPLES
only
: PIC18F8490, PIC16F946 and PIC16F916. The
EXAMPLE AEXAMPLE BEXAMPLE C
J15
1
3
5
VLCDBIAS = 3V, External Power
a)External Supply with
VLCDBIAS Regulated
(Default): This is the recommended jumper setting to
operate when using external
supply. This configuration
allows the VLCDBIAS to be
regulated to 3V even if the V
of the board is higher than 3V.
Note:For all examples shown above, the voltage regulation on the VLCDBIAS for 3V is not required for the
2
4
6
b)Battery Operation: This is the
recommend jumper setting
when operating on a battery. In
this configuration, VLCDBIAS is
directly connected to the battery
voltage.
DD
regular operation of the module or device. It is added here for additional protection for the glass since
the board is capable of generating 3.3V or 5V depending on the PIM being used.
J15
1
3
5
VLCDBIAS = Battery
2
4
6
1
3
5
VLCDBIAS = VCC
c)External Supply with VLCDBIAS
Unregulated: This is not recommended to use with on-board glass
as voltage higher than 3V may
damage the glass.
If an external glass is connected to
J2 and is capable of handling
higher voltages, then this jumper
setting allows V
directly to the VLCDBIAS when an
external power supply is used.
The PICDEM LCD 2 board features an adjustable voltage regulator, the venerable
LM317. It is U3 on the board, and can be recognized by the SO-223 package on the
upper left side. Nearby, there is a header, J10, and two resistors, R25 and R26. R25
and R26 are used to set the output voltage of the LM317. By default, R25 = 1K and
R26 = 330R, which results in an output voltage of 5.0V.
The reason an adjustable voltage regulator is provided is so that the PICDEM LCD 2
Demonstration Board can be used with a wide range of LCD PIC microcontrollers. The
PIC18FXXJ90 family of devices tolerates a maximum V
PIC18FXX90, PIC16F91X and PIC16F946 tolerate a maximum V
adjustable voltage regulator allows a different V
DD to be provided for PIC18FJ devices
and PIC18F and PIC16F LCD devices.
The switching between 3.6V and 5.5V parts is very convenient. The plug-in module
boards are populated with the R101 and R102, appropriately, according to the processor module requirement which mates with the daughterboard/emulator header that
surrounds the ICE module (U1A). J10 on the PICDEM LCD 2 board is intended to connect with the 3-pin header on the plug-in module. This allows the resistors, R101 and
R102, on the plug-in module to be connected in parallel to the resistors, R25 and R26.
This way V
DD can automatically be adjusted to the voltage appropriate to the part
soldered onto the plug-in module.
The plug-in module is prepopulated with the values shown in Table A-16:
TABLE A-16:PIM PREPOPULATED VALUES
ModuleR101R102VDD
PIC18F85J90Open1.18K3.3V
PIC18F8490OpenOpen5.0V
PIC16F914/917OpenOpen5.0V
PIC16F946OpenOpen5.0V
DD of 3.6V, whereas the
DD of 5.5V. The
For V
DD = 3.3 volts, R101 can be left unpopulated and R102 can be 1.18K.
(1% resistors are recommended for precise adjustment of V
Now, let’s look at how to determine R101 and R102 if a different V
DD.)
DD is desired. First,
it is a good idea to look at the data sheet for the LM317 to understand how the voltage
is adjusted. We won’t duplicate all the details here. The following equation is taken from
an LM317 data sheet:
EQUATION A-1:
VOUT = VREF (1+ R2/R1) + IADJ * R2
I
ADJ is minimized by the LM317, so it can be assumed to be zero or at least very small.
V
REF =1.25V; it is the reference voltage developed by the LM317 between the output
For a desired VOUT, first solve for R2, given R1 = R26 = 330R. Then, knowing R2 and
R25, solve for R102. Determine the nearest available resistor value for R102 and
recalculate the resulting V
part you will be using.
Table A-17 shows values for R101 and R102 for different V
R25 and R26 on the PICDEM LCD 2 Board are left as their default values of 1K and
330R.
DD to make sure it doesn’t exceed the maximum VDD for the
DD values, assuming that
TABLE A-17:R101 AND R102 V
VDDR101R102
5VOpenOpen
3.6VOpen1.62K
3.3VOpen1.18K
3.0VOpen866R
DD VALUES
Recommended operating voltages for the various PIMs are:
• PIC18F85J90 family of devices – 3.3V
• PIC18F8490 family of devices – 5V
• PIC16F917/914 devices – 5V
• PIC16F946 – 5V (when operating on an external 9V DC supply)
A.14.2Slide Switch (S6)
The slide switch allows choosing the BIAS values, either generated by the resistor
ladder, or by the capacitive charge pump. When S6 is switched to the left, the LCDBIAS
pins of the microcontroller are connected to the resistor ladder. When S6 is switched to
the right, the LCDBIAS pins of the microcontroller are connected to the capacitor
network.