Microchip PIC18F46K22 Handleiding


Lees hieronder de 📖 handleiding in het Nederlandse voor Microchip PIC18F46K22 (22 pagina's) in de categorie Niet gecategoriseerd. Deze handleiding was nuttig voor 7 personen en werd door 2 gebruikers gemiddeld met 4.5 sterren beoordeeld

Pagina 1/22
2011 Microchip Technology Inc. DS41618A
PIC18F4XK22 Development Board
Users Guide
DS41618A-page 2 2011 Microchip Technology Inc.
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, dsPIC,
KEE EELOQ, K LOQ logo, MPLAB, PIC, PICmicro, PICSTART,
PIC32 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, chipKIT,
chipKIT logo, 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.
© 2011, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
ISBN: 978-1-61341-914-4
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 co ng the code protection features ofmmitted to continuously improvi 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.
Microchip received ISO/TS-16949:2009 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® MCUs and dsPIC® DSCs, KEELOQ ® code hopping
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.
PIC18F4XK22 DEVELOPMENT BOARD
USERS GUIDE
2011 Microchip Technology Inc. DS41618A-page 3
Table of Contents
Chapter 1. PIC18F4XK22 Development Board Overview
1.1 Overview ........................................................................................................ 9
1.2 Highlights ........................................................................................................ 9
1.3 PIC18F4XK22 Development Board Contents ................................................ 9
1.4 PIC18F4XK22 Development Board Layout .................................................... 9
1.4.1 Analog Input Filtering Circuit ..................................................................... 10
1.4.2 PWM Filtering from RC2 ............................................................................ 11
1.4.3 PICtail™ Daughter Board Interface ........................................................... 11
1.4.4 PICkit™ Serial Analyzer Connector ........................................................... 11
1.4.5 ICSP™ (In-Circuit Serial Programmer™) Connector ................................ 11
1.4.6 Temperature Sensor ................................................................................. 11
1.4.7 25LC1024 Serial EEPROM ....................................................................... 11
1.4.8 32.768 kHz Crystal .................................................................................... 12
1.4.9 128x64 OLED ............................................................................................ 12
1.5 Powering the Demo Board ........................................................................... 12
1.6 Quick Start Guide ......................................................................................... 12
1.6.1 Downloading Demonstration Software ...................................................... 12
1.7 Programming Lessons ................................................................................. 14
Chapter 2. Troubleshooting
2.1 Introduction ................................................................................................... 15
2.1.1 The board does not power up. .................................................................. 15
2.1.2 Microcontroller is not executing code. ....................................................... 15
2.1.3 The microcontroller will not program. ........................................................ 15
Appendix A. Board Schematics
A.1 Introduction .................................................................................................. 17
PIC18F4XK22 Development Board User’s Guide
DS41618A-page 4 2011 Microchip Technology Inc.
Preface
INTRODUCTION
This chapter contains general information that will be useful to know before using the
PIC18F4XK22 Development 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 PIC18F4XK22 Development Board as a
development tool to emulate and debug firmware on a target board. The manual layout
is as follows:
Chapter 1. “PIC18F4XK22 Development Board Overview”Introduces the
PIC18F4XK22 Development Board and provides a brief description of the hard-
ware and the new features.
Chapter 2. “Troubleshooting” Describes the common problems of the
PIC18F4XK22 Development Board and their solutions.
Appendix A. Board Schematics” – Provides schematic diagrams for the
PIC18F4XK22 Development Board.
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 online help.
Select the Help menu, and then Topics to open a list of available online help files.
Preface
2011 Microchip Technology Inc. DS41618A-page 5
CONVENTIONS USED IN THIS GUIDE
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters Referenced books MPLAB® IDE User’s 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
dialog
“Save project before build”
Underlined, italic text with
right angle bracket
A menu path File>Save
Bold characters A dialog button Click OK
A tab Click the Power tab
N‘Rnnnn A number in verilog format,
where N is the total number of
digits, R is the radix and n is a
digit.
4‘b0010, 2‘hF1
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
character: { | }
Choice of mutually exclusive
arguments; an OR selection
errorlevel {0|1}
Ellipses... Replaces repeated text var_name [,
var_name...]
Represents code supplied by
user
void main (void)
{ ...
}
PIC18F4XK22 Development Board User’s Guide
DS41618A-page 6 2011 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
This user's guide describes how to use the PIC18F4XK22 Development Board. Other
useful documents are listed below. The following Microchip documents are available
and recommended as supplemental reference resources.
PIC18LF46K22 Data Sheet (DS41412)
This data sheet summarizes the features of the PIC18LF46K22. 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.
MCP6021/2/3/4 Data Sheet (DS21685)
This data sheet summarizes the features of the MCP6021/2/3/4. It provides essential
information needed to develop software for these devices. The data sheet can be found
at http://ww1.microchip.com/downloads/en/DeviceDoc/21685d.pdf.
25LC1024 Data Sheet (DS22064)
This data sheet summarizes the features of the 25LC1024. It provides essential
information needed to develop software for this device.
Preface
2011 Microchip Technology Inc. DS41618A-page 7
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® 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®
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® II device programmers and the PICSTART®
Plus and PICkit™ 1 development programmers.
PIC18F4XK22 Development Board User’s Guide
DS41618A-page 8 2011 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 A (December 2011)
Initial Release of this Document.
PIC18F4XK22 DEVELOPMENT BOARD
USERS GUIDE
2011 Microchip Technology Inc. DS41618A-page 9
Chapter 1. PIC18F4XK22 Development Board Overview
The PIC18F4XK22 Development Board is a demonstration and development tool
designed for those getting started with microcontrollers or those looking to migrate to
the new PIC18(L)F4XK22/2XK22 family. The board is designed for general purpose
applications and includes a variety of hardware to exercise microcontroller peripherals.
1.1 OVERVIEW
The PIC18(L)F4XK22/2XK22 is a new family of microcontrollers that take advantage of
Microchip’s 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.
The hardware included on the board allows for development as well. The microcontroller
that is populated on the board, the PIC18LF46K22, is the superset of the
PIC18F4XK22/2XK22
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 PIC18F4XK22 Development Board. Topics
discussed include:
PIC18F4XK22 Development Board Contents
PIC18F4XK22 System Management Layout
Powering the Demo Board
Quick Start Guide
Programming Lessons
1.3 PIC18F4XK22 DEVELOPMENT BOARD CONTENTS
The PIC18F4XK22 Development Board kit includes the following items:
PIC18F4XK22 Development Board
PIC18F4XK22 Development Board Quick Start Guide
On-board PIC18LF46K22 device (pre-loaded with program demonstration)
If you are missing any part of the kit, please contact your nearest Microchip sales office
listed on the back of this publication.
1.4 PIC18F4XK22 DEVELOPMENT BOARD LAYOUT
The PIC18F4XK22 Development Board is populated with a PIC18LF46K22 microcon-
troller. In addition, the board is also populated with the following features/components:
128x64 Organic LED Display (SPI)
32.768 kHz External Oscillator (Timer1)
PIC18F4XK22 Development Board User’s Guide
DS41618A-page 10 2011 Microchip Technology Inc.
Analog Input Filtering and Gain Control into RE1 (1.4.1)
PWM Output Filtering from RC2 (1.4.2)
4 Push Buttons for User Interfacing
1 MCLR Switch
8 LEDs mapped to PORTD
Potentiometer
1024 KB Serial EEPROM
PICtail™ Daughter Board Header (breaks out all pins)
6-Pin ICSP™ Programming Capability Header
6-Pin PICkit Serial Analyzer Interface
Current Measurement Jumper
RJ-11 ICSP Programming Header
Power Analyzer Header
FIGURE 1-1: DEVELOPMENT BOARD LAYOUT
1.4.1 Analog Input Filtering Circuit
The analog filtering circuit is designed for use with an electret microphone. Electret
microphones typically require biasing, which is provided by MIC bias jumper, JP3. The
analog signal generated by a typical electret microphone has a peak-to-peak voltage
in the single millivolts range. The analog filtering circuit has a maximum gain of 300,
which can be controlled with the potentiometer labeled GAIN and is a 2nd order
low-pass filter with a cut-off frequency of 5 kHz. Jumper JP3 needs to be removed if the
analog input is provided by input test point.
3257'/('V
0&/5
5HVHW%XWWRQ
WR93RZHU
5-,&63
+HDGHU
3RZHU$QDO\]HU+HDGHU SLQ,&63
+HDGHU
3,&NLW6HULDO
$QDO\]HU+HDGHU
,&WDLO+HDGHU
/&6HULDO
((3520
3,&/).
0LFURFRQWUROOHU
3RWHQWLRPHWHU
3XVK%XWWRQV2/(''LVSOD\0&3
7HPSHUDWXUH
6HQVRU
0&32S
$PS
$XGLR$QDORJ
2XW
$XGLR$QDORJ,Q
ZLWK$GMXVWDEOH
*DLQ
N+]7LPHU
&U\VWDO
,
3
2011 Microchip Technology Inc. DS41618A-page 11
1.4.2 PWM Filtering from RC2
The microcontroller output RC2 provides an active-low pass filter that can be used to
generate analog signals. A high-frequency PWM output from RC2 can be pulse-width
modulated to vary the amplitude of the output signal.
1.4.3 PICtail™ Daughter Board Interface
The PICtail daughter board interface breaks out each pin of the microcontroller in
addition to providing +VDD and ground. The header is designed to be compatible with
existing PICtail daughter boards. Visit the Microchip web site to find more details on
PICtail daughter boards.
1.4.4 PICkit™ Serial Analyzer Connector
The PICkit serial analyzer connector provides pins for serial communication. The serial
communications lines are designed to be used with the PICkit serial analyzer, but are
also provided for general purpose communications as well.
The serial communications
pinout is shown below:
FIGURE 1-2: SERIAL COMMUNICATIONS PINOUT
1.4.5 ICSP™ (In-Circuit Serial Programmer™) Connector
A 6-pin ICSP programming capability and RJ-11 connectors are provided for
programming the microcontroller. The PIC18LF46K22 can be programmed and debugged
through these connectors using Microchip In-Circuit Debuggers/Programmers.
1.4.6 Temperature Sensor
An MCP9700 temperature sensor is located on the board. The MCP9700 is an analog
temperature sensor that provides a linear voltage output versus temperature. The
voltage output of the temperature sensor is connected to the RE1 pin of the microcontroller
.
1.4.7 25LC1024 Serial EEPROM
A Microchip 1024 Kbit serial reprogrammable Flash memory with both Flash and
byte-level serial EEPROM functions is provided.
The memory is accessed via a simple Serial Peripheral Interface (SPI) compatible
serial bus. The bus signals are a clock input plus separate data in and data out lines.
Access to the device is controlled by a Chip Select (CS) input on the microcontroller pin
RA6.
1 2 3 4 5 6
TX +5V GND SDA SCL RX
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.
PIC18F4XK22 Development Board User’s Guide
DS41618A-page 12 2011 Microchip Technology Inc.
1.4.8 32.768 kHz Crystal
The 32.768 kHz tuning fork crystal is interfaced to the RC0/T1OSO and RC1/T1OSI
pins for use with the Timer1 peripheral.
1.4.9 128x64 OLED
The display provided on the development board is a 128x64 organic LED display. It
interfaces to the microcontroller via Serial Peripheral Interface (SPI). The controller on
the OLED is the SSD1306.
1.5 POWERING THE DEMO BOARD
The demonstration board can be powered in the following ways:
1. The board accepts a 2.5mm coaxial power connector in J3. Acceptable voltages
range from +5 to 12 VDC.
2. Microchip In-Circuit Debuggers/Programmers can be used to provide power at
connector P1 or P3. Do not exceed a voltage of 3.6 VDC or a current of 100 mA
on the board if a debugger/programmer is being used to power the board.
3. The PICkit Serial Analyzer can be used to provide power at connector P2. Do not
exceed a voltage of 3.6 VDC or a current of 100 mA on the board if the PICkit
Serial Analyzer is being used to power the board.
1.6 QUICK START GUIDE
The PIC18F4XK22 Development Board is preloaded with demonstration firmware. The
board
must be configured as described in this section in order to use the demonstration pro-
grams
.
Board Setup
1. Close jumper JP1 labeled Current MCU, JP4, JP3 labeled Mic Bias and JP2.
2. Connect a +5 to 12V power supply to connector J3 in the upper left portion of the
board.
1.6.1 Downloading Demonstration Software
The PIC18F4XK22 Development Board software package can be downloaded from
www.microchip.com. It contains demonstration programs and hands-on programming
lessons. Using a Microchip In-Circuit Debugger/Programmer, demonstration firmware
can be downloaded onto the demo board and the board can be powered.
1. Download the PIC18F4XK22 Development Board software package from
www.microchip.com/8bit.
2. Unzip the software package.
3. Connect a Microchip In-Circuit Debugger/Programmer to the development board
connector P1 or P3.
4. Start the MPLAB IDE software.
5. Click File > Import.
PIC18F4XK22 Development Board User’s Guide
DS41618A-page 14 2011 Microchip Technology Inc.
8. Click Programmer > Select Programmer and select your programmer:
FIGURE 1-5: SELECTING THE PROGRAMMER
9. To program, click Programmer > Program.
10. Click Programmer > Release from Reset to release the MCLR to run the
program.
1.7 PROGRAMMING LESSONS
The PIC18F4XK22 software package includes a variety of programming lessons
designed for use with the demonstration board. Download the PIC18F4XK22 software
package from www.microchip.com/8bit and browse to the Lessons directory.


Product specificaties

Merk: Microchip
Categorie: Niet gecategoriseerd
Model: PIC18F46K22

Heb je hulp nodig?

Als je hulp nodig hebt met Microchip PIC18F46K22 stel dan hieronder een vraag en andere gebruikers zullen je antwoorden




Handleiding Niet gecategoriseerd Microchip

Handleiding Niet gecategoriseerd

Nieuwste handleidingen voor Niet gecategoriseerd