Professional Documents
Culture Documents
Users Guide
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 Microchips 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 Microchips 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.
Table of Contents
Preface ........................................................................................................................... 1
Chapter 1. PIC18F4XK20 Starter Kit Overview
1.1 Overview ........................................................................................................ 5
1.2 Highlights ........................................................................................................ 5
1.3 PIC18F4XK20 Starter Kit Contents ................................................................ 5
1.4 PIC18F4XK20 Starter Kit Layout .................................................................... 6
1.4.1 Analog Input Filtering Circuit ....................................................................... 7
1.4.2 PWM Filtering from RC2 .............................................................................. 7
1.4.3 PICtail Daughter Board Interface ............................................................. 7
1.4.4 PICkit Serial Analyzer Connector ............................................................. 7
1.4.5 ICSP (In-Circuit Serial Programmer) Connector .................................. 7
1.4.6 Temperature Sensor ................................................................................... 8
1.4.7 25LC1024 Serial EEPROM ......................................................................... 8
1.4.8 32.768 kHz Crystal ...................................................................................... 8
1.4.9 128x64 OLED .............................................................................................. 8
1.5 Powering the Demo Board ............................................................................. 8
1.6 Quick Start Guide ........................................................................................... 8
1.6.1 Downloading Demonstration Software ........................................................ 8
1.7 Programming Lessons ................................................................................. 10
Chapter 2. Troubleshooting
2.1 Introduction ................................................................................................... 11
2.1.1 The board does not power up. .................................................................. 11
2.1.2 Microcontroller is not executing code. ....................................................... 11
2.1.3 The microcontroller will not program. ........................................................ 11
Appendix A. Board Schematics
A.1 Introduction .................................................................................................. 13
Worldwide Sales and Service .................................................................................... 20
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 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 IDE on-line help.
Select the Help menu, and then Topics to open a list of available on-line help files.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
PIC18F4XK20 Starter Kit. Items discussed in this chapter include:
Document Layout
Conventions Used in this Guide
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 PIC18F4XK20 Starter Kit as a development
tool to emulate and debug firmware on a target board. The manual layout is as follows:
Chapter 1. PIC18F4XK20 Starter Kit Overview Introduces the PIC18F4XK20
Starter Kit and provides a brief description of the hardware and the new features.
Chapter 2. Troubleshooting Describes the common problems of the
PIC18F4XK20 Demonstration Board and their solutions.
Appendix A. Board Schematics Provides schematic diagrams for the
PIC18F4XK20 Demonstration Board.
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters Referenced books MPLAB IDE Users Guide
Emphasized text ...is the only compiler...
Initial caps A window the Output window
A dialog the Settings dialog
A menu selection select Enable Programmer
Quotes A field name in a window or Save project before build
dialog
Underlined, italic text with A menu path File>Save
right angle bracket
Bold characters A dialog button Click OK
A tab Click the Power tab
NRnnnn A number in verilog format, 4b0010, 2hF1
where N is the total number of
digits, R is the radix and n is a
digit.
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Filenames autoexec.bat
File paths c:\mcc18\h
Keywords _asm, _endasm, static
Command-line options -Opa+, -Opa-
Bit values 0, 1
Constants 0xFF, A
Italic Courier New A variable argument file.o, where file can be
any valid filename
Square brackets [ ] Optional arguments mcc18 [options] file
[options]
Curly brackets and pipe Choice of mutually exclusive errorlevel {0|1}
character: { | } arguments; an OR selection
Ellipses... Replaces repeated text var_name [,
var_name...]
Represents code supplied by void main (void)
user { ...
}
RECOMMENDED READING
This user's guide describes how to use the PIC18F4XK20 Starter Kit. Other useful doc-
uments are listed below. The following Microchip documents are available and recom-
mended as supplemental reference resources.
PIC18F46K20 Data Sheet (DS41303)
This data sheet summarizes the features of the PIC18F46K20. It provides essential
information needed to develop software for this device.
MCP9700/9700A and MCP9701/9701A Data Sheet (DS21942)
This data sheet summarizes the features of the MCP9700/9700A and
MCP9701/9701A. It provides essential information needed to develop software for
these devices.
MCP001/2/4 Data Sheet (DS21733)
This data sheet summarizes the features of the MCP001/2/4. It provides essential
information needed to develop software for these devices.
25LC1024 Data Sheet (DS22064)
This data sheet summarizes the features of the 25LC1024. It provides essential
information needed to develop software for this device.
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
1.1 OVERVIEW
The PIC18F4XK20/2XK20 is a new family of microcontrollers that take advantage of
Microchips latest process technology. Among the most notable of the new features are:
lower power consumption
high-performance operation and
low-cost
Several firmware demos that showcase some of the features are included, as well as
a PICkit 2 Development Programmer, which can be used to download the demos
onto the development board.
The hardware included on the board allows for development as well. The microcontroller
that is populated on the board, the PIC18F46K20, is the superset of the PIC18F4XK20/2XK20
family. Included on the board are various analog and digital circuitry used in
microcontroller applications, in addition to a header which breaks out all signal lines for
analysis or interfacing to external devices.
1.2 HIGHLIGHTS
This chapter discusses the features of the PIC18F4XK20 Starter Kit. Topics discussed
include:
PIC18F4XK20 Starter Kit Contents
PIC18F4XK20 System Management Layout
Powering the Demo Board
Quick Start Guide
Programming Lessons
PICtailTM Header
32 kHz xTAL
Audio/Analog IN with
Adjustable Gain
Audio/Analog
OUT
MCP9700
O-LED Serial EEPROM
Temperature
Sensor Display
Pushbuttons and POT
1 2 3 4 5 6
Note: The programming voltage on the microcontroller VPP pin must be below 9V
according to the programming specification. Protection circuitry (8.2V
Zener with 820 Ohm series resistor) is in place to ensure that VPP does not
exceed programming specifications.
FIGURE 1-5:
Chapter 2. Troubleshooting
2.1 INTRODUCTION
This chapter describes common problems when using the PIC18F4XK20
Demonstration Board and their solutions.
+3.3V USRT
+3.3V P2
R1 1 RX
RC7/RX
JP1 Current Sense 820 2 +V
3 GND
4
NC
TM 5 NC
ICSP 6 TX
BZX84B8V2LT1
P1 RC6/TX
K
1
C1 C2 VPP
2 VDD
0.1 uF 0.1 uF C4 C3 3 GND D1
12 pF 4 3.9V
12 pF ICSPDAT
A
5
6 ICSPCLK
T1G
J1
X1 R2
RC5/MOSI
RC4/MISO
1 2
RC3/SCK
RD0
RD2
RC2
R4 RA7/OLED_NCS 5 6 RA3
RA6/SEE_NCS 7 8 RC5/MOSI
220K 9 10
BZX84B8V2LT1
RC7/RX RC4/MISO
41
34
11
39
38
36
12
44
43
42
40
37
35
RC6/TX RC3/SCK
K
RB7 13 14 RA0
D2
RC4
RC1
RC5
RD3
RD2
RD1
RC3
RC2
RC6
RD0
NC
RB6 15 16 RA1
RC0
8.2 RB5 17 18 RA2
RB4 19 20 RC0
1 RB3 21 22 RC1
33
A
RA1
RA2
RA3
RB6
RB7
RB4
RA0
NC
NC
RD3 RD2
RD5 RD4 C6
21
12
13
14
15
17
20
16
18
19
22
RD7 RD6
1 uF
+3.3V RE1 RE0
RA1
RA3
RB4
RB5
RA0
RA2
TP1 +V
RE3
TP2 GND
RB7
MCP9700-I/LT
6
2 7
A 1 5
3
MCP6022 MCP6022
pF
VDC
2
A 1
3
MCP6022
6
7
5
MCP6022
G1
S1 D1
NOTES:
01/02/08