Microchip Technology PIC18 User guide

8-Bit Wireless Development Kit
User’s Guide
© 2011-2012 Microchip Technology Inc. Preliminary DS70654B
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, dsPIC, K
EELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART,
32
PIC
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-2012, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
ISBN: 978-1-61341-991-5
Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and T empe, 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 memo ry and analog products. In addition, Microchip’s quality system for the desig n and manufacture of development systems is ISO 9001:2000 certified.
®
MCUs and dsPIC® DSCs, KEELOQ
®
code hopping
DS70654B-page 2 Preliminary © 2011-2012 Microchip Technology Inc.
8-BIT WIRELESS
DEVELOPMENT KIT
USER ’S GUIDE
Table of Contents
Preface ...........................................................................................................................5
Overview ........................................................................................................................9
Introduction ........................................................................................................... 9
8-Bit Wireless Development Kit Contents ............................................................ 9
Wireless Daughter Boards ...................................................................................9
8-Bit Wireless Development Kit ..........................................................................10
PIC18 Wireless Development Board .........................................................................11
Board Layout and Features ................................................................................11
Getting Started ............................................................................................................15
Introduction ......................................................................................................... 15
Hardware Requirements ....................................................................................15
Demo Setup .......................................................................................................15
Pre-programmed Tutorial Operation ..................................................................16
Additional Tutorials ....................................................................................................21
Introduction ......................................................................................................... 21
Extended 8-bit WDK Demo with Hyper-terminal Program .................................21
Network Freezer .................................................................................................23
Reduced Function Device (RFD) Demonstrating Sleep Capability .................... 25
Chat Window Demo ........................................................................................... 27
Ping-Pong Demo ................................................................................................ 29
8-bit Wireless Development Kit with Additional Nodes .......................................32
Introduction ......................................................................................................... 33
PIC18 Wireless Development Board Schematic ................................................ 33
PIC18 Wireless Development Board PCB Layout ..............................................36
PIC18 Wireless Development Board Bill of Materials ........................................ 38
Worldwide Sales and Service ....................................................................................41
© 2011-2012 Microchip Technology Inc. Preliminary DS70654B-page 3
8-Bit Wireless Development Kit User’s Guide
NOTES:
DS70654B-page 4 Preliminary © 2011-2012 Microchip Technology Inc.
8-BIT WIRELESS
DEVELOPMENT 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 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 8-bit Wireless Development Kit User’s Guide. 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 LAYOUT
This document describes how to use the 8-Bit Wireles s Deve lo pm e nt kit to evalu a te and experiment with Microchip wireless solutions. The manual layout is as follows:
Chapter 1. “Overview”: This chapter describes the 8-bit Wireless Development Kit and how it works.
Chapter 2. “PIC18 Wireless Development Board”: This chapter details the hardware information of the PIC18 Wireless Development Board.
Chapter 3. “Getting Started”: This chapter describes what you ne ed to kn ow to start using the 8-bit Wireless Development Kit.
Chapter 4. “Additional Tutorials”: This chapter provides ad dit ion a l tu to rial pro -
grams that demonstrate the additional features of 8-bit Wireless Development Kit.
Appendix A. “PIC18 Wireless Development Board Schematic”: This appendix provides the PCB layout, BOM and PIC18 Wireless Development Board schematics.
© 2011-2012 Microchip Technology Inc. Preliminary DS70654B-page 5
8-Bit Wireless Development Kit User’s Guide
CONVENTIONS USED IN THIS GUIDE
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description Represents Examples
sArial 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
Underlined, italic text with right angle bracket
Bold characters A dialog button Click OK
N‘Rnnnn A number in verilog format,
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Italic Courier New A variable argument file.o, where file can be
Square brackets [] Optional arguments mcc18 [options] file
Curly brackets and pipe character: {|}
Ellipses... Replaces repeated text var_name [,
A menu path File>Save
A tab Click the Power tab
where N is the total number of digits, R is the radix and n is a digit.
Filenames autoexec.bat File paths c:\mcc18\h Keywords _asm, _endasm, static Command-line options -Opa+, -Opa- Bit values 0, 1 Constants 0xFF, ‘A’
Choice of mutually exclusive 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)
{... }
DS70654B-page 6 Preliminary © 2011-2012 Microchip Technology Inc.
WARRANTY REGISTRATION
Please complete the enclosed Warran ty 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 8-bit Wireless Development Kit User’s Guide. Other useful documents are listed below. The following Microchip documents are available and recommended as supple me n tal refere nce re sou r ces .
Readme Files
For the latest information on using other tools, read the tool-specific Readme files in the Readmes subdirectory of the MPLAB IDE installation directory. The Readme files contain update information and known issues that may not be included in this user’s guide.
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
Preface
© 2011-2012 Microchip Technology Inc. Preliminary DS70654B-page 7
8-Bit Wireless Development Kit User’s Guide
DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE
Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive email notification whenever there are changes, updates, revisions or errata related to a spec ified 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 a nd 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 Plus and PICkit™ 1 development programmers.
®
II device programmers and the PICSTART®
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 sa les of fices ar e also available to help cu stomers. 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
DS70654B-page 8 Preliminary © 2011-2012 Microchip Technology Inc.
DOCUMENT REVISION HISTORY
Revision A (March 2011)
This is the initial release of the document.
Revision B (January 2012)
This revision includes the following updates:
• Added MRF89XAM8A868 MHz PICtail/PICtail Plus Daughter Boards or MRF89XAM9A915 MHz PICtail/PICtail Plus Daughter Boards in 1.3 “Wireless Daughter
Boards”
• Added rows, MRF24J40MC and MRF89XAM9A PICtail/PICtail Plus Daughter Board, in
Table 1-1: “Compatible PICtail™ Daughter Boards”
• Added a new bullet in 3.3 “Demo Setup”, 4.2.1 “Set up”, 4.3.1 “Setup”,
4.5.1 “Setup”, 4.6.1 “Set up”
• Updated 4.3 “Network Freezer”
• Replaced all instances of MRF24J40MA Daughter Boards with Radio Daughe r Boards
Preface
© 2011-2012 Microchip Technology Inc. Preliminary DS70654B-page 9
8-Bit Wireless Development Kit User’s Guide
DS70654B-page 10 Preliminary © 2011-2012 Microchip Technology Inc.
DEVELOPMENT KIT

