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 Digit al Millennium Copyright Act. If suc h a c t s
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 M icrochip’s prod ucts as critical co mponents in
life support systems is not authorized except with express
written approval by Microchip. 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, 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, MXDEV, MXLAB, PICMASTER, 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, dsPICDEM,
dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR,
FanSense, FlexROM, fuzzyLAB, In-Circuit Serial
Programming, ICSP, ICEPIC, Migratable Memory, MPASM,
MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net,
PICLAB, PICtail, PowerCal, PowerInfo, PowerMate,
PowerTool, rfLAB, rfPICDEM, Select Mode, Sm art Serial,
SmartTel and Total Endurance 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 quality system certification for
its worldwide headquarters, design and wafer fabrication facilities in
Chandler and Tempe, Arizona and Mountain View, California in
October 2003. The Company’s quality system processes and
procedures are for its PICmicro
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.2 Schematics and PCB Layout .......................................................................45
Appendix B. Bill-Of-Materials (BOM) .........................................................................49
Appendix C. MCP215X Connection Sequence Overview ........................................51
Appendix D. MCP215X 250-byte Data Transmit Table .............................................53
Worldwide Sales and Service ....................................................................................54
2004 Microchip Technology Inc.DS51516A-page iii
MCP215X Data Logger Demo Board User’s Guide
NOTES:
DS51516A-page iv 2004 Microchip Technology Inc.
MCP215X DATA LOGGER
DEMO BOARD 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 dif fer from those in this document. Please refer
to our web site (www.microchip.com) to obt ain 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
on-line help. Select the Help menu, and then Topics to open a list of available on-line
help files.
®
IDE
INTRODUCTION
This chapter contains general information that will be useful to know before using the
MCP215X Data Logger Demo Board User’s Guide. Items discussed in this chapter
include:
• About This Guide
• Recommended Reading
• The Microchip Web Site
• Customer Support
2004 Microchip Technology Inc.DS51516A-page 1
MCP215X Data Logger Demo Board User’s Guide
ABOUT THIS GUIDE
Document Layout
This document describes how to use the MCP215X Data Logger Demo Board User’s
Guide as a development tool to emulate and debug firmware on a target board. The
manual layout is as follows:
• Chapter 1: Product Overv iew – Important information about the MCP215X Data
Logger Demo Board User’s Guide.
• Chapter 2: MCP215X Data Logger Demo Board User’s Guide – Includes
instructions on how to get started with this demo board, with a detailed description
of each function.
• Appendix A: Schematic and Layouts – Shows the schematic and layout
diagrams for the MCP215X Data Logger Demo Board.
• Appendix B: Bill-of-Materials – Lists the parts used to build the MCP215X Data
Logger Demo Board.
• Appendix C: Connection Sequence – Shows the connection sequence between
a Primary device and the MCP215X (Secondary device). This connection
sequence is shown at an overview level and does not show exact operation.
• Appendix D: 250 Byte Transmit Table – Shows the data that is transmitted by
the program when in 250-Byte Transmit mode.
DS51516A-page 2 2004 Microchip Technology Inc.
Preface
Conventions Used in this Guide
This manual uses the following docum entation conventions:
DOCUMENTATION CONVENTIONS
DescriptionRepresentsExamples
Arial font:
Italic charac 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
‘bnnnnA binary number where n is a
Text in angle brackets < >A key on the keyboardPress <Enter>, <F1>
Courier font:
Plain CourierSample source code#define START
Italic CourierA variable argumentfile.o, where file can be
Choice of mut ually exclu s ive
arguments; an OR selection
Represents code supplied by
user
“Save project before build”
‘b00100, ‘b10
any valid filename
0xFFFF, 0x007A
[options]
errorlevel {0|1}
var_name...]
void main (void)
{ ...
}
®
IDE User’s Guide
2004 Microchip Technology Inc.DS51516A-page 3
MCP215X Data Logger Demo Board User’s Guide
RECOMMENDED READING
This user's guide describes how to use MCP215X Data Logger Demo Board User’s
Guide. Other useful documents are listed below. The following Microchip documents
are available and recommended as supplemental reference resources.
MCP2150 Data Sheet (DS21790)
This data sheet provides detailed information regarding the MCP2150 device.
MCP2155 Data Sheet (DS21790)
This data sheet provides detailed information regarding the MCP2155 device.
AN858, “Interfacing the MCP215x to Host Controller” (DS00858)
This application note discusses the interface between a Host Controller and the
MCP215X device.
AN888, “Programming the Palm OS
This application note discusses the programming of a Palm™ PDA to interface to an
®
standard device using IrCOMM.
IrDA
AN926, “Programming the Pocket PC OS for Embedded IR Applications”
(DS00926)
This application note discusses the programming of a Pocket PC PDA to interface to
an IrDA standard device using IrCOMM.
AN941, “Programming Windows
This application note discusses the programming of a Windows XP PC to interface to
an IrDA standard device using IrCOMM.
®
for Embedded IR Applications” (DS00888)
®
XP for Embedded IR Applications” (DS00941)
DS51516A-page 4 2004 Microchip Technology Inc.
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 (FAQ), 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
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:
1-800-755-2345 – United States and most of Canada
1-480-792-7302 – Other Internatio nal Loca tio ns
Preface
2004 Microchip Technology Inc.DS51516A-page 5
MCP215X Data Logger Demo Board User’s Guide
NOTES:
DS51516A-page 6 2004 Microchip Technology Inc.
MCP215X DATA LOGGER
DEMO BOARD USER’S GUIDE
Chapter 1. Overview
1.1INTRODUCTION
This chapter provides an overview of the MCP215X Data Logger Demo Board and
covers the following topics:
• What is the MCP215X Data Logger Demo Board?
• What the MCP215X Data Logger Demo Board kit includes
1.2WHAT IS THE MCP215X DATA LOGGER DEMO BOARD?
The MCP215X IrDA® Standard Protocol Stack Controller device allows the system
designer to implement a low-cost, wireless IR port in any application providing support
for the IrDA standard protocol stack and IrDA standard bit encoding/decoding.
The MCP215X Data Logger Demo Board is used to evaluate and demonstrate either
the MCP2150 or MCP2155 device in a data-logging application. The board will
communicate to a Primary device (such as a PDA (e.g., Palm™ or Pocket PC) or laptop
computer). It is intended to serve as an example to assist system designers in
developing an IrDA standard node using the MCP215X device.
Though the MCP215X Data Logger Demo Board ships with a MCP2150 installed, this
device may be interchanged with a MCP2155, allowing the MCP2155 to be evaluated.
Note:If the MCP2150 is repl ace d by the MC P21 55 , the MC P2 15 5 dev ice mu st
have the firmware programmed into the device. Ensure that the demo
program firmware was assembled for the MCP2155 (the demo program uses
conditional assemb ly to use t he same sou r ce file for th e t wo devic es) . Th e
“MCP215X” varia ble needs to be equat ed to ‘55 ’. The MPASM™ assemb ler
will display a message as to which de vice the fil e has assemble d for.
1.3WHAT THE MCP215X DATA LOGGER DEMO BOARD KIT INCLUDES
This MCP215X Data Logger Demo Board Kit includes:
• The MCP215X Data Logger Demo Board (with MCP2150 installed)
• MCP215X Data Logger Demo Board User’s Guide (on CD-ROM)
• CD-ROM also includes:
- Palm PDA Primary device application program
(and related Application Note 888)
- Pocket PC Primary device application program
(and related Application Note 926)
- Windows XP Primary device application program
(and related Application Note 941)
- Demo board firmware that can be conditionally assembled for either the
MCP2150 or the MCP2155.
2004 Microchip Technology Inc.DS51516A-page 7
MCP215X Data Logger Demo Board User’s Guide
NOTES:
DS51516A-page 8 2004 Microchip Technology Inc.
Chapter 2. Installation and Operation
2.1INTRODUCTION
This chapter discusses the installation and operation of the MCP215X Data Logger
Demo Board and a Primary device for data communication. This demonstrates an IrDA
standard system and will assist the system designer on how to integrate an IR port into
a system.
The MCP215X Data Logger Demo Board demonstrates the implementation of an
embedded system with an IrDA standard interface. This system operates as an IrDA
standard Secondary device using either the MCP2150 or the MCP2155 device.
The IrDA standard system requires the Primary device to be running an appropriate
application program. The MCP215X Data Logger Demo Board interfaces to the
Primary device application programs that are currently available from Microchip. The
three application programs available for the following Primary device systems are:
•Palm OS
•Microsoft® Pocket PC 2003
•Microsoft
These application programs are supported by three application notes that discuss the
programming of these particular operating systems. These application notes are:
• AN888, “Programming the Palm OS
• AN926, “Programming the Pocket PC for Embedded IR Applications”, DS00926
• AN941, “Programming Windows XP
®
®
Windows XP
MCP215X DATA LOGGER
DEMO BOARD USER’S GUIDE
®
for Embedded IR Applications”, DS00888
®
for Embedded IR Applications”, DS00941
Note:References to a MCP215X device in this document can refer to either the
MCP2150 or the MCP2155 device.
The host UART interface includes non-data flow control signals. These are the signals
between a Host Controller and a MCP215X device. A discussion of the host UART
interface is given in the following application note:
• AN858, “Interfacing the MCP215X to a Host Controller”, DS00858
2004 Microchip Technology Inc.DS51516A-page 9
MCP215X Data Logger Demo Board User’s Guide
2.2FEATURES
The MCP215X Data Logger Demo Board has the following features:
• Communicates directly to Primary device (PDA or laptop computer) running the
supplied Primary device application program or running a terminal emulation
program
• LCD display (2 row x 16 character) for display of system information
• Data is transmitted in an easy-to-read format
• Reprogrammable PIC16F877 with MPLAB
for user application development
• 18-pin socket for the installation of either a MCP2150 (default device) or a
MCP2155 (optional device)
• Header that allows either several board signals to be monitored or allows the
MCP215X Data Logger Demo Board to be interfaced to the user’s system
• Eight LEDs that indicate MCP215X status (CTS, RTS, DTR, DSR, CD and RI
activity)
• Eight LEDs that are connected to PORTD of the PIC16F877
• Battery-operated by a 9V source (can use a 9V battery)
•PICmicro
• Two switches (SW2 and SW3) to control the PICmicro MCU program operation
• Header and jumpers to allow the electrical removal of the optical transceiver and
the installation of an alternate optical transceiver circuit (on a daughter board)
• Variable resistor connected to PICmicro MCU A/D input
• 8-pin DIP socket for the installation of an optional serial EEPROM (24LC256)
®
microcontroller (MCU) RESET switch
®
In-Circuit Debugger (ICD) interface
DS51516A-page 10 2004 Microchip Technology Inc.
2.3GETTING STARTED
This section presents an overview of the following system blocks:
• The MCP215X Data Logger Demo Board Hardware
• The MCP215X Data Logger Demo Board Firmware
• The Primary device Graphical User Interface (GUI)
This should give you an understanding of what these components do in the complete
IrDA standard system.
2.3.1The MCP215X Data Logger Demo Board Hardware Overview
The major components for the MCP215X Data Logger Demo Board are:
1. MCP215X device (U3)
2. Optical transceiver (U5 - TFDS 4500)
3. PICmicro MCU (U1 - PIC16F877)
4. LCD module
5. Power supply
6. User inputs to PICmicro MCU (SW2, SW3 and variable resistor (VR1))
7. PICmicro MCU RESET
8. PICmicro MCU crystal (Y2)
The MCP215X Data Logger Demo Board is fully assembled and tested for evaluation
and demonstration of the MCP2150 or MCP2155 features. A block diagram of the
demo board is shown in Figure 2-1. The board has been designed to allow the installation of an optional LCD contrast control (VR2) and serial EEPROM device. These
optional components are removed from the MCP215X Data Logger Demo Board block
diagrams for readability.
For more detailed circuit information, refer to Appendix A. “Schematic and Layouts”
and Appendix B. “Bill-Of-M at erials (BOM) ” .
Installation and Operation
FIGURE 2-1:MCP215X DATA LOGGER DEMO BOARD BLOCK DIAGRAM
Power
ICD
SW3
SW2
RESET
VR1
9V Battery
Power LED
Power Supply
3
PICmicro
MCU
(40-pin)
U1
MCP215X Header
J4
®
Optional
Not
Installed
VR2
Optional
Not
Installed
SEE
U2
LCD Module
(2 Line x 16 Character)
RD7
CTS RTS CDDSR
TXRXRIDTR
JP3
Encoder/Decoder
MCP215X
U3
JP5
JP6
JP2
JP1
RD0
JP4
JP7
Discrete
Transceiver
Header 1
J1
U5
J5
Header 2
2004 Microchip Technology Inc.DS51516A-page 11
MCP215X Data Logger Demo Board User’s Guide
Figure 2-2 shows the layout of the MCP215X Data Logger Demo Board with indication
to points of interest.
FIGURE 2-2:MCP215X DATA LOGGER DEMO BOARD
9V Battery
Power
Power LED
Power Supply
SW3
SW2
RESET
3
PICmicro
(40-pin)
J4
®
MCU
U1
MCP215X Header
ICD
VR1
Switches for program selection and
program state
SW3 SW2
— — Waiting for program selection
— D Vending machine
D — Not used
D D 250-byte S→P data transfer
Reset Switch
— PICmicro MCU in normal operation
D PICmicro MCU in RESET state
LCD Module
(2 Line x 16 Character)
RD7
CTS RTS CDDSR
TXRXRIDTR
JP3
Encoder/Decoder
MCP215X
Connect/Isolate
TFDS 4500 TXD and RXD pins
TFDS 4500 TXD and RXD
Connected to MCP215x
TFDS 4500 TXD and RXD
NOT Connected to MCP215x
(Header 1 and 2 can be used)
JP2
U3
JP1
JP5
JP6
Ground/Float
PORTD LEDs Cathode
LED Cathode
Grounded
LED Cathode
Floating
(LEDs will not
illuminate)
RD0
JP4
JP7
Discrete
Transceiver
Header 1
J1
U5
J5
Header 2
DS51516A-page 12 2004 Microchip Technology Inc.
Figure 2-3 shows the switches used to reset the MCP2150 and select one of two demo
programs. Switch RESET resets the MCP2150 and switch S2 is used for program
selection.
FIGURE 2-3:MCP215X DATA LOGGER DEMO BOARD
Installation and Operation
Power
Power LED
ICD
VR1
MCP215X Enable
3
SW3
SW2
RESET
MCP215X Enabled
(Normal Operation)
MCP215X in low-power state
9V Battery
Power Supply
PICmicro
MCU
(40-pin)
U1
MCP215X Header
J4
LCD Module
(2 Line x 16 Character)
RD7
®
CTS RTS CDDSR
TXRXRIDTR
JP3
Encoder / Decoder
JP2
MCP215X
Header 1 and Header 2
allow connection to a daughter
board for implementation of other
optical transceiver circuits