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