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 t he lik e is provided only for your convenience
and may be su perseded by upda t es . It is y our 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 supp ort and/or safety ap plications is entir ely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless M icrochip from any and all dama ges, claims,
suits, or expenses re sulting from such use. No licens es are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
K
logo, rfPIC and UNI/O are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL 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, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified
logo, MPLIB, MPLINK, mTouch, Omniscient Code
Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit,
PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance,
TSHARC, UniWinDriver, 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 design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial 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.
A.14 Power Supp ly ........................................................... ... .. ............................. 49
A.15 Board Lay o u t a nd Schematics ................................................................... 52
A.16 PIM Layout and Schematics ......................................................................56
Worldwide Sales and Service ....................................................................................66
2010 Microchip Technology Inc.DS51662C-page 3
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
NOTES:
DS51662C-page 4 2010 Microchip Technology Inc.
PICDEM™ LCD 2 DEMONSTRATION
KIT USER’S GUIDE
Preface
NOTICE TO CUSTOMERS
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 p age 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 online help files.
The VL logo is a registered logo of V aritronix Limited. The illustrations on pages 26, 27,
31, 36, 39 and 45 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 Board. Items discussed in this chapter include:
• Document Layout
• Conventions Used in this Guide
• Warranty Registration
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
• Customer Support
• Document Revision History
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. “Getti ng Started” – Describes how to use the PICDEM LCD 2
Demonstration Board.
• Chapter 3. “Using the Demo So ftware” – Describes how to use the application
in Demo mode and also how it can be customized.
• Appendix A. “Board T echnical Informa tion” – Shows the schematic and layout
diagrams for the PICDEM LCD 2 Demonstration Board.
2010 Microchip Technology Inc.DS51662C-page 5
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
CONVENTIONS USED IN THIS GUIDE
This manual uses the following docum entat io n conven tion s:
DOCUMENTATION CONVENTIONS
DescriptionRepresentsExamples
Arial font:
Italic chara c tersReferenced booksMPLAB
Emphasized text...is the only compiler...
Initial capsA windowthe Output window
A dialogthe Settings dialog
A menu selectionselect Enable Programmer
QuotesA field name in a window or
dialog
Underlined, italic text with
right angle bracket
Bold charactersA dialog buttonClick OK
N‘RnnnnA number in verilog format,
Text in angle brac kets < >A key on the keyboardPress <Enter>, <F1>
Courier New font:
Plain Courier NewSample source code#define START
Italic Courier NewA variable argumentfile.o, where file can be
Choice of mut ually exclus ive
arguments; an OR selection
Represents code supplied by
user
“Save project before build”
4‘b0010, 2‘hF1
any valid filename
[options]
errorlevel {0|1}
var_name...]
void main (void)
{ ...
}
®
IDE User’s Guide
DS51662C-page 6 2010 Microchip Technology Inc.
WARRANTY REGISTRATION
Please complete the enclosed Warranty Registration Card and mail it promptly.
Sending in the Warranty Registration Card entitles users to receive new product
updates. Interim software releases are available at the Microchip web site.
RECOMMENDED READING
Preface
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” (DS39770)
“PIC18F87J90 Family Data Sheet” (DS39933)
“PIC18F6390/6490/8390/8490 Data Sheet” (DS39629)
“PIC16C9XX Data Sheet” (DS30444)
“PIC16C925/926 Data Sheet” (DS39544)
“PIC16F917/916/914/913 Data Sheet” (DS41250)
"PIC16F/LF1946/47 Data Sheet" (DS41414)
®
IDE installation directory. The Readme files
2010 Microchip Technology Inc.DS 51662C-page 7
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
THE MICROCHI P 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 listin g
• 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 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
Integrated Development Environment for development systems tools. This list is
focused on the MPLAB IDE, MPLAB SIM simulator, 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
Plus and PICkit™ 1 development programmers.
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
®
II device programmers and the PICSTART®
DS51662C-page 8 2010 Microchip Technology Inc.
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
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
DOCUMENT REVISION HISTORY
Revision C (November 2010)
• Added device information for the PIC16F/LF1946/7.
Preface
2010 Microchip Technology Inc.DS 51662C-page 9
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
NOTES:
DS51662C-page 10 2010 Microchip Technology Inc.
1.1WELCOME
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, PIC16X9XX, and PIC16X19XX 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 prog r a ms are pro v ided to de mon st rat e th e un iq ue fe at ur es of the
supported devi ces.
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.
PICDEM™ LCD 2 DEMONSTRATION
KIT USER’S GUIDE
Chapter 1. Introduction
®
ICE) or with an in-cir cu it de bu gg er ( e.g . , MP LA B
• Sample Programs
• “PICDEM™ LCD 2 Demonstration Kit User’s Guide”
2010 Microchip Technology Inc.DS51662C-page 11
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
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, PIC18F87J90, PIC18F8490, PIC16F914/917, PIC16F946, and
PIC16F/LF1946/47 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, PIC18FXX90, PIC16F9XX,
and PIC16X19XX 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.)
CC or I/O to power the peripherals.
DS51662C-page 12 2010 Microchip Technology Inc.
FIGURE 1-1:PICDEM™ LCD 2 HARDWARE
1
2
3
26
56
15
8
9
10
11
12
13
14
16
17
181923
2
22
27
24
2125 20
4
7
28
Introduction
1.3SAMPLE DEVICES
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,
PIC18F85J90, PIC18F87J90 and PIC16F/LF1946/47), demo source code, several C
and/or .asm files and compiled code (one HEX file) are provided.
2010 Microchip Technology Inc.DS51662C-page 13
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
NOTES:
DS51662C-page 14 2010 Microchip Technology Inc.
PICDEM™ LCD 2 DEMONSTRATION
KIT USER’S GUIDE
Chapter 2. Getting Started
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” (DS30177).
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 “Microchip
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”.
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.
2010 Microchip Technology Inc.DS51662C-page 15
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
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 T able 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 an d 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.
DS51662C-page 16 2010 Microchip Technology Inc.
PICDEM™ LCD 2 DEMONSTRATION
Chapter 3. Using the Demo Software
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 and PIC18F87J90 families 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 V
and connect I/O and RB0.
2010 Microchip Technology Inc.DS51662C-page 17
CC and I/O
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
Power-up
Display the Voltage
Is S1/S2
switch pressed?
Start A/D
Display Microchip Logo
Display Varitronix Logo
Display F1
Conversion on
Sleep
Sleep
Yes
A
Wake-up from Sleep
by Pressing either S1 or S2
Wake-up from Sleep
B
Voltmeter Demo
Channel AN0
on Completion of Conversion
No
FIGURE 3-1:DEMO PROGRAM FLOWCHART
DS51662C-page 18 2010 Microchip Technology Inc.
Using the Demo Software
Display the Temperature
Is S1/S2
switch pressed?
Display F2
Sleep
Yes
Wake-up from Sleep
on Completion of Conversion
B
Start A2D
Conversion on
Channel AN1
No
Thermometer Demo
C
FIGURE 3-2:DEMO PROGRAM FLOWCHART
2010 Microchip Technology Inc.DS51662C-page 19
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
Is S4
switch pressed?
Display F3
Display Time
Increment
D
Is S1/S2
switch pressed?
Is S3
switch pressed?
No
Yes
No
Minute
Yes
Increment
Hour
Yes
No
Real-Time Clock Demo
C
Sleep
Wake-up from Sleep
Every Second
FIGURE 3-3:DEMO PROGRAM FLOWCHART
DS51662C-page 20 2010 Microchip Technology Inc.
Using the Demo Software
Is S4
switch pressed?
Display F4
Display
Increase
A
Is S1/S2
switch pressed?
Is S3
switch pressed?
No
Yes
No
Contrast
Yes
Decrease
Contrast
Yes
No
Software Contrast Demo
D
LCDREG<BIAS> bits
using Charge Pump
FIGURE 3-4:DEMO PROGRAM FLOWCHART
2010 Microchip Technology Inc.DS51662C-page 21
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
Increment Second Register
Clear Second
Is it 60?
Register,
Increment Minute
ISR
Register
Is it 60?
Clear Minute
Register,
Increment Hour
Register
Is it 24?
Clear Hour Register
Return
Yes
No
Yes
No
Yes
No
FIGURE 3-5:DEMO PROGRAM FLOWCHART
DS51662C-page 22 2010 Microchip Technology Inc.
PICDEM™ LCD 2 DEMONSTRATION
KIT USER’S GUIDE
Appendix A. Board Techni cal Information
The PICDEM™ LCD 2 hardware is not complicated and is intended to illustrate the
ease of use of various PIC
ing 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 follow-
2010 Microchip Technology Inc.DS51662C-page 23
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
FIGURE A-1:PICDEM™ LCD 2 DEFAULT JUMPER LOCATION
DS51662C-page 24 2010 Microchip Technology Inc.
A.1PROCESSORS
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 PIC18F87J90, PIC18F8490, PIC16F946, PIC16F917,
and PIC16F/LF1946/47 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
Table A-1.
Board Technical Information
TABLE A-1:PART NUMBERS
ItemPart number
PICDEM LCD 2 PIM Pack
• PIC18F8490 PIM
• PIC16F946 PIM
• PIC16F917 PIM
PIC18F85J90 PIMMA180022
PIC16F1946/7 PIM
PIC16LF1946/7 PIM
†
For the availability and pricing of parts, go to www.microchipdirect.com.
(†)
MA180019
MA160016
MA160015
Note:The PIC16LF1946/7 PIM (MA160015) is limited to a maximum of 3.3V
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
Shaded cells indicate the pins that are remapped to the corresponding pin on the PIM.
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).
Note 1:For the PIC18F85J90 and PIC18F87J90 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 and PIC18F87J90 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 and PIC18F87J90 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 and PIC18F87J90 devices when the bias voltages are
generated through the resist or ladder.
DS51662C-page 46 2010 Microchip Technology Inc.
A.6OSCILLATOR OPTIONS
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.
Board Technical Information
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 and PIC18F87J90 PIM, the RG2 and RG3 pins are
2:For the PIC16F917 PIM, the RD1 and RD2 pins are connected to RC3
3:For the PIC18F8490, PIC16F946 and PIC16F/LF/1946/7 PIMs, the RC3
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.
connected to RC3 and RC4 of U1A, respectively.
and RC4 of U1A, respectively.
and RC4 pins are connected to RC3 and RC4 of U1A, respectively.
CC to GND. The jumper, J11, should be
2010 Microchip Technology Inc.DS51662C-page 47
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
A.11TEMPERATURE SENSOR
A 10 kTC 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 and PIC18F87J90 PIM, the RA2 pin is connected
to RA1 of U1A and AN2 is used instead of AN1.
2:For the PIC18F8490, PIC16F/LF/1946/7, 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.
DS51662C-page 48 2010 Microchip Technology Inc.
Board Technical Information
1
3
5
2
4
6
J15
VLCDBIAS = Battery
1
3
5
2
4
6
J15
1
3
5
2
4
6
J15
VLCDBIAS = VCC
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
DD
of the board is higher than 3V.
VLCDBIAS = 3V, External Power
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.
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
CC to connect
directly to the VLCDBIAS when an
external power supply is used.
EXAMPLE AEXAMPLE BEXAMPLE C
Note:For all examples shown above, the voltage regulation on the VLCDBIAS for 3V is not required for the
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.
A.14POWER SUPPLY
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-11 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 only: PIC18F8490, PIC16F/LF/1946/7, PIC16F946 and
PIC16F916. The PIC18F85J90 and PIC18F87J90 families 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-11:J15 POWER SUPPLY CIRCUIT SETTING EXAMPLES
2010 Microchip Technology Inc.DS51662C-page 49
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
A.14.1Using the Adjustable Voltage Regulator
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 provid ed for PI C18FJ device s
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 daughter board/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-22:
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 will not 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
and adjustment terminal.
That gives us the following equation:
As stated previously, R25 = 1K and R26 = 330. You can see that without R102 and
R101, V
For a desired V
R25, solve for R102. Determine the nearest available resistor value for R102 and
recalculate the resulting V
part you will be using.
Table A-23 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.
OUT = 1.25V(1+ 1K/330R) = 5.04V.
OUT, first solve for R2, given R1 = R26 = 330R. Then, knowing R2 and
DD to make sure it does not exceed the maximum VDD for the
DD values, assuming that
TABLE A-23: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 and PIC18F87J90 families of devices – 3.3V
• PIC18F8490 family of devices – 5V
• PIC16F917/914 devices – 5V
• PIC16F946 – 5V (when operating on an external 9V DC supply)
• PIC16F1946/7 – 5V
• PIC16LF1946/7 – 3.3V
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.
2010 Microchip Technology Inc.DS51662C-page 51
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
A.15BOARD LAYOUT AND SCHEMATICS
The following figures show the parts layout (silkscreen) and schematics for the
PICDEM LCD 2 board.
FIGURE A-12:PI CDEM™ LCD 2 DEMONSTRATION BOARD PARTS LAYOUT (SILKSCREEN)
DS51662C-page 52 2010 Microchip Technology Inc.
Board Technical Information
.1 F
.1 F
.1 F
.1 F
.1 F
.1 F
1 F
V
CC
VCC
VCC
VCC
VCC
VCC
VCC
VCC
V+
INVALID
FORCEON
FORCEOFF
V-
245
6119
1
14
153138101216
7
C1+
C1-
C2+
C2-
EN
GND
V
CC
VDD
VSS
FIGURE A-13:PICDEM™ LCD 2 SCHEMATIC SHEET 1 OF 3
2010 Microchip Technology Inc.DS51662C-page 53
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
VCC
VDD
VSS
VCC
VSS
VDD
VSS
VDD
VCC
VCC
VCC
VCC
AVSS
AVDD
VCC
VSS
VDD
.1 F
.1 F
.1 F
.1 F
.1 F
VCC
VCC
VCC
32 kHz
.1 F
FIGURE A-14:PICDEM™ LCD 2 SCHEMATIC SHEET 2 OF 3
DS51662C-page 54 2010 Microchip Technology Inc.
Board Technical Information
.47 F
.47 F
.47 F
.47 F
1 F
1 F
.1 F
100 F
VCC
VOUT
VIN
VIN
VOUT
.1 F
220 F
FIGURE A-15:PICDEM™ LCD 2 SCHEMATIC SHEET 3 OF 3
2010 Microchip Technology Inc.DS51662C-page 55
PICDEM™ LCD 2 Demonstration Kit Us e r’ s Gui de
PIC18F85J90 PICDEM™ LCD 2
PIC18F65J90
M
PICDEM™ LCD 2
PIC16F917/914
A.16PIM LAYOUT AND SCHEMATICS
The following figures show the layout (silkscreen) for the individual PIMs.
FIGURE A-16:PIC18F65J90 AND PIC18F85J90 PIM LAYOUT