Chapter 1. Overview

1.1 INTRODUCTION

This chapter introduces the 8-Bit Wireless Development Kit features and its requirements.
The topics discussed in this chapter include:
• 8-Bit Wireless Development Kit Contents
• Wireless Daughter Boards
• 8-Bit Wireless Development Kit

1.2 8-BIT WIRELESS DEVELOPMENT KIT CONTENTS

The 8-Bit Wireless Development Kit contains the following items:
• Two PIC18 Wireless Development Boards with PIC18F46J50 XLP Microcontroller
• Two PICtail™/PICtail Plus Daughter Boards (See Table 1-1)
•Two LCD Serial Accessory Boards
• Two RS232 Serial Accessory Boards
• Two USB A to Mini-B 1 meter Cables
• Two RS232 Serial Cables
8-BIT WIRELESS
USER ’S GUIDE

1.3 WIRELESS DAUGHTER BOARDS

The 8-Bit Wireless Development Kit, includes either MRF24J40MA 2.4 GHz IEEE
802.15.4 complaint PICtail/PICtail Plus Daughter Boards or MRF89XAM8A 868 MHz
PICtail/PICtail Plus Daughter Boards or MRF89XAM9A 915 MHz PICtail/PICtail Plus Daughter Boards. The PIC18 Wireless Development Board is compatible with many other wireless PICtail daughter Boards. PICtail daughter boards that are compatible with the PIC18 Wireless Development Board.

TABLE 1-1: COMPATIBLE PICtail™ DAUGHTER BOARDS

Description Part Number
MRF24J40MA PICtail/PICtail Plus Daughter Board AC164134-1 MRF24J40MB PICtail/PICtail Plus Daughter Board AC164134-2 MRF24J40MC Pictail/PICtail Plus Daughter Board AC164134-3 MRF49XA PICtail Plus Daughter Board (433.92 MHz) AC164137-1 MRF49XA PICtail Plus Daughter Board (868/915 MHz) AC164137-2 MRF89XAM8A PICtail/PICtail Plus Daughter Board (868 MHz) AC164138-1 MRF89XAM9A PICtail/PICtail Plus Daughter Board (915 MHz) AC164138-2
Table 1-1 lists the part number of the wireless
© 2011-2012 Microchip Technology Inc. Preliminary DS70654B-page 9
8-Bit Wireless Development Kit User’s Guide
The PIC18 Wireless Development Board provides PICtail connectivity, which is compatible with the existing and future radio and sensor daughter boards from Microchip. For more information on compatibility, refer to the Microchip website
http://www.microchip.com/wireless
Note: Individual Wireless PICtail Daughter Boards require .hex files for the
specific RF transceiver. For more information, refer to the 8-Bit Wireless Development Kit product web page at http://www.microchip.com/wireless.

1.4 8-BIT WIRELESS DEVELOPMENT KIT

The Wireless Development Kit allows developers to evaluate and experiment with sub-GHz and 2.4 GHz RF solutions from Microchip. The Wireless Development Kit provides two RF hardware nodes which can be used to create a simple two-node wireless network. More nodes can be added by purchasing 8-Bit Wireless Development Kit or individual components.
The 8-Bit Wireless Development Kit is pre-programmed with a wireless demo prog ram that allows multiple operational configurations to be tested without writing any firmware. For more information on how to operate the pre-programmed demo program and how to develop other applications, see customer to evaluate Microch ip’s proprietary wireless stacks. The Microchip wireless stacks and additional application demo source codes can be downloaded from the Microchip web site
The PIC18 Wireless Development Board provides all the necessary components required to build an extreme low-power wireless sensor application. The Serial Accessory Port can interface external sensors or modules, like LCD Serial Accessory Board or RS232 Serial Accessory Board. The platform provides USB connectivity and supports different XLP microcontroller options.
http://www.microchip.com/wireless.
Chapter 3. “Getting Started”. It also enables
DS70654B-page 10 Preliminary © 2011-2012 Microchip Technology Inc.

Chapter 2. PIC18 Wireless Development Board

2.1 BOARD LAYOUT AND FEATURES

This chapter describes the PIC18 Wireless Development Board hardware. It also features the components shown in

FIGURE 2-1: PIC18 WIRELESS DEVELOPMENT BOARD

Figure 2-1.
8-BIT WIRELESS
DEVELOPMENT KIT
USER ’S GUIDE
© 2011-2012 Microchip Technology Inc. Preliminary DS70654B-page 11
Loading...
+ 29 hidden pages