MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board User's Guide

MCP2140 IrDA® Standard
Wireless Temperature Sensor
Demo Board User’s Guide
 2004 Microchip Technology Inc.
DS51487A
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’s products as critical components 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, KEELOQ, 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, Smart 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.
© 2004, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
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® 8-bit MCUs, 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.
DS51487A-page ii
 2004 Microchip Technology Inc.
MCP2140 IrDA® STANDARD
WIRELESS TEMPERATURE SENSOR
DEMO BOARD USER’S GUIDE
Table of Contents
Preface ........................................................................................................................... 1
Chapter 1. Product Overview ........................................................................................ 5
1.1 Introduction ..................................................................................................... 5
1.2 What is the MCP2140 IrDA® Standard Wireless Temperature
Sensor Demo Board? ..................................................................................... 5
1.3 What the MCP2140 IrDA Standard Wireless Temperature Sensor
Demo Board Kit Includes ................................................................................ 5
Chapter 2. MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board ... 7
2.1 Introduction ..................................................................................................... 7
2.2 Features ......................................................................................................... 7
2.3 Getting Started ............................................................................................... 7
2.4 Running the demos ...................................................................................... 11
2.5 MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board
Description .................................................................................................... 19
Appendix A. Schematic and Layouts ........................................................................ 25
A.1 Introduction .................................................................................................. 25
A.2 Schematics and PCB Layout ....................................................................... 25
A.3 ECNs ............................................................................................................ 32
Appendix B. Bill-Of-Materials (BOM) ......................................................................... 33
Appendix C. MCP2140 Connection Sequence Overview ........................................ 35
Appendix D. MCP2140 250 Byte Data Transmit Table ............................................. 37
Appendix E. Alternate Optical Transceiver Implementation ................................... 39
E.1 Introduction .................................................................................................. 39
E.2 Vishay® TFDU 4300 Implementation ........................................................... 40
E.3 Agilent® HSDL 3000 Implementation ........................................................... 41
Appendix F. Using AN888 Program with a Palm™ PDA .......................................... 43
F.1 Introduction .................................................................................................. 43
Worldwide Sales and Service .................................................................................... 48
 2004 Microchip Technology Inc.
DS51487A-page iii
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
NOTES:
DS51487A-page iv
 2004 Microchip Technology Inc.
MCP2140 IrDA® STANDARD
WIRELESS TEMPERATURE SENSOR
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 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
MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board. Items discussed
in this chapter include:
•
•
•
•
About This Guide
Recommended Reading
The Microchip Web Site
Customer Support
 2004 Microchip Technology Inc.
DS51487A-page 1
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
ABOUT THIS GUIDE
Document Layout
This document describes how to use the MCP2140 IrDA® Standard
Wireless Temperature Sensor Demo Board User’s Guide.
The manual layout is as follows:
• Chapter 1: Product Overview – Information about the MCP2140 IrDA Standard
Wireless Temperature Sensor Demo Board.
• Chapter 2: MCP2140 IrDA Standard Wireless Temperature Sensor Demo
Board – This chapter includes a detailed description of the hardware instructions
on how to get started with this demo board, a description of functions of the demo
board and instructions on running the demos.
• Appendix A: Schematic and Layouts – Shows the schematic and layout
diagrams for the MCP2140 IrDA Standard Wireless Temperature Sensor Demo
Board.
• Appendix B: Bill of Materials – Lists the parts used to build the MCP2140 IrDA
Standard Wireless Temperature Sensor Demo Board.
• Appendix C: Connection Sequence – Shows the high-level connection
sequence between a Primary device and the MCP2140 (Secondary device). This
connection sequence is shown at an overview level and does not detail exact
operation.
• Appendix D: 250 Byte Transmit Table – This table shows the data that is
transmitted by the program when in 250 Byte Transmit mode.
• Appendix E: Alternative Optical Transceiver Selection – This board was
designed to support the Vishay® TFDU 4100 (default selection), TFDU 4300 and
the Agilent® HSDL 3000. This section describes what needs to be done to
implement one of the other two options.
• Appendix F: Using AN888 Program with a Palm™ PDA – Shows how to use
the Palm PDA and Application Note 888, “Programming the Palm OS® for
Embedded IR Applications” (DS00888), to demonstrate the demo board.
DS51487A-page 2
 2004 Microchip Technology Inc.
Preface
Conventions Used in this Guide
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description
Arial font:
Italic characters
Initial caps
Quotes
Underlined, italic text with
right angle bracket
Bold characters
‘bnnnn
Text in angle brackets < >
Courier font:
Plain Courier
Italic Courier
0xnnnn
Square brackets [ ]
Curly brackets and pipe
character: { | }
Ellipses...
 2004 Microchip Technology Inc.
Represents
Examples
Referenced books
Emphasized text
A window
A dialog
A menu selection
A field name in a window or
dialog
A menu path
MPLAB® IDE User’s Guide
...is the only compiler...
the Output window
the Settings dialog
select Enable Programmer
“Save project before build”
A dialog button
A tab
A binary number where n is a
digit
A key on the keyboard
Click OK
Click the Power tab
‘b00100, ‘b10
File>Save
Press <Enter>, <F1>
Sample source code
Filenames
File paths
Keywords
Command-line options
Bit values
A variable argument
#define START
autoexec.bat
c:\mcc18\h
_asm, _endasm, static
-Opa+, -Opa0, 1
file.o, where file can be
any valid filename
A hexadecimal number where 0xFFFF, 0x007A
n is a hexadecimal digit
Optional arguments
mcc18 [options] file
[options]
Choice of mutually exclusive errorlevel {0|1}
arguments; an OR selection
Replaces repeated text
var_name [,
var_name...]
Represents code supplied by void main (void)
user
{ ...
}
DS51487A-page 3
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
RECOMMENDED READING
This user's guide describes how to use the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board. Other useful documents are listed below. The following
Microchip documents are available and recommended as supplemental reference
resources.
MCP2140 Data Sheet (DS21790)
This data sheet provides detailed information regarding the MCP2140 device.
THE MICROCHIP WEB SITE
Microchip provides online support via our WWW 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 and the 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://[email protected]
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 International Locations
DS51487A-page 4
 2004 Microchip Technology Inc.
MCP2140 IrDA® STANDARD
WIRELESS TEMPERATURE SENSOR
DEMO BOARD USER’S GUIDE
Chapter 1. Product Overview
1.1
INTRODUCTION
This chapter provides an overview of the MCP2140 IrDA® Standard Wireless
Temperature Sensor Demo Board and covers the following topics:
• What is the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board?
• What the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board kit
includes
1.2
WHAT IS THE MCP2140 IrDA STANDARD WIRELESS TEMPERATURE
SENSOR DEMO BOARD?
The MCP2140 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 MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board is used to
evaluate and demonstrate the MCP2140 device in a data-logging application by
transmitting ambient temperature to a PDA (e.g., Palm™ PDA) or laptop computer. It
is intended to serve as an example to assist system designers in developing an IrDA
standard node using the MCP2140 device.
1.3
WHAT THE MCP2140 IrDA STANDARD WIRELESS TEMPERATURE SENSOR
DEMO BOARD KIT INCLUDES
This MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board Kit includes:
• The MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board
• Demo Board Firmware
• MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board User’s
Guide
 2004 Microchip Technology Inc.
DS51487A-page 5
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
NOTES:
DS51487A-page 6
 2004 Microchip Technology Inc.
MCP2140 IrDA® STANDARD
WIRELESS TEMPERATURE SENSOR
DEMO BOARD USER’S GUIDE
Chapter 2. MCP2140 IrDA Standard Wireless
Temperature Sensor Demo Board
2.1
INTRODUCTION
The MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board
demonstrates the MCP2140 device in a real-world application. In addition, the system
designer will be able to use this design as an example of how to integrate an IR port
into their system.
2.2
FEATURES
The MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board has the
following features:
• Demo board communicates directly to Primary device (PDA or laptop computer)
running a terminal emulation application program
• Data is transmitted in an easy-to-read format
• Reprogrammable PIC18F1320 with In-Circuit Debugger (ICD) interface for user
application development
• Header that allows either several board signals to be monitored or allows the
MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board to be
interfaced to user’s system
• Three LEDs that indicate MCP2140 status (CTS, DSR and PHACT activity)
• Powered by three AAA batteries
• Power jumper and power LED indicator
2.3
GETTING STARTED
The MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board is fully assembled and tested for evaluation and demonstration of the MCP2140 features. A block
diagram of the demo board is shown in Figure 2-1. Refer to Appendix A. “Schematic
and Layouts” and Appendix B. “Bill-Of-Materials (BOM)” for more detailed circuit
information.
FIGURE 2-1:
MCP2140 DEMO BOARD BLOCK DIAGRAM
LEDs
Power
DSR
CTS
PHACT
Three AAA
1.5V Batteries
System
Power
U2
PIC18F1320
U1
J1
3
ICD Header
(for programming)
S2
Optical
Transceiver
7
TXIR
RXIR
Control/Status
2
UART
MCP2140
RESET
U11
IrDA®
Standard Controller
TC1047A Temp
Sensor
 2004 Microchip Technology Inc.
DS51487A-page 7
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
2.3.1
The Hardware
Figure 2-2 shows the layout of the MCP2140 IrDA Standard Wireless Temperature
Sensor Demo Board with points of interest encircled.
Figure 2-3 shows the switches used to reset the PIC18F1320 and selects one of two
demo programs. The RESET switch resets the PIC18F1320, while switch S2 is used
for program selection.
FIGURE 2-2:
MCP2140 IrDA® STANDARD WIRELESS TEMP SENSOR DEMO BOARD
Signal Header
ICD Header
Optical Transceiver
Supports:
TFDU 4100 (Default)
TFDU 4300 (Optional)
HSDL 3000 (Optional)
PIC18F1320
MCP2140
Demo Board Power Jumper
Shorted = Board connected to battery supply
Open = Board NOT connected to battery supply
DS51487A-page 8
Switches
LED Signal Indicators
 2004 Microchip Technology Inc.
FIGURE 2-3:
MCP2140 IrDA® STANDARD WIRELESS TEMP SENSOR DEMO BOARD
When RESET switch → Depressed to not Depressed
If: S2 = Depressed: temperature sensor firmware routine is initialized.
S2 = Not depressed: data upload firmware routine is initialized.
 2004 Microchip Technology Inc.
DS51487A-page 9
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
2.3.2
The Embedded System Firmware
There are two programs that can be demonstrated on the demo board. These are:
• The transmission of a 250 byte data string from a table in the PIC18F1320 to the
Primary device.
• The transmission of the “temperature” reading of the TC1047A to the Primary
device.
Typical Primary devices include Palm or Pocket PC PDAs and Laptop PCs with an IrDA
standard infrared port.
The PIC18F1320 source code for the MCP2140 IrDA Standard Wireless Temperature
Sensor Demo Board is available for download from the Microchip web site at
www.microchip.com.
2.3.2.1
“TRANSMIT 250 BYTE DATA STRING” PROGRAM DESCRIPTION
This program will be selected when the RESET switch is depressed and then released
(with the S2 switch not pressed). The PIC18F1320 will initialize the system and wait to
receive a data byte. Once a data byte is received, the PIC18F1320 will transmit a
250-byte table from memory to the MCP2140.
The PIC18F1320 follows the flow control of the MCP2140 to ensure that data is not lost.
The MCP2140 handles all the IrCOMM protocol for the data packets that it receives
from the PIC18F1320.
Once the table has completed transmission, the PIC18F1320 will wait to receive the
next character that will cause the 250-byte table to be transmitted (again).
The 250-byte data table transmitted from the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board to the Primary device is shown in Appendix D. “MCP2140
250 Byte Data Transmit Table”. These values will be displayed in the Primary device’s
Terminal Emulation program window.
2.3.2.2
“TRANSMIT TEMPERATURE” PROGRAM DESCRIPTION
This program will be selected when both the RESET and S2 switches are depressed,
the RESET switch is released and the S2 switch is held momentarily. The PIC18F1320
will initialize the system and wait to receive a data byte. Once a data byte is received,
the PIC18F1320 will continuously transmit the following string:
“Temp = xx” to the MCP2140, approximately once per second, where xx is the
temperature in °C.
The PIC18F1320 follows the flow control of the MCP2140 to ensure that data is not lost.
The “measured” temperature will vary as a result of the system voltage of the demo
board. This is due to the PIC18F1320 being powered directly from the AAA batteries
and the A/D module using VDD as its reference voltage.
The current firmware implementation will transmit a larger value to the Primary device
as the battery voltage decreases, given a constant temperature.
A firmware technique to correct for this would be to use the PIC18F1320 LVD module.
A hardware technique would be to use a voltage regulator to ensure that the system
voltage remains constant, regardless of the voltage output of the batteries.
DS51487A-page 10
 2004 Microchip Technology Inc.
2.4
RUNNING THE DEMOS
This demo board can interface to any Primary device that implements the IrCOMM
9-wire “cooked” protocol layer. Some typical Primary devices include:
1. Palm PDA
2. Pocket PC PDA
3. Laptop PC with IrDA Standard Port
To communicate with the MCP2140 IrDA Standard Wireless Temperature Sensor
Demo Board, these devices must run a terminal emulation program (such as
HyperTerminal® on the PC).
For the Palm OS® devices, there is a program called Online. For more information
about Online and the setup of this application, refer to page 23 of Application Note 858,
“Interfacing the MCP215X to a Host Microcontroller”, or go to the Mark Space web site
(www.MarkSpace.com).
Microchip has not evaluated any Terminal Emulation programs for Pocket PC OS
devices at this time. Refer to Section 2.4.1 “Alternative Primary Device Programs”
for an alternative Primary device program.
For a Windows® XP system, a 3rd-party driver needs to be installed to “create” the
“virtual port” that HyperTerminal needs to connect to that allows it to use the IR port for
communications. This driver is called IrCOMM2K and is available at
www.IRCOMM2K.de. Please evaluate this product before installing onto your system
to ensure that it will meet your requirements.
Microchip does not imply any suitability to your system requirements of any of these
3rd-party products. Please evaluate each product’s specifications and requirements
before installing onto your system.
Two step-by-step examples for this demo will be presented. Section 2.4.2 “Using a
Palm PDA or Equivalent as the Primary Device” shows the steps using a Palm PDA,
while Section 2.4.3 “Using a Laptop PC as the Primary Device” shows the steps
using a Windows® XP based laptop with IR port.
2.4.1
Alternative Primary Device Programs
Microchip also has some example Primary Device programs that could be used to
demonstrate the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board.
These programs were not developed for this demo board and may not display all
modes of operation in a straight-forward manner (such as the “Transmit Temperature”
program). These programs are discussed in the following application notes:
• For Palm OS - Application Note 888, “Programming the Palm OS® for Embedded
IR Applications” (DS00888)
• For Pocket PC OS - Application Note 926, “Programming the Pocket PC OS for
Embedded IR Applications” (DS00926)
• For Windows XP - Application Note 941, “Programming Windows® XP for
Embedded IR Applications” (DS00941)
Appendix F. “Using AN888 Program with a Palm™ PDA” shows how to use the
Palm PDA and AN888 to demonstrate the demo board. The operation for the Pocket
PC and Windows XP applications are similar and are discussed in AN926 and AN941.
 2004 Microchip Technology Inc.
DS51487A-page 11
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
2.4.2
Using a Palm PDA or Equivalent as the Primary Device
Section 2.4.2.1 “Operating the “Transmit 250 Byte Data String” program”
discusses how to operate the “Transmit 250 Byte Data String” program, while Section
2.4.2.2 “Operating the “Transmit Temperature” Program” discusses how to
operate the “Transmit Temperature” program.
2.4.2.1
OPERATING THE “TRANSMIT 250 BYTE DATA STRING” PROGRAM
1. Ensure 3 AAA batteries are properly inserted into the battery holder.
2. Connect JP1 (closed position). The power LED (D5) will turn on. After a few
seconds, the PHACT LED (D4) will also turn on, indicating that the MCP2140’s
protocol handler is in the Non-Discovery Mode (NDM) state or the MCP2140 is
in the Low-power mode.
3. Depress and release the RESET button.
4. Turn on the Palm (or equivalent) PDA.
5. With both devices on a flat surface, place the Palm PDA about 25 cm (10”) away
from the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board,
pointing the IR port of the Palm PDA (dark red window at the top of the PDA)
toward the two clear LEDs (D1, D6) on the MCP2140 IrDA Standard Wireless
Temperature Sensor Demo Board.
6. Open the Online program on the Palm PDA.
7. Tap the ON button.
8. Tap the 123 button.
9. Tap any number (0-9). This is the command that will be received by the
MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board, instructing
the program to send a data string back to the Palm PDA. At this time, the DSR
(D2), CTS (D3) and PHACT (D4) LEDs are turned off.
10. Send the command by tapping the DONE button. Once the DONE button has
been tapped, the DSR and PHACT LEDs will turn on and the CTS LED will strobe
until all the data has been transmitted.
11. The Palm PDA window should receive a string of data as shown in Figure 2-4.
FIGURE 2-4:
ONLINE WINDOW AFTER RECEIVING 250 BYTE DATA
STRING
32345678
4bcdefgh
52345678
6BEDEFGH
72345678
8bcdefgh
92345678
ABCDEFGH
B2345678
Cbcdefgh
D2345678
EBCDEFGH
F2345678
1bcdefgh
22345678
abc 123 Intl
Ctl Esc i
On Log < ^ v >
Macros
12. Repeating steps 8 through 10 will cause the Palm PDA to transmit another data
byte and receive another data string.
13. In the Palm window, tap the ON button (it becomes unshaded - normal display).
The DSR and CTS LEDs will immediately turn off and the PHACT LED will turn
on in about 10 seconds.
DS51487A-page 12
 2004 Microchip Technology Inc.
2.4.2.2
OPERATING THE “TRANSMIT TEMPERATURE” PROGRAM
1. Ensure 3 AAA batteries are properly inserted into the battery holder.
2. Connect JP1 (closed position). The power LED (D5) will turn on. After a few
seconds, the PHACT LED (D4) will also turn on, indicating that the MCP2140’s
protocol handler is in the NDM (Non-Discovery Mode) state or the MCP2140 is
in the Low-power mode.
3. Depress the RESET and S2 buttons, then release the RESET button (keep the
S2 button depressed).
4. Release the S2 button.
5. Turn on the Palm (or equivalent) PDA.
6. With both devices on a flat surface, place the Palm PDA about 25 cm (10”) away
from the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board,
pointing the IR port of the Palm PDA (dark red window at the top of the PDA)
toward the two clear LEDs (D1, D6) on the MCP2140 IrDA Standard Wireless
Temperature Sensor Demo Board.
7. Open the Online program on the Palm PDA.
8. Tap the ON button. (it becomes shaded - reverse video).
9. Tap the 123 button.
10. Tap any number (0-9). This is the command that will be received by the
MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board, instructing
the program to begin sending temperature data to the Palm PDA. At this time,
the DSR (D2), CTS (D3) and PHACT (D4) LEDs are turned off.
11. Send the command by tapping the DONE button. Once the DONE button has
been tapped, the DSR and PHACT LEDs will turn on and the CTS LED will strobe
until all the data has been transmitted.
12. The Palm PDA window should receive a string of data about every second, as
shown in Figure 2-5.
FIGURE 2-5:
ONLINE WINDOW AFTER RECEIVING TEMPERATURE DATA
STRING
Temp = 28
Temp = 28
Temp = 28
abc 123 Intl
Ctl Esc i
On Log < ^ v >
Macros
13. Device U4 is the TC1047A temperature sensor device. The output is connected
to an A/D channel of the PIC18F1320. Changing the temperature of this device
will effect the ”temperature” value that is transmitted to the Primary device.
14. In the Palm window, tap the ON button (it becomes unshaded - normal display).
The DSR and CTS LEDs will immediately turn off and the PHACT LED will turn
on in about 10 seconds.
Note:
 2004 Microchip Technology Inc.
Temperature value transmitted by the PIC18F1320 will be dependent on
battery voltage (see Section 2.3.2.2 ““Transmit Temperature” Program
Description”).
DS51487A-page 13
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
2.4.3
Using a Laptop PC as the Primary Device
To use a Laptop PC with an IrDA standard port as the Primary device, the Terminal
Emulation program needs to be able to “connect” to the IR port. In Windows 2000 and
Windows XP systems, this requires the installation of a 3rd Party driver. One 3rd Party
driver is called “IrCOMM2K (www.IRCOMM2K.de). Once the IrCOMM2K driver is
installed, it creates a “new” com port (such as COM7). This is a virtual serial port that
the PC Terminal Emulation application program (such as HyperTerminal) can be connected to. Then HyperTerminal needs to be configured. Refer to Section
2.4.3.1 “Configuring HyperTerminal”.
After configuring HyperTerminal, Section 2.4.3.2 “Running the Demo Using
HyperTerminal” discusses how to operate the MCP2140 IrDA Standard Wireless
Temperature Sensor Demo Board via HyperTerminal.
2.4.3.1
CONFIGURING HYPERTERMINAL
1. Start the HyperTerminal Emulation program (usually located under the Programs
> Accessories > Communications directory.
FIGURE 2-6:
CONNECTION DESCRIPTION WINDOW
2. In the Connection Description window, select the Cancel button.
3. In the programs menu, select File > Properties.
4. In the New Connection Properties window on the Connect To tab, go to the
“Connect Using” pull-down and select the virtual serial port created by the
IrCOMM2K driver installation (such as COM7).
FIGURE 2-7:
DS51487A-page 14
NEW CONNECTION PROPERTIES WINDOW
 2004 Microchip Technology Inc.
5. Select the Configure button.
FIGURE 2-8:
COM7 PROPERTIES WINDOW
6. In the COMx (COM7) Properties window, configure the Port Setting for:
- “Bits per second:” = 115200
- “Data Bits:” = 8
- “Parity:” = None
- “Stop Bit:” = 1
- “Flow Control:” = None
7. Select the OK button.
8. In the New Connection Properties window, select the Settings tab.
FIGURE 2-9:
NEW CONNECTION PROPERTIES WINDOW - SETTINGS TAB
9. Configure the New Connection Properties Settings.
- Under the “Function, arrow and control keys act as” item, select the
Terminal Keys radio button.
- Under the “Backspace key sends” item, select the Ctrl+H radio button.
- From the “Emulation” pull-down menu, select Auto-detect.
- For “Telnet Terminal ID”, enter ANSI.
- For “Backscroll buffer lines”, select 500 from the pull-down menu.
 2004 Microchip Technology Inc.
DS51487A-page 15
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
10. Select the ASCII Setup button, this will open a new window.
FIGURE 2-10:
NEW CONNECTION PROPERTIES - ASCII SETUP
11. In the “ASCII Sending” portion of the window:
- Check “Send Line ends with line feeds”.
- Check “Echo typed characters locally”.
- Set the “Line Delay” and the “Character Delay” to ‘0’ milliseconds.
12. In the “ASCII Receiving” portion of the window:
- Uncheck “Append line feeds to incoming line ends”.
- Uncheck “Force incoming data to 7-bit ASCII”.
- Check “Wrap lines that exceed terminal width”.
13. Select the OK button.
14. Select the Input Translation button.
- In the “Host System Encoding Method” window, select Shift-JIS. Then
select the OK button in the New Connection Properties window.
FIGURE 2-11:
NEW CONNECTION PROPERTIES - HOST SYSTEM
ENCODING METHOD
15. Now that all the settings are configured, in HyperTerminal’s pull-down menu,
select File > Save As. Select the name that you wish.
DS51487A-page 16
 2004 Microchip Technology Inc.
2.4.3.2
RUNNING THE DEMO USING HYPERTERMINAL
Now that the HyperTerminal application program is configured, the PC can communicate with the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board.
Section 2.4.3.2.1 “Operating the “Transmit 250 Byte Data String” Program”
discusses how to operate the “Transmit 250 Byte Data String” program, while Section
2.4.3.2.2 “Operating the “Transmit Temperature” Program” discusses how to
operate the “Transmit Temperature” program.
Note:
2.4.3.2.1
Hyperterminal® should be disabled before establishing a connection
between the PC and the MCP2140 IrDA Standard Wireless Temperature
Sensor Demo Board. Make sure that any other programs (e.g., HotSync®)
connected to the IR ports are disabled.
Operating the “Transmit 250 Byte Data String” Program
1. Ensure 3 AAA batteries are properly inserted into the battery holder.
2. Connect JP1 (closed position). The power LED (D5) will turn on. After a few
seconds, the PHACT LED (D4) will also turn on, indicating that the MCP2140 is
in the Non-Discovery Mode (NDM) state.
3. Depress and release the RESET button.
4. Turn on the PC laptop.
5. With both devices on a flat surface, place the Palm PDA about 25 cm (10”) away
from the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board,
pointing the IR port of the PC toward the two clear LEDs (D1, D6) on the
MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board.
6. If the PC is configured to show the IR icon in the system tray, a single IR LED
icon will be displayed. Placing the mouse cursor over this icon will display the
message “MCP2140 A5 is in range”, where “MCP2140 A5” is the Device ID of
the MCP2140.
7. Start the HyperTerminal program using the saved setting from Section
2.4.3.1 “Configuring HyperTerminal”. When HyperTerminal starts, it is in the
connected state. To disconnect, click on the telephone icon (4th icon from left on
toolbar). To connect, click on the telephone icon (3rd icon from left). Depending
on the current state of the HyperTerminal session, only one of the two telephone
icons will be active (the other will be grayed out).
8. Ensure that the HyperTerminal session indicates “Connected” (lower-left of
HyperTerminal window) and the icon in the system tray changes to two IR LEDs
facing each other and “talking”.
9. Place the mouse cursor over the IR icon in the system tray. The message
displayed now says “Wireless link with MCP2140 A5 at 9600 bps”. This shows
that a link is established for data communication and that the IR communication
rate is 9600 bps (even though the HyperTerminal program is “talking” to the driver
at 115200, the IrDA standard hardware is communicating at the rate negotiated
with the MCP2140.
10. Type any number (0-9) in the HyperTerminal window. The MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board requires a receive byte before
transmitting its data. This is due to the requirement of most PDAs needing to
transmit a data byte before opening the IR Link. The data byte is sent as it is
typed. At this time, the DSR (D2), CTS (D3) and PHACT (D4) LEDs are turned off.
11. The HyperTerminal window should receive a string of data as shown in
Appendix D. “MCP2140 250 Byte Data Transmit Table”.
12. Repeating steps 10 and 11 will cause the PC to transmit another data byte and
to receive another data string.
13. Disconnect (close) the HyperTerminal session. The DSR and CTS LEDs will
immediately turn off and the PHACT LED will turn on in about 10 seconds.
 2004 Microchip Technology Inc.
DS51487A-page 17
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
2.4.3.2.2
Operating the “Transmit Temperature” Program
1. Ensure 3 AAA batteries are properly inserted into the battery holder.
2. Connect JP1 (closed position). The power LED (D5) will turn on. After a few
seconds, the PHACT LED (D4) will also turn on, indicating that the MCP2140 is
in the NDM (Non-Discovery Mode) state.
3. Depress the RESET and S2 buttons, then release the RESET button (keep the
S2 button depressed).
4. Release the S2 button.
5. With both devices on a flat surface, place the MCP2140 IrDA Standard Wireless
Temperature Sensor Demo Board about 25 cm (10”) away from the PC (dark red
window at the front or sides of the PC) toward the two clear LEDs (D1, D6) on
the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board.
6. If the PC is configured to show the IR icon in the system tray, a single IR LED
icon will be displayed. Placing the mouse cursor over this icon will display the
message “MCP2140 A5 is in range”, where “MCP2140 A5” is the Device ID of
the MCP2140.
7. Start the HyperTerminal program by using the saved setting from Section
2.4.3.1 “Configuring HyperTerminal”. When HyperTerminal starts, it is in the
connected state. To disconnect, click on the telephone icon (4th icon from left on
toolbar). To connect, click on the telephone icon (3rd icon from left). Depending
on the current state of the HyperTerminal session, only one of the two telephone
icons will be active (the other will be grayed out).
8. Ensure that the HyperTerminal session indicates “Connected” (lower-left in
HyperTerminal window) and that the icon in the system tray changes to two IR
LEDs facing each other and “talking”.
9. Place the mouse cursor over the IR icon in the system tray. The message
displayed now says “Wireless link with MCP2140 A5 at 9600 bps”. This shows
that a link is now established for data communication, and that the IR
communication rate is 9600 bps (even though the HyperTerminal program is
“talking” to the driver at 115200, the IrDA standard hardware is communicating
at the rate negotiated with the MCP2140).
10. Type any number (0-9) in the HyperTerminal window. The MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board requires a receive byte before
transmitting it’s data. This is due to the requirement of most PDAs needing to
transmit a data byte before opening the IR Link. The data byte is sent as it is
typed. At this time, the DSR (D2), CTS (D3) and PHACT (D4) LEDs are turned
off.
11. The PC HyperTerminal window should receive a string of data about every
second. This data string has the format “Temp = xx”, where xx is the measured
temperature in °C.
12. Device U4 is the TC1047A Temperature Sensor device. The output is connected
to an A/D channel of the PIC18F1320. Changing the temperature of this device
will effect the ”temperature” value that is transmitted to the Primary device.
13. Disconnect (close) the HyperTerminal session. The DSR and CTS LEDs will
immediately turn off and the PHACT LED will turn on in about 10 seconds.
Note:
DS51487A-page 18
Temperature value transmitted by the PIC18F1320 will be dependent on
battery voltage (see Section 2.3.2.2 ““Transmit Temperature” Program
Description”).
 2004 Microchip Technology Inc.
2.5
MCP2140 IrDA STANDARD WIRELESS TEMPERATURE SENSOR DEMO
BOARD DESCRIPTION
The MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board is designed
to demonstrate and evaluate an IR port implementation using the MCP2140 device.
The following sections describe each element of this demo board in further detail.
2.5.1
Power
The MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board is powered
by three AAA batteries, generating a nominal voltage of 4.5V. Jumper JP1 is the power
switch on the board. LED D5 is the power indicator, turning on when power is applied
via JP1.
2.5.2
MCP2140 IrDA Protocol Stack Controller Device
This demo board highlights the MCP2140 IrDA Protocol Stack Controller device (U2)
to demonstrate the implementation of an IR port in an embedded system application.
The MCP2140 device handles all IrDA standard protocol tasks, while allowing the
system designer to easily interface the device to a microcontroller via a standard UART
port.
The key signals for the MCP2140-to-microcontroller interface are shown in Table 2-1.
Further information on the Host Controller interface may be obtained from the
MCP2140 data sheet (DS21790).
 2004 Microchip Technology Inc.
DS51487A-page 19
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
TABLE 2-1:
Pin Name
Pin
Pin
Number
Type
(SSOP)
Buffer
Type
Description
TX
8
I
TTL
RX
9
O
—
RI
10
I
TTL
DSR
11
O
—
Data Set Ready. Indicates that the MCP2140 has
established a valid infrared link with a Primary
device. This signal is locally emulated and not
related to the DTR bit of the IrDA standard Primary
device. (Note 1)
1 = An IR link has not been established
(No IR Link)
0 = An IR link has been established (IR Link)
DTR
12
I
TTL
Data Terminal Ready. Indicates that the embedded
device connected to the MCP2140 is ready for IR
data. The state of this bit is communicated to the
IrDA Primary device, via the IrDA standard DSR bit
carried by IrCOMM.
1 = Embedded device not ready
0 = Embedded device ready
CTS
13
O
—
Clear to Send. Indicates that the MCP2140 is
ready to receive data form the Host Controller. This
signal is locally emulated and not related to the
CTS/RTS bit of the IrDA standard Primary device.
1 = Host Controller should not send data
0 = Host Controller may send data
RTS
14
I
TTL
Request to Send. Indicates that a Host Controller is
ready to receive data from the MCP2140. This
signal is locally emulated and not related to the
CTS/RTS bit of the IrDA standard Primary device.
1 = Host Controller not ready to receive data
0 = Host Controller ready to receive data
CD
19
I
ST
Carrier Detect. The state of this bit is
communicated to the IrDA standard Primary device
via the IrDA standard CD bit.
1 = No Carrier Present
0 = Carrier Present
Legend:
Note 1:
DS51487A-page 20
MCP2140 HOST UART INTERFACE PINS
Asynchronous receive; from Host Controller UART
Asynchronous transmit; to Host Controller UART
Ring Indicator. The state of this bit is
communicated to the IrDA® standard Primary
device.
1 = No Ring Indicate Present
0 = Ring Indicate Present
TTL = TTL compatible input
ST = Schmitt Trigger input with CMOS levels
I = Input
O = Output
The state of the DTR output pin does not reflect the state of the DTR bit of the IrDA
standard Primary device.
 2004 Microchip Technology Inc.
The key signals for the MCP2140-to-IR transceiver circuit are shown in Table 2-2.
Further information on the IR transceiver interface may be obtained from the MCP2140
data sheet (DS21790).
TABLE 2-2:
MCP2140 IR INTERFACE PINS
Pin
Number
(SSOP)
Pin
Type
Buffer
Type
RXPDREF
1
I
A
IR Receive Photo Detect Diode reference voltage.
This voltage will typically be in the range of VDD/2.
TXIR
2
O
—
Asynchronous transmit to IrDA® standard
transceiver.
RXPD
20
I
A
IR RX Photo Detect Diode input. This input signal is
required to be a pulse to indicate an IR bit. When
the amplitude of the signal crosses the amplitude
threshold set by the RXPDREF pin, the IR bit is
detected. The pulse has minimum and maximum
requirements as specified in the MCP2140 data
sheet, Electrical Characteristics table,
Parameter IR131A.
Pin Name
Legend: A = Analog
I = Input
Description
P = Power
O = Output
In addition to the signals described in Tables 2-1 and 2-2, the PHACT (Protocol Handler
Active) output signal indicates which mode the MCP2140 IrDA standard protocol
controller state machine is in (0 = NDM or Low-power mode,1 = Discovery or NRM)
and is connected to the PHACT LED (D4); the RESET input is connected to the RESET
output of the Host Controller (I/O pin RA4), which asserts low after the RESET
push-button switch is asserted; the RI (Ring Indicator) input is pulled to ground; and the
OSC1 and OSC2 pins are connected to an external 7.3728 MHz oscillator, as specified
in the MCP2140 data sheet (allowing the device to transmit at 9600 baud).
2.5.2.1
MCP2140 OPERATION
The MCP2140 (U3) implements the 9-wire “cooked” service class in the IrCOMM
application layer protocol of the IrDA standard specification. IrCOMM is the IrDA
standard specification for the replacement of the communication ports (serial and
parallel) of a PC. The MCP2140 allows the replacement of the serial cable with a wireless interface. The MCP2140 implements the entire protocol layer, and the Host
Controller (PIC18F1320) “talks” to the MCP2140 as if it were a serial port with flow
control.
The MCP2140 operates as a Secondary device only, so it will not initiate IrDA standard
communication with other IrDA standard devices (neither a Secondary device nor a
Primary device).
Appendix C. “MCP2140 Connection Sequence Overview” shows the connection
sequence between a Primary device and the MCP2140 (Secondary device). This
connection sequence is shown at an overview level and does not show exact
operation.
 2004 Microchip Technology Inc.
DS51487A-page 21
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
2.5.3
PICmicro® Microcontroller Functions
The MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board interfaces to
the PIC18F1320 microcontroller (U1). This device was chosen for this application
because it has a UART port, an A/D Converter (ADC) for the temperature sensor
analog output, Flash memory for reprogrammability, a small footprint (package) and is
low-power.
The PIC18F1320 interfaces to the MCP2140 as described in Section 2.5.2 “MCP2140
IrDA Protocol Stack Controller Device”.
The TC1047A temperature sensor indicates the temperature by outputting an analog
signal whose magnitude corresponds to the temperature of the device. This signal is
input on analog channel AN0 (pin 1).
The MCLR input of the PIC18F1320 is connected to the RESET push button switch.
The device is reset when the RESET push button is depressed.
I/O pin RB0 is connected to the S2 push button switch. The state of the switch is polled
immediately after the device is reset (via the RESET push button), allowing the
microcontroller to determine which firmware program (“Data String Transmit” or
“Temperature Transmit)” to execute.
The PIC18F1320 is connected to a standard In-Circuit Serial Programming™ (ICSP™)
header (J1) to allow easy program access to the device.
2.5.4
IR Transceiver Circuit
The IR transceiver circuit utilizes an integrated optical transceiver. The circuit allows
any one of three devices to be used. These are:
1. Vishay® TFDU 4100 (default device)
2. Vishay TFDU 4300
3. Agilent® HSDL 3000
If you wish to test with either of the other optical transceivers, the TFDU 4100 and
associated components need to be removed and the components for the desired
optical transceiver need to be installed (see the Appendix B. “Bill-Of-Materials
(BOM)”).
Figure 2-12 shows the circuit that is used to shape the waveform of the optical Transceiver’s RXD output. This is done to ensure that the RXD pulse width does not exceed
the specifications of the MCP2140 RXPD input (IR131A) (refer to Parameter IR131A
in the MCP2140 data sheet, DS21790). The resistor divider R18 and R13 sets the
RXPDREF reference threshold. Transistor Q8 (MMUN2111LT1) has internal resistors.
If you wish to evaluate a simple PNP device, Q8 can be replaced and resistors for R15
and R20 may need to be added. If R20 is added, do not forget to cut the trace that
shorts-out the resistor.
FIGURE 2-12:
MCP2140 RXPD WAVEFORM SHAPING CIRCUIT
VDD
VDD
TP1
R7
100Ω
R18
10 kΩ
2
RXPDREF
RXPDREF
TP2
RXPD
RXPD
1
3
Q6
R15
OPT
R20
OPT
C9
47 pF
RXD
(From Optical
Transceiver)
R16
4.7 kΩ
R13
10 kΩ
DS51487A-page 22
 2004 Microchip Technology Inc.
2.5.5
Signal Header
To allow easy access to many of the system signals, a header (J2) was placed on one
of the edges of the board. This allows the signals from the MCP2140, PIC18F1320 and
other system signals to be accessed.
The header (J2) RESET signal is the RESET pin of the MCP2140 and not the signal
from the RESET switch.
If desired, the PIC18F1320 could be electrically removed, and the remaining MCP2140
circuitry could be interfaced to another system board for quick system validation. The
PIC18F1320 can be electrically removed by either:
1. Physically removing the device.
2. Erasing the PIC18F1320’s program memory (after device reset, all pins are
inputs).
 2004 Microchip Technology Inc.
DS51487A-page 23
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
NOTES:
DS51487A-page 24
 2004 Microchip Technology Inc.
MCP2140 IrDA® STANDARD
WIRELESS TEMPERATURE SENSOR
DEMO BOARD USER’S GUIDE
Appendix A. Schematic and Layouts
A.1
INTRODUCTION
This appendix contains the following schematics and layouts for the MCP2140 IrDA
Standard Wireless Temperature Sensor Demo Board:
•
•
•
•
•
•
A.2
Board Schematic - Digital circuitry
Board Schematic - Analog circuitry
Board - Top Layer
Board - Bottom Layer
Board - Ground Layer
Board - Power Layer
SCHEMATICS AND PCB LAYOUT
Figure A-2 shows the schematic of the digital circuitry, while Figure A-3 shows the
analog circuitry for the MCP2140 receiver circuitry and transmitter circuitry.
Figure A-4 through Figure A-7 show the layout for the four different layers of the
MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board. The layer order
is shown in Figure A-1.
FIGURE A-1:
LAYER ORDER
Top Layer
Ground Layer
Power Layer
Bottom Layer
A.2.1
Electronic Change Notice (ECN)
There are 3 ECNs to the Rev. 1 version of the board. Two relate to the use of alternate
optical transceivers and are discussed in Appendix E. “Alternate Optical Transceiver
Implementation”. The third relates to the pinout of transistor Q6 (MMUN2111LT1). An
incorrect pinout was specified, so the device needs to be rotated 1 pin in the clockwise
direction. Figure A-8 shows how this change will appear.
 2004 Microchip Technology Inc.
DS51487A-page 25
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
MCP2140 IrDA® STANDARD WIRELESS TEMPERATURE SENSOR DEMO
BOARD SCHEMATIC - PAGE 1
1
2
3
4
7
VDD 15
VDD 16
RXPDREF
TXIR
PHACT
RESET
NC
5 VSS
6 VSS
RI
DSR
DTR
CTS
RTS
10
11
12
13
14
1
8 TX
9 RX
OSC2/CLK0 17
OSC1/CLKI 18
M
FIGURE A-2:
2
1
3
2
1
3
3
2
DS51487A-page 26
 2004 Microchip Technology Inc.
MCP2140 IrDA® STANDARD WIRELESS TEMPERATURE SENSOR DEMO
BOARD SCHEMATIC - PAGE 2
1
M
FIGURE A-3:
3
2
 2004 Microchip Technology Inc.
DS51487A-page 27
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
FIGURE A-4:
DS51487A-page 28
MCP2140 IrDA® STANDARD WIRELESS TEMPERATURE SENSOR DEMO
BOARD LAYOUT - TOP LAYER
 2004 Microchip Technology Inc.
FIGURE A-5:
MCP2140 IrDA® STANDARD WIRELESS TEMPERATURE SENSOR DEMO
BOARD LAYOUT - BOTTOM LAYER
 2004 Microchip Technology Inc.
DS51487A-page 29
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
FIGURE A-6:
DS51487A-page 30
MCP2140 IrDA® STANDARD WIRELESS TEMPERATURE SENSOR DEMO
BOARD LAYOUT - GROUND LAYER
 2004 Microchip Technology Inc.
FIGURE A-7:
MCP2140 IrDA® STANDARD WIRELESS TEMPERATURE SENSOR DEMO
BOARD LAYOUT - POWER LAYER
 2004 Microchip Technology Inc.
DS51487A-page 31
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
A.3
ECNS
This section discusses the ECNs for this board. There are three (3) ECNs associated
with this board. Two are related to the alternate transceiver circuits and are discussed
in Appendix E. “Alternate Optical Transceiver Implementation”.
The last ECN relates to all transceiver circuits. Transistor Q6 was laid out with the
wrong pinout. To correct for this, transistor Q6 needs to be rotated clockwise by 1 pin.
Figure A-8 shows how to connect transistor Q6 on the PCB.
FIGURE A-8:
TRANSISTOR Q6 ECN
R20
R13 U6
R18
TP1
DS51487A-page 32
Q6
R16
TP2
 2004 Microchip Technology Inc.
MCP2140 IrDA® STANDARD
WIRELESS TEMPERATURE SENSOR
DEMO BOARD USER’S GUIDE
Appendix B. Bill-Of-Materials (BOM)
TABLE B-1:
Qty
5
BILL OF MATERIALS
Reference
Description
C0603C104K3RACTU
Capacitor, Ceramic, 22 pF, 50V, NP0 0603
Yageo America
Capacitor, Ceramic, 33 pF, 50V, NP0 0603
Resistor, 4.75 kΩ, 1/16w, 1%, 0603 SMD
Resistor, 10.0 kΩ, 1/16w, 1%, 0603 SMD
Yageo America
Panasonic®
Panasonic
CAP CERAMIC 22PF
50V NP0 0603
0603CG330J9B200
ERJ-3EKF4751V
ERJ-3EKF1002V
Resistor, 20.0 kΩ, 1/16w, 1%, 0603 SMD
Resistor, 100Ω, 1/16w, 1%, 0603 SMD
Resistor, 100 kΩ, 1/16w, 1%, 0603 SMD
Resistor, 475Ω, 1/16w, 1%, 0603 SMD
(Optional - Not Populated)
Led, Red, Clear, 0805 SMD
Transistor, GP, PNP, AMP, SOT-23
Panasonic
Panasonic
Panasonic
Panasonic
Not Used
Lite-on
Fairchild®
Semiconductor
ON Semi®
ERJ-3EKF2002V
ERJ-3EKF1000V
ERJ-3EKF1003V
ERJ-3EKF4750V
NOT USED
LTST-C170CKT
MMBT3906
Microchip
Technology Inc.
Microchip
Technology Inc.
Microchip
Technology Inc.
Esc Inc.
Omron®
Keystone
Electronics®
Moldex/Waldom™
AMP/Tyco
Electronics
PIC18F1320-I/SS
3
2
4
4
2
4
3
1
Q6
1
U1
1
U3
1
U4
2
2
1
Y1,Y2
S2, Reset
BAT1
MCP2140, Infrared Communications
Controller
TC1047A, Linear Voltage Output
Temperature Sensor
Crystal, 7.3728 MHZ, 20 pF, SMD
Switch, Tact, 6MM, MOM, 100 GF
Holder, Battery, 3-Cell, AAA, pc mount
1
1
JP1
J1
Conn, Header, 2-Pos .100 Vert Tin
Conn, Mod Jack ,6-6 R/A PCB 50AU
1
2
3
Part Number
Capacitor, 0.1 µF, 25V, Ceramic, X7R 0603 Kemet
C1, C2, C3, C4,
C11
C5, C6, C13,
C14
C9
R16
R1,R8,R13,R18,
R22
R21,R23,R24
R5,R7
R4,R19
R2,R3,R6,R11
R25
D2, D3, D4, D5
Q3,Q4,Q5
4
Mfgr.
®
RF, Bipolar Transistor, 50V Collector-Emitter Voltage, 5.0 mA Current Rating
PIC18F1320 Microcontroller
 2004 Microchip Technology Inc.
MMUN2111LT1
MCP2140
TC1047AVNB
ECS-73-20-5PDN
B3F-1000
2479
22-28-4020
A9049-ND
DS51487A-page 33
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
TABLE B-1:
Qty
BILL OF MATERIALS (CONTINUED)
Reference
Description
Default Optical Transceiver - TFDU 4100
1
U2
TFDU4100-TR3, Infrared Transceiver,
900 nM, wavelength, 3
1
R10
Resistor, 47.5Ω, 1/10w, 1%, 0805 SMD
1
R26
Resistor, 14.0Ω, 1/10w, 1%, 0805 SMD
1
C17
Capacitor, Tantalum, 4.7 µF, 16V, 10% SMD
1
C18
Capacitor, 0.1 µF, 25V, Ceramic, X7R 0603
Alternate Optical Transceiver 1 - TFDU 4300
1
U5
TFDU4300
1
R14
Resistor, 47.5Ω, 1/10w, 1%, 0805 SMD
1
R28
Optional Current limiting Resistor 1/16w,
1%, 0603 SMD
2
C7, C12
Capacitor, 0.1 µF, 25V, Ceramic, X7R 0603
2
C15, C16
Capacitor, Tantalum, 4.7 µF, 16V, 10%
SMD
Alternate Optical Transceiver 2 - HSDL 3000
1
U6
HSDL-3000#007
1
1
1
R27
C19
C20
DS51487A-page 34
Mfgr.
Part Number
Vishay®
TFDU4100-TR3
Panasonic®
Panasonic
Kemet®
Kemet
ERJ-6ENF47R5V
ERJ-6ENF14R0V
T491B475K016AS
C0603C104K3RACTU
Vishay
Panasonic
Panasonic
TFDU4300
ERJ-6ENF47R5V
Application dependant
Kemet
Kemet
C0603C104K3RACTU
T491B475K016AS
Agilent®
Technologies
Resistor, 6.80Ω, 1/8w, 1%, 0805 SMD
Yageo America
Capacitor, Ceramic, .47 µF, 10V, X5R 0603 Kemet
Capacitor, 6.8 µF, 16V, Tantalum TE Smd
Panasonic
HSDL-3000#007
9C08052A6R80FGHFT
C0603C474K8PACTU
ECS-T1CY685R
 2004 Microchip Technology Inc.
MCP2140 IrDA® STANDARD
WIRELESS TEMPERATURE SENSOR
DEMO BOARD USER’S GUIDE
Appendix C. MCP2140 Connection Sequence Overview
FIGURE C-1:
HIGH-LEVEL MCP2140 CONNECTION SEQUENCE
Primary Device
Normal Disconnect Mode (NDM)
No IR Activity
(for 10 seconds)
Send XID Commands
(time slots n, n+1, ...)
(approximately 70 ms
between XID commands)
Finish sending XIDs
(max time slots - y frames)
Broadcast ID
MCP2140
(Secondary Device)
PHACT pin driven low
PHACT pin driven high
No Response
XID Response in time slot y,
claiming this time slot, (MCP214X
always claims time slot 0)
No Response to these XIDs
No Response to Broadcast ID
Discovery
Send SNRM Command
(w/ parameters and
connection address)
UA response with parameters
using connect address
Open channel for IAS Queries
Confirm channel open for IAS
Send IAS Queries
Provide IAS responses
Open channel for data
Confirm channel open for data
Normal Response Mode (NRM)
Send Data or Status
(MCP2140 DSR pin driven low)
Send Data or Status
Send Data or Status
Send Data or Status
Shutdown link
Confirm shutdown
(back to NDM state)
No IR Activity
(for 10 seconds)
 2004 Microchip Technology Inc.
PHACT pin driven low
DS51487A-page 35
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
NOTES:
DS51487A-page 36
 2004 Microchip Technology Inc.
MCP2140 IrDA® STANDARD
WIRELESS TEMPERATURE SENSOR
DEMO BOARD USER’S GUIDE
Appendix D. MCP2140 250 Byte Data Transmit Table
TABLE D-1:
TXTBL
;
; NOTE:
;
 2004 Microchip Technology Inc.
PIC18F1320 250 BYTE DATA TRANSMIT TABLE
DT
D’250’
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
DT
“12345678”,
“2BCDEFGH”,
“32345678”,
“4bcdefgh”,
“52345678”,
“6BCDEFGH”,
“72345678”,
“8bcdefgh”,
“92345678”,
“ABCDEFGH”,
“B2345678”,
“Cbcdefgh”,
“D2345678”,
“EBCDEFGH”,
“F2345678”,
“1bcdefgh”,
“22345678”,
“3BCDEFGH”,
“42345678”,
“5bcdefgh”,
“62345678”,
“7BCDEFGH”,
“82345678”,
“9bcdefgh”,
“a2345678”,
; the first byte is the byte count
; 1 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D, 0x0A
; 10 Characters
0x0D = Carriage Return, 0x0A = Line Feed
DS51487A-page 37
MCP2140 250 Byte Data Transmit Table
NOTES:
 2004 Microchip Technology Inc.
DS51487A-page 38
MCP2140 IrDA® STANDARD
WIRELESS TEMPERATURE SENSOR
DEMO BOARD USER’S GUIDE
Appendix E. Alternate Optical Transceiver Implementation
E.1
INTRODUCTION
This appendix contains the description for implementing either of the other two optical
transceiver implementations.
E.2
Note 1:
When performing either of these alternate optical transceiver
implementations, please make sure to remove all of the components that
are related to the TFDU 4100 implementation.
2:
Some component value modifications may be required to ensure that the
IR131A electrical specification is met. This may require different values
for the following components R13, R18, R16, R17, C9 and Q6 (which
may then require R15 and R20).
HIGHLIGHTS
Diagrams included in this appendix:
• Vishay TFDU 4300 implementation
• Agilent HSDL 3000 implementation
 2004 Microchip Technology Inc.
DS51487A-page 39
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
E.3
VISHAY® TFDU 4300 IMPLEMENTATION
Figure E-1 shows the schematic for the TFDU 4300 circuit and the ECN change that
needs to be implemented. Figure E-2 shows how to make this correction on the layout.
FIGURE E-1:
ECN
FIGURE E-2:
TFDU 4300 OPTICAL TRANSCEIVER ECN - SCHEMATIC
VDD
TFDU 4300 OPTICAL TRANSCEIVER ECN - LAYOUT
ECN Blue wire
Resistor R14 to C16 and C12
connection to VDD (via below
R10)
DS51487A-page 40
 2004 Microchip Technology Inc.
E.4
AGILENT® HSDL 3000 IMPLEMENTATION
Figure E-3 shows the correction to the schematic for the HSDL 3000 to be
implemented. Figure E-4 shows how to make this correction on the layout.
FIGURE E-3:
ECN
FIGURE E-4:
HSDL 3000 OPTICAL TRANSCEIVER ECN - SCHEMATIC
VDD
HSDL 3000 OPTICAL TRANSCEIVER ECN - LAYOUT
ECN Blue wire
HSDL 3000 Pin 5 at C20
connection to VDD (via at
top of R18)
 2004 Microchip Technology Inc.
DS51487A-page 41
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
NOTES:
DS51487A-page 42
 2004 Microchip Technology Inc.
MCP2140 IrDA® STANDARD
WIRELESS TEMPERATURE SENSOR
DEMO BOARD USER’S GUIDE
Appendix F. Using AN888 Program with a Palm™ PDA
F.1
INTRODUCTION
Microchip also has some example Primary device programs that could be used to
demonstrate the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board.
These programs were not developed for this demo board and may not be straight-forward to display all modes of operation (such as the “Transmit Temperature” program).
These programs are discussed in the following application notes:
• For Palm OS - Application Note 888, “Programming the Palm OS® for Embedded
IR Applications” (DS00888)
• For Pocket PC OS - Application Note 926, “Programming the Pocket PC OS for
Embedded IR Applications” (DS00926)
• For Windows XP - Application Note 941, “Programming Windows® XP for
Embedded IR Applications” (DS00941)
 2004 Microchip Technology Inc.
DS51487A-page 43
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
F.1.1
Using the AN888 Program with a Palm PDA
It is recommended that you read Application Note 888 to better understand the
operation of the program.
After installing the .PRC file on your PDA, launch the program (MCP215xDemo) and
you will see the screen in Figure F-1.
FIGURE F-1:
MCP215XDEMO MAIN FORM
The following procedure describes how to operate the “Transmit 250 Byte Data String“
program on the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board.
DS51487A-page 44
 2004 Microchip Technology Inc.
F.1.1.1
OPERATING THE “TRANSMIT 250 BYTE DATA STRING” PROGRAM
1. Ensure 3 AAA batteries are properly inserted into the battery holder.
2. Connect JP1 and JP2 (closed position). The power LED (D5) will turn on. After a
few seconds, the PHACT LED (D4) will also turn on, indicating that the MCP2140
is in the Non-Discovery Mode (NDM) state.
3. Depress and release the RESET button.
4. Turn on the Palm (or equivalent) PDA.
5. With both devices on a flat surface, place the Palm PDA about 25 cm (10”) away
from the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board,
pointing the IR port of the Palm PDA (dark red window at the top of the PDA)
toward the two clear LEDs (D1, D6) on the MCP2140 IrDA Standard Wireless
Temperature Sensor Demo Board.
6. Open the MCP215xDemo program on the Palm PDA.
7. Tap the Connect button.
8. Tap the 123 button.
9. Tap any number (0-9). This is the command that will be received by the
MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board, instructing
the program to send a data string back to the Palm PDA. At this time, the DSR
(D2), CTS (D3) and PHACT (D4) LEDs are turned off.
10. Tap on the DONE button. The number selected in step 9 will be displayed on the
line “TX Data (ASCII) = x” (where x is the number). Notice that the line that shows
“Trace:” indicates 0 bytes.
11. To transmit this data byte, tap on the Send button. Notice that the value in the
trace buffer increases up to 250 bytes.
The DSR LED will turn on, the CTS LED will strobe until all the data has been
transmitted and the PHACT LED will turn off.
12. To see the received data, tap on the Show button. This shows the contents of the
trace buffer. The trace buffer window should display a string of data as shown in
Figure F-2.
FIGURE F-2:
MCP215XDEMO TRACE BUFFER WINDOW AFTER
RECEIVING 250 BYTE DATA STRING
32345678
4bcdefgh
52345678
6BEDEFGH
72345678
8bcdefgh
92345678
ABCDEFGH
B2345678
Cbcdefgh
D2345678
EBCDEFGH
F2345678
1bcdefgh
22345678
13. To close the trace buffer, tap the OK button.
14. Repeating steps 8 through 11 will cause the Palm PDA to transmit another data
string of 250 byte. Notice that the trace buffer counter increments by 250 each
time.
15. To clear the trace buffer, tap on the Clear button
16. To disconnect the IR link, tap the Disconnect button. The DSR and CTS LEDs
will immediately turn off and the PHACT LED will turn on in about 10 seconds.
 2004 Microchip Technology Inc.
DS51487A-page 45
MCP2140 IrDA® Standard Wireless Temp Sensor Demo Board
F.1.1.2
OPERATING THE “TRANSMIT TEMPERATURE” PROGRAM.
1. Ensure 3 AAA batteries are properly inserted into the battery holder.
2. Connect JP1 and JP2 (closed position). The power LED (D5) will turn on. After a
few seconds, the PHACT LED (D4) will also turn on, indicating that the MCP2140
is in the Non-Discovery Mode (NDM) state.
3. Depress the RESET and S2 buttons, then release the RESET button (keep the
S2 button depressed).
4. Release the S2 button.
5. Turn on the Palm (or equivalent) PDA.
6. With both devices on a flat surface, place the Palm PDA about 25 cm (10”) away
from the MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board,
pointing the IR port of the Palm PDA (dark red window at the top of the PDA)
toward the two clear LEDs (D1, D6) on the MCP2140 IrDA Standard Wireless
Temperature Sensor Demo Board.
7. Open the MCP215xDemo program on the Palm PDA.
8. Tap the Connect button.
9. Tap the 123 button.
10. Tap any number (0-9). This is the “command” that will be received by the
MCP2140 IrDA Standard Wireless Temperature Sensor Demo Board, instructing
the program to send a data string back to the Palm PDA. At this time, the DSR
(D2), CTS (D3) and PHACT (D4) LEDs are turned off.
11. Tap on the DONE button. The number selected in step 9 will be displayed on the
line “TX Data (ASCII) = “x” (where x is the number). Notice that the line that
shows “Trace:” indicates 0 bytes.
12. To transmit this data byte, tap on the Send button. Notice that the value in the
trace buffer increases by 11 bytes approximately once every second.
The DSR LED will turn on and the CTS LED will strobe until all the data has been
transmitted, and the PHACT LED will turn off.
13. To see the received data, tap on the Show button. This shows the contents of the
trace buffer. The trace buffer window should display a string of data as shown in
Figure F-3.
FIGURE F-3:
MCP215XDEMO TRACE BUFFER WINDOW AFTER RECEIVING
250 BYTE DATA STRING
Temp
Temp
Temp
Temp
=
=
=
=
24
24
25
24
14. To close the trace buffer, tap the OK button.
15. To clear the Trace Buffer, tap on the Clear button
16. To disconnect the IR link, tap the Disconnect button. The DSR and CTS LEDs
will immediately turn off and the PHACT LED will turn on in about 10 seconds.
Note:
DS51487A-page 46
Temperature value transmitted by the MCP2140 will be dependent on
battery voltage (see Section 2.3.2.2 ““Transmit Temperature” Program
Description”).
 2004 Microchip Technology Inc.
NOTES:
 2004 Microchip Technology Inc.
DS51487A-page 47
WORLDWIDE SALES AND SERVICE
AMERICAS
ASIA/PACIFIC
ASIA/PACIFIC
EUROPE
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
480-792-7627
Web Address:
www.microchip.com
Australia - Sydney
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
India - Bangalore
Tel: 91-80-2229-0061
Fax: 91-80-2229-0062
China - Beijing
Tel: 86-10-8528-2100
Fax: 86-10-8528-2104
India - New Delhi
Tel: 91-11-5160-8632
Fax: 91-11-5160-8632
Austria - Weis
Tel: 43-7242-2244-399
Fax: 43-7242-2244-393
Denmark - Ballerup
Tel: 45-4420-9895
Fax: 45-4420-9910
China - Chengdu
Tel: 86-28-8676-6200
Fax: 86-28-8676-6599
Japan - Kanagawa
Tel: 81-45-471- 6166
Fax: 81-45-471-6122
France - Massy
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
China - Fuzhou
Tel: 86-591-750-3506
Fax: 86-591-750-3521
Korea - Seoul
Tel: 82-2-554-7200
Fax: 82-2-558-5932 or
82-2-558-5934
Germany - Ismaning
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Atlanta
Alpharetta, GA
Tel: 770-640-0034
Fax: 770-640-0307
Boston
Westford, MA
Tel: 978-692-3848
Fax: 978-692-3821
Chicago
Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075
Dallas
Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Farmington Hills, MI
Tel: 248-538-2250
Fax: 248-538-2260
China - Hong Kong SAR
Tel: 852-2401-1200
Fax: 852-2401-3431
China - Shanghai
Tel: 86-21-6275-5700
Fax: 86-21-6275-5060
China - Shenzhen
Tel: 86-755-8290-1380
Fax: 86-755-8295-1393
China - Shunde
Tel: 86-757-2839-5507
Fax: 86-757-2839-5571
China - Qingdao
Tel: 86-532-502-7355
Fax: 86-532-502-7205
Singapore
Tel: 65-6334-8870
Fax: 65-6334-8850
Taiwan - Kaohsiung
Tel: 886-7-536-4816
Fax: 886-7-536-4817
Taiwan - Taipei
Tel: 886-2-2500-6610
Fax: 886-2-2508-0102
Italy - Milan
Tel: 39-0331-742611
Fax: 39-0331-466781
Netherlands - Drunen
Tel: 31-416-690399
Fax: 31-416-690340
England - Berkshire
Tel: 44-118-921-5869
Fax: 44-118-921-5820
Taiwan - Hsinchu
Tel: 886-3-572-9526
Fax: 886-3-572-6459
Kokomo
Kokomo, IN
Tel: 765-864-8360
Fax: 765-864-8387
Los Angeles
Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
San Jose
Mountain View, CA
Tel: 650-215-1444
Fax: 650-961-0286
Toronto
Mississauga, Ontario,
Canada
Tel: 905-673-0699
Fax: 905-673-6509
08/24/04
DS51487A-page 48
 2004 Microchip Technology Inc.