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 intended through suggestion only
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
No representation or warranty is given and no liability is
assumed by Microchip Technology Incorporated with respect
to the accuracy or use of such information, or infringement of
patents or other intellectual property rights arising from such
use or otherwise. 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 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, 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.
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.
Index ............................................................................................................................. 49
Worldwide Sales and Service .................................................................................... 52
2004 Microchip Technology Inc.DS51246A-page iii
Page 4
MCP2120/MCP2150 Developer’s Kit User’s Guide
NOTES:
DS51246A-page iv 2004 Microchip Technology Inc.
Page 5
MCP2120/MCP2150
DEVELOPER’S 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
on-line help. Select the Help menu, and then Topics to open a list of available on-line
help files.
IDE
INTRODUCTION
The MCP2120/MCP2150 Developer’s Kit demonstrates the capabilities of the
MCP2120 and MCP2150 infrared communication products. The MCP2120 and
MCP2150 Developer’s Board can be connected to either a PC via the DB9 connector,
or to another system (such as a PICDEM™ 2 board) via the four pin header.
The MCP2120/MCP2150 Developer’s Kit comes with the following:
1. Two MCP2120 Developer Boards.
2. One MCP2150 Developer Board.
3. Two serial cables.
4. One 9V power supply, with power cord.
5. One pair 18” (45 cm) power jumper cables.
6. Sample kit (one MCP2120 device and one MCP2150 device) – not shown.
Each kit comes with one MCP2120 device and one MCP2150 device. This
allows a prototype system to be developed that can be used with an MCP2120
Developer’s Board or an MCP2150 Developer’s Board.
7. MCP2120/MCP2150 Developer’s Kit User’s Guide (This document) – not shown.
If you are missing any part of the kit, please contact your nearest Microchip sales
office listed in the back of this publication for help.
2004 Microchip Technology Inc.DS51246A-page 1
Page 6
MCP2120/MCP2150 Developer’s Kit User’s Guide
FIGURE 1-1:MCP2120/MCP2150 DEVELOPER’S KIT
4
3
4
1
Items discussed in this chapter include:
• About This Guide
• Recommended Reading
• The Microchip Web Site
• Customer Support
3
5
2
1
2
DS51246A-page 2 2004 Microchip Technology Inc.
Page 7
ABOUT THIS GUIDE
Document Layout
This document describes the MCP2120/MCP2150 Developer’s Kit and tutorials, giving
the user a brief overview of Microchip’s MCP2120 and MCP2150 family of infrared
communication products. Detailed information on the individual device may be found in
the device’s respective data sheet. Detailed information on the PICDEM 2 development
board may be found in the PICDEM 2 User’s Guide (DS30374). The manual layout is
as follows:
• Chapter 1: Getting Started – This chapter gives an overview of the MCP2120
and MCP2150 Developer’s Boards, the hardware features of each Developer’s
Board, the system configurations that can be used to demonstrate the MCP2120
and MCP2150 devices, and the PC requirements.
• Chapter 2: MCP2120 Tutorial – This chapter provides a detailed description of
the steps to get the MCP2120 Developer’s board operating. These steps include
the configuration of the Developer’s boards and the Terminal Emulation program
(Hyperterminal) used on the PC.
• Chapter 3: MCP2150 Tutorial – This chapter provides a detailed description of
the steps to get the MCP2150 Developer’s board operating. These steps include
the configuration of the Developer’s boards, the Terminal Emulation program
(Hyperterminal) used on the PC and the installation and configuration of the PC
IrDA™ standard drivers.
• Chapter 4: Using PICDEM™ 1 or PICDEM 2 Board as Host – This chapter
discusses the use of the PICDEM boards as a demonstration platform as a Host
Controller for an MCP2120 Developer’s Board or an MCP2150 Developer’s
Board. This chapter makes reference to Application Notes which contain
demonstration code.
• Appendix A: Hardware Description – This appendix describes in detail the
hardware of the MCP2120 Developer’s board and MCP2150 Developer’s board.
This includes the component layout of each board (silkscreen) and the schematic
of each board.
Preface
2004 Microchip Technology Inc.DS51246A-page 3
Page 8
MCP2120/MCP2150 Developer’s Kit User’s Guide
Conventions Used in this Guide
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
DescriptionRepresentsExamples
Arial font:
Italic charactersReferenced 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 mutually exclusive
arguments; an OR selection
Represents code supplied by
user
®
IDE User’s Guide
“Save project before build”
‘b00100, ‘b10
any valid filename
0xFFFF, 0x007A
[options]
errorlevel {0|1}
var_name...]
void main (void)
{ ...
}
DS51246A-page 4 2004 Microchip Technology Inc.
Page 9
RECOMMENDED READING
The following Microchip documents are available and recommended as supplemental
reference resources.
MCP2120 Data Sheet (DS21618)
MCP2150 Data Sheet (DS21655)
MPASM™ User’s Guide with MPLINK™ Linker and MPLIB™ Library (DS33014)
PRO MATE
PICSTART
MPLAB
MPLAB
AN756, “Using the MCP2120 for Infrared Communication” (DS00756)
AN758, “Using the MCP2150 to Add IrDA
TB046, “Connecting the MCP2150 to the Psion Operating System” (DS91046)
TB047, “Connecting the MCP2150 to the Windows
TB048, “Connecting the MCP2150 to the Windows
TB049, “Connecting the MCP2150 to the Palm™ Operating System” (DS91049)
®
®
Plus User’s Guide (DS51028)
®
ICE User’s Guide (DS51159)
®
ICD User’s Guide (DS51184)
II User’s Guide (DS30082)
Preface
®
Standard Wireless Connectivity” (DS00758)
®
CE Operating System” (DS91047)
®
Operating System” (DS91048)
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, 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
2004 Microchip Technology Inc.DS51246A-page 5
Page 10
MCP2120/MCP2150 Developer’s Kit User’s Guide
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 International Locations
DS51246A-page 6 2004 Microchip Technology Inc.
Page 11
DEVELOPER’S KIT USER’S GUIDE
Chapter 1. Getting Started
1.1INTRODUCTION
This chapter covers an overview of the MCP2120 and MCP2150 Developer’s Boards
features, the system configurations that they can be used in and the system
requirements for the tutorials.
1.2HIGHLIGHTS
Items discussed in this chapter are:
• MCP2120 Developer’s Board Features
• MCP2150 Developer’s Board Features
• System Configurations
• PC Requirements
1.3DEVELOPER BOARD FEATURES
1.3.1MCP2120 Developer’s Board Features
MCP2120/MCP2150
The MCP2120 Developer’s Board, as shown in Figure 1-1, has the following hardware
features:
1. On-board +5V regulator for direct input from 9V, 750 mA AC/DC wall adapter or
9V battery.
2. Hooks for a +5V, 750 mA regulated DC supply.
3. DB-9 connector and associated hardware for direct connection to MCP2120
UART (DB-9 interface requires RS-232 signal levels).
5. Two jumpers to select source of UART signals. Either DB-9 connector or the
four-pin header.
6. Three jumpers to select desired baud rate.
7. Green power-on indicator LED.
8. Two IR Transceiver options (two jumpers select transceiver).
9. Jumper to disable MCP2120 device operation.
10. Hardware and Software Baud selection.
11. Jumper for Software Baud control when using RS-232C interface.
12. Socketed crystal.
Note:A schematic of the MCP2120 Developer’s Board is shown in Figure A.25
2004 Microchip Technology Inc.DS51246A-page 7
Page 12
MCP2120/MCP2150 Developer’s Kit User’s Guide
FIGURE 1-1:MCP2120 DEVELOPER’S BOARD HARDWARE
JP5
R14
DB9
C4
C7
C8
J4
J1
7
R1
Q1
U3
R2
C3
R9D3
Y1
JP3:JP1
000=F
C2
001=F
010=F
011=F
100=F
111=S/W Baud
Open=0
Header
D6 D2
JP4
R4
(MCP2120)
Open=Enabled
R8 R7 R6
OSC/768
OSC/384
OSC/192
OSC/128
OSC/64
RXTXMODE
RTS
J3
456
1
U5
J5
D4
3
C13
C9
C5
C1
J2
MCP2120 Developer’s Board
02-01608 Rev. 1
C15
C12
CR1
C14
U1
11
U2
C17
C6
R3
C10
R10
Component
Transceiver
J6
Integrated
Transceiver
R13
C16
GND
+5V
12
U4
R5
R11
J7
C11
R12
D1
D5
R15
C18
2
9
8
U6
10
DS51246A-page 8 2004 Microchip Technology Inc.
Page 13
Getting Started
1.3.2Selecting UART Source and Optical Transceiver Interface
Figure 1-2 shows two pairs of jumpers used to route signals to and from the MCP2120.
Jumpers J1 and J4 are used to determine the source of the signals used by the UART
interface. When the header has the pins closest to the “DB9” label jumpered to the
center pin, the DB9 is the source of the UART signal. When the header has the pins
closest to the “Header” label jumpered to the center pin, the four-pin header is the
source of the UART signal.
Jumpers J6 and J7 are used to determine the source and destination of the infrared
data signals used by the interface between the MCP2120 and Optical Transceiver.
When the header has the pins closest to the “Integrated Transceiver” label jumpered to
the center pin, the integrated transceiver is used. When the header has the pins closest
to the “Component Transceiver” label jumpered to the center pin, the component
transceiver logic is used.
FIGURE 1-2:MCP2120 SELECTING SOURCES
C11
R15
C18
U4
R5
R11
D1
D5
J7
R12
U6
U5
J5
C15
D4
C12
C13
C9
C5
C1
J2
MCP2120 Developer’s Board
02-01608 Rev. 1
CR1
C14
U1
JP5
R14
C4
C7
C8
J4
DB9
J1
R9
D3
D6 D2
U2
C17
C6
R3
Y1
R4
(MCP2120)
Open=Enabled
R8 R7R6
R1
Q1
U3
JP3:JP1
OSC/768
000=F
C2
R2
001=F
OSC/384
010=F
OSC/192
OSC/128
011=F
100=F
C3
OSC/64
111=S/W Baud
Open=0
RXTXMODE
Header
JP4
RTS
C10
R10
Component
Transceiver
J6
Integrated
Transceiver
R13
C16
J3
GND
+5V
These two jumpers select the
source of the Host signals.
J1 and J4
Header is source.
These two jumpers select the
optical transceiver logic. Both jumpers
should connect the same pin positions
J6 and J7
Component Transceiver
DB9 is source.
Integrated Transceiver
2004 Microchip Technology Inc.DS51246A-page 9
Page 14
MCP2120/MCP2150 Developer’s Kit User’s Guide
1.3.3Selecting Baud Rate
Figure 1-3 shows the three Baud Rate Select Jumpers (JP3:JP1) and the baud rate
formula that is specified (baud rate dependant on MCP2120 operational frequency).
Table 1-1 shows the baud rates for some crystal frequencies.
FIGURE 1-3:MCP2120 BAUD RATE
U2
C6
R3
C10
R5
R10
Component
Transceiver
J6
Integrated
Transceiver
R13
C16
GND
+5V
C11
U4
R11
D1
D5
J7
R12
U5
J5
D4
C13
C9
C5
C1
J2
MCP2120 Developer’s Board
02-01608 Rev. 1
C15
C12
CR1
C14
U1
JP5
R14
C4
C7
C8
J4
DB9
J1
R1
Q1
U3
R2
C3
These three jumpers select the baud rate:
JP3:JP2:JP1
JP3:JP2:JP1
R9
Y1
C2
Header
D3
JP4
R4
(MCP2120)
Open=Enabled
R8 R7R6
JP3:JP1
OSC/768
000=F
OSC/384
001=F
010=F
OSC/192
OSC/128
011=F
OSC/64
100=F
111=S/W Baud
Open=0
RXTXMODE
D6 D2
RTS
J3
C17
R15
C18
U6
FOSC/768
OSC/384
F
FOSC/192
FOSC/128
OSC/64
F
Software Baud Mode
TABLE 1-1:HARDWARE BAUD RATE SELECTION VS. FREQUENCY
FOSC Frequency (MHz)
BAUD2:BAUD0
000
001
010
011
100
0.6144
2.000 3.6864 4.9152 7.3728 14.7456
80026044800640096001920026042 FOSC / 768
16005208960012800192003840052083 FOSC / 384
320010417 1920025600 3840078600104167 FOSC / 192
480015625 2880038400 57600115200156250 FOSC / 128
960031250 5760078600 115200230400312500 FOSC / 64
(1)
Note 1:An external clock is recommended for frequencies below 2 MHz.
2:For frequencies above 7.5 MHz, the TXIR pulse width (MCP2120 Data Sheet,
Electrical Specification, parameter IR121) will be shorter than the minimum pulse
width of 1.6 ms in the IrDA standard specification.
(2)
20.000
(2)
Bit Rate
DS51246A-page 10 2004 Microchip Technology Inc.
Page 15
Getting Started
1.3.4UART Mode
Figure 1-4 shows the jumper which determines if the MCP2120 Developer’s Board is
to be used in Hardware Baud operation, or Software Baud operation. When in Software
Baud operation, an additional signal is required, Request To Send (RTS), which is used
to drive the RESET
FIGURE 1-4:MCP2120 UART
pin low to cause a change of baud rate to occur.
R9D3
U5
J5
C15
D4
C12
C13
C9
C5
C1
J2
MCP2120 Developer’s Board
02-01608 Rev. 1
CR1
C14
U1
JP5
R14
C4
C7
C8
J4
DB9
J1
R1
Y1
R4
(MCP2120)
Open=Enabled
R8 R7R6
Q1
U3
JP3:JP1
000=F
C2
R2
C3
OSC/768
001=F
OSC/384
010=F
OSC/192
011=F
OSC/128
OSC/64
100=F
111=S/W Baud
Open=0
RXTXMODE
Header
JP4
RTS
D6 D2
J3
U2
C17
C10
R10
Component
Transceiver
J6
Integrated
Transceiver
+5V
R13
C16
C11
R15
C6
R3
GND
C18
U4
R5
R11
D1
D5
J7
R12
U6
PC UART configuration for Hardware/Software Baud mode
Hardware Baud Selection
Software Baud Selection
2004 Microchip Technology Inc.DS51246A-page 11
Page 16
MCP2120/MCP2150 Developer’s Kit User’s Guide
1.3.5Disabling the MCP2120
Figure 1-5 shows the jumper, JP4, which will enable or disable the MCP2120 device.
When the MCP2120 is disabled, the device will consume less current.
FIGURE 1-5:MCP2120 ENABLE/DISABLE
U2
C6
R3
C10
U4
R5
R10
Component
Transceiver
J6
Integrated
Transceiver
R13
C16
GND
+5V
J7
R11
C11
R12
D1
D5
U5
J5
C15
D4
C12
C13
C9
C5
C1
J2
MCP2120 Developer’s Board
02-01608 Rev. 1
CR1
C14
U1
JP5
R14
C4
C7
C8
J4
DB9
J1
R9D3
Y1
R1
Q1
U3
JP3:JP1
000=F
C2
R2
001=F
010=F
011=F
100=F
C3
111=S/W Baud
Open=0
Header
D6 D2
JP4
R4
(MCP2120)
Open=Enabled
R8 R7R6
OSC/768
OSC/384
OSC/192
OSC/128
OSC/64
RXTXMODE
RTS
C17
J3
R15
C18
U6
MCP2120 Enable/Disable
Enabled
Disabled
In most cases, this jumper will be open. It may be closed to test system operation when
the MCP2120 is disabled. The Host Controller board may control the operation of the
MCP2120 by connecting a signal to the JP4 header as shown in Figure 1-6.
FIGURE 1-6:HOST CONTROLLER DISABLING THE MCP2120
MCP2120 Developer’s Board
MCP2120
EN
JP4
Host Controller
I/O Pin
(High or Hi Impedance = Enabled
Low = Disabled)
DS51246A-page 12 2004 Microchip Technology Inc.
Page 17
Getting Started
1.3.6MCP2150 Developer’s Board Features
The MCP2150 Developer’s Board, as shown in Figure 1-7, has the following hardware
features:
1. On-board +5V regulator for direct input from 9V, 750 mA AC/DC wall adapter or
9V battery.
2. Hooks for a +5V, 750 mA regulated DC supply.
3. DB-9 connector and associated hardware for direct connection to MCP2150
UART (DB-9 interface requires RS-232 signal levels).
5. Three jumpers to select source of UART signals. Either DB-9 connector or the
eight-pin header.
6. Two jumpers to select desired baud rate.
7. Green power-on indicator LED.
8. Green LED for Carrier Detect.
9. Two IR Transceiver options (two jumpers select transceiver).
10. Jumper to disable MCP2150 device operation.
11. Hardware Baud selection.
Note:A schematic of the MCP2150 Developer’s Board is shown in Figure A.26
FIGURE 1-7:MCP2150 BOARD HARDWARE
1
BT1
U5
J6
3
J5
C17
D4
CR1
C14
C15
C1C4
U1
C3
C10
MCP2150 Dev Board
02-01609 Rev. 1
C16
C2
CD
D7
C12
DB9
Y1
U2
J4
J3
J2
7
Power
C8
C7
R2
(MCP2150)
Open=Enabled
R4 R3
JP2 JP1
JP2 JP1 BAUD
0
0
0
1
1
0
1
1
TXRXRTS
CTS
Header
J1
D3
R7
JP3
9600
19200
57600
115200
DTR
DSRCDRI
10
C5
R8
C11
U4
R5
R6
Component
Transceiver
J8
J7
Integrated
Transceiver
R11C16
R13
GND
+5
+5V
R9
GND
D2
C13
R14
R10
D5
U6
C6
R1
C9
U3
D1
D6
9
8
456
2
11
2004 Microchip Technology Inc.DS51246A-page 13
Page 18
MCP2120/MCP2150 Developer’s Kit User’s Guide
1.3.7Selecting UART Source and Optical Transceiver Interface
Figure 1-8 shows two sets of jumpers used to route signals to and from the MCP2150.
Jumpers J2, J3 and J4 are used to determine the source of the signals used by the
UART interface. When the header has the pins closest to the “DB9” label jumpered to
the center pin, the DB9 is the source of the UART signal. When the header has the pins
closest to the “Header” label jumpered to the center pin, the four-pin header is the
source of the UART signal.
Jumpers J7 and J8 are used to determine the source and destination of the IrDA signals used by the interface between the MCP2150 and Optical Transceiver. When the
header has the pins closest to the “Integrated Transceiver” label jumpered to the center
pin, the integrated transceiver is used. When the header has the pins closest to the
“Component Transceiver” label jumpered to the center pin, the component transceiver
logic is used.
FIGURE 1-8:MCP2150 SELECTING SOURCES
BT1
U5
J6
J5
C17
D4
CR1
C14
C15
C1C4
C3
C10
MCP2150 Dev Board
02-01609 Rev. 1
C16
C2
U1
These three jumpers select the
source of the Host signals.
J2, J3 and J4
Header is source.
CD
D7
C12
DB9
R7
DSRCDRI
C5
U4
R5
R6
Component
Transceiver
J8
J7
Integrated
Transceiver
R11C16
R13
GND
+5
+5V
R8
R9
C11
Power
C8
D3
C7
Y1
U2
JP2 JP1 BAUD
J4
J3
J2
TXRXRTS
Header
J1
JP3
R2
(MCP2150)
Open=Enabled
R4 R3
JP2 JP1
0
0
9600
0
1
19200
1
0
57600
1
1
115200
CTS
DTR
D2
GND
C13
R14
R10
D5
U6
C6
R1
C9
U3
D1
D6
These two jumpers select the
optical transceiver logic. Both jumpers
should connect the same pin positions
J7 and J8
Component Transceiver
DB9 is source.
Integrated Transceiver
DS51246A-page 14 2004 Microchip Technology Inc.
Page 19
Getting Started
1.3.8Selecting Baud Rate
Figure 1-9 shows the two Baud Rate Select jumpers (JP2:JP1) and the baud rate.
Table 1-2 shows the baud rates for some crystal frequencies.
FIGURE 1-9:MCP2150 BAUD RATE
BT1
U5
C17
D4
J6
J5
MCP2150 Dev Board
02-01609 Rev. 1
C14
C1C4
C3
C10
C15
CR1
U1
C16
C2
C12
CD
D7
DB9
Y1
U2
J4
J3
J2
Header
J1
These three jumpers select the Baud Rate
JP2:JP1
JP2:JP1
9600
Power
C8
D3
C7
JP3
R2
(MCP2150)
Open=Enabled
R4 R3
JP2 JP1
JP2 JP1 BAUD
0
0
9600
0
1
19200
1
0
57600
1
1
115200
TXRXRTS
CTS
DTR
57600
R7
DSRCDRI
C5
U4
R5
R6
Component
Transceiver
J8
J7
Integrated
Transceiver
R11C16
R13
GND
+5
+5V
R8
R9
C11
GND
D2
C13
R14
R10
D5
U6
C6
R1
C9
U3
D1
D6
19200
115200
TABLE 1-2:SERIAL BAUD RATE SELECTION VS. FREQUENCY
BAUD1:BAUD0Baud Rate @ 11.0592 MHzBit Rate
009600F
0119200F
1057600F
11115200F
OSC / 1152
OSC / 576
OSC / 192
OSC / 96
2004 Microchip Technology Inc.DS51246A-page 15
Page 20
MCP2120/MCP2150 Developer’s Kit User’s Guide
1.3.9Disabling the MCP2150
Figure 1-10 shows the jumper (JP3) which will enable or disable the MCP2150 device.
When the MCP2150 is disabled, the device will consume less current.
FIGURE 1-10:MCP2150 ENABLE/DISABLE
BT1
U5
J6
J5
C17
D4
CR1
C14
C15
C1C4
C3
C10
MCP2150 Dev Board
02-01609 Rev. 1
C16
C2
U1
MCP2150 Enable/Disable
Enabled
Disabled
CD
D7
DB9
C12
J4
J3
J2
U2
Y1
Header
J1
Power
C8
D3
C7
JP3
R2
(MCP2150)
Open=Enabled
R4 R3
JP2 JP1
JP2 JP1 BAUD
0
0
9600
0
1
19200
1
0
57600
1
1
115200
TXRXRTS
CTS
DTR
R7
DSRCDRI
C5
U4
R5
R6
Component
Transceiver
J8
J7
Integrated
Transceiver
R11C16
R13
GND
+5
+5V
R8
R9
C11
GND
D2
C13
R14
R10
D5
U6
C6
R1
C9
U3
D1
D6
In most cases, this jumper will be open. It may be closed to test system operation
when the MCP2150 is disabled. The Host Controller board may control the operation
of the MCP2150 by connecting a signal to the JP3 header as shown in Figure 1-11.
FIGURE 1-11:HOST CONTROLLER DISABLING THE MCP2150
MCP2150 Developer’s Board
MCP2150
EN
JP4
Host Controller
I/O Pin
(High or Hi Impedance = Enabled
Low = Disabled)
DS51246A-page 16 2004 Microchip Technology Inc.
Page 21
1.4SYSTEM CONFIGURATIONS
There are five configurations that one would use for initial evaluation of these two
Developer’s Boards. These configurations are:
TABLE 1-3:CONFIGURATIONS FOR EVALUATION OF DEVELOPER’S
BOARDS
Developer’s Board #1Developer’s Board #2
MCP2120 Dev Board (ASCII)
MCP2120 Dev Board (IR Driver)
MCP2150 Dev Board (ASCII)
MCP2120 Dev Board (IR Driver)
MCP2150 Dev Board (ASCII)
The Host controller for each board can be either a Personal Computer (PC) or another
system connected to the Host header. The PC operating system (OS) may be any
desired OS that has a terminal emulation program which can connect to the serial port
and can treat the IR port as a virtual serial port. For our tutorial, we will use the Windows
9x OS.
Note 1:Windows NT® 4.x (and lower) does not support the IrDA standard
functionality. Third Party programs exist, but are not supported or
recommended by Microsoft, so are also not recommended by Microchip.
2:Windows 2000 does support the IrDA standard, but does not treat the IR
port as a virtual serial port. This means that you cannot access the IR port
as a serial port. This causes issues with some terminal emulation programs, such as Hyperterminal. Windows 2000 considers the IrDA port to
be a network device. Applications that can access a network service
through a network protocol (i.e., TCP/IP) can use the MCP2120
Developer’s Board using the appropriate Windows 2000 driver.
Getting Started
MCP2120 Dev Board (ASCII)
↔
MCP2120 Dev Board (IR Driver)
→
MCP2120 Dev Board (IR Driver)
↔
IrDA standard port (Palm Pilot, cell phone, ...)
→
IrDA standard port (Palm Pilot, cell phone, ...)
→
1.4.1Configuration 1
Developer’s Board #1Developer’s Board #2
MCP2120 Dev Board (ASCII)
This is the typical mode that will be used for the two MCP2120 Developer’s Board. In
this configuration, the MCP2120 board receives data as a single ASCII byte. This byte
is then translated to the IR data format, and transmitted out of the selected optical
transceiver logic.
The host interface can be from either the DB-9 (PC or other UART) or the Header.
A PC running a terminal emulation program, such as Hyperterminal, connected to the
serial port will create this ASCII data stream. The PC can then be connected to the
Developer’s Board DB-9 connector.
MCP2120 Dev Board (ASCII)
↔
2004 Microchip Technology Inc.DS51246A-page 17
Page 22
MCP2120/MCP2150 Developer’s Kit User’s Guide
1.4.2Configuration 2
Developer’s Board #1Developer’s Board #2
MCP2120 Dev Board (IR Driver)
This is used to view the effects of the IrDA standard stack protocol on the data stream.
This can be used to better understand the construction of the IrDA standard data
packet, or as a diagnostic tool.
The host interface can be from either the DB-9 (PC or other UART) or the Header.
A PC running a terminal emulation program, such as Hyperterminal, connected to the
IR port as a virtual serial port will create this ASCII data stream. The PC can then be
connected to the MCP2120 Developer’s Board DB-9 connector.
1.4.3Configuration 3
Developer’s Board #1Developer’s Board #2
MCP2150 Dev Board (ASCII)
This is the configuration when using one MCP2120 Developer’s Board and one
MCP2150 Developer’s Board.
The MCP2150 Developer’s Board can have the host interface be from either the DB-9
(PC or other UART) or the Header.
The MCP2120 Developer’s Board would interface to a PC running a terminal emulation
program, such as Hyperterminal, that connects the IR port to a virtual serial port.
MCP2120 Dev Board (IR Driver)
→
MCP2120 Dev Board (IR Driver)
↔
1.4.4Configuration 4
Developer’s Board #1Developer’s Board #2
MCP2120 Dev Board (IR Driver)
IrDA standard port (Palm Pilot, cell phone, ...)
→
This configuration is used to evaluate the MCP2120 for an IrDA system, where the Host
Controller is responsible for the IrDA protocol stack.
The MCP2120 Developer’s Board interfaces to a PC running a terminal emulation
program, such as Hyperterminal, that connects the IR port to a virtual serial port.
1.4.5Configuration 5
Developer’s Board #1Developer’s Board #2
MCP2150 Dev Board (ASCII)
This configuration is used to evaluate the MCP2150 for adding the IrDA feature to a
system. The Host controller only needs to send and receive the required ASCII data,
while the MCP2150 handles the IrDA standard protocol stack.
The MCP2150 Developer’s Board can have the host interface be from either the DB-9
(PC or other UART) or the Header.
IrDA standard port (Palm Pilot, cell phone, ...)
→
DS51246A-page 18 2004 Microchip Technology Inc.
Page 23
1.5PC REQUIREMENTS
The PC used has three main requirements. These are:
1. Standard Serial Port.
2. Terminal Emulation Program.
3. IrDA standard driver installed, which treats the IR port as a virtual serial port.
A non-legacy-free Intel compatible model with Windows 9x/2000 Operating System
(OS) would meet these requirements. The Windows OS includes a Terminal Emulation
program called Hyperterminal. Section 2.5 shows instructions to configure
Hyperterminal and demonstrate the Developer’s Boards.
Note 1:Windows 2000 does support the IrDA standard, but does not treat the IR
Getting Started
port as a virtual serial port. This means that you cannot access the IR port
as a serial port. This causes issues with some terminal emulation programs, such as Hyperterminal. Windows 2000 considers the IrDA port to
be a network device. Applications that can access a network service
through a network protocol (i.e., TCP/IP) can use the MCP2120
Developer’s Board using the appropriate Windows 2000 driver.
2004 Microchip Technology Inc.DS51246A-page 19
Page 24
MCP2120/MCP2150 Developer’s Kit User’s Guide
NOTES:
DS51246A-page 20 2004 Microchip Technology Inc.
Page 25
DEVELOPER’S KIT USER’S GUIDE
Chapter 2. MCP2120 Tutorial
2.1INTRODUCTION
This chapter covers a tutorial for using the MCP2120 Developer’s Board.
2.2HIGHLIGHTS
Topics covered in this chapter
• MCP2120 Tutorial Setup
• Hardware Setup
• Setting Up the Terminal Program
• Transmitting/Receiving Data
2.3MCP2120 TUTORIAL SETUP
This tutorial will use both MCP2120 Developer’s Boards. The system will operate at
9600 Baud. Each board will be connected via the UART to the serial port of a personal
computer (PC). This means that either two PCs are required, or a PC with two serial
ports, as shown in Figure 2-1. It is assumed that two PCs will be used, and that each
PC will have the Terminal Emulation program configured identically.
MCP2120/MCP2150
FIGURE 2-1:SYSTEM BLOCK DIAGRAM
MCP2120 Developer’s
PC
5U
J5
C15
D4
C12C13
C9
C5
C1
J2
MCP2120 Developer’s Board02-01608 Rev. 1
Board 1
R9D3
1Y
CR1
C4
(MCP2120)
C7
Open=Enabled
C8
R8R7R6
C14
R1
JP5
Q1
U3
JP3:JP1000=Fosc/768
R14
C2
R2
001=Fosc/384010=Fosc/192011=Fosc/128100=Fosc/64
C3
111=S/W BaudOpen=0
r
U1
e
9
d
B
J4
RXTXM
a
D
eH
J1
D6D2
U2
71C
C10
JP4
R4
R10
ComponentTransceiverJ6
IntegratedTransceiver
R13
C16
ED
S
O
TR
J3
+5V
MCP2120 Developer’s
R15C11C18
C6
R3
U4R5
R11
D1D5
J7
R12
U6
GND
R15C11C18
R11
Component
D1
Transceiver
D5
R12
U6
Integrated
Transceiver
GND
Board 2
C
D6D2
U2
17
C6
R3
C10
U4
JP4
R5
R10
(MCP2120)
Open=Enabled
J7
J6
JP3:JP1000=Fosc/768001=Fosc/384010=Fosc/192
R13
011=Fosc/128
100=Fosc/64
111=S/W Baud
C16
Open=0
R
T
S
J3
+5V
R4
R8R7R6
MODE
R9D3
Y1
U3
C2
R2
C3
H
R
e
XTX
ader
CR1
C4
C7
C8
C14
R1
JP5
Q1
R14
U1
DB
J4
9
MCP2120 Developer’s Board
J1
C15
C12
C13
C9
C5
C1
02-01608 Rev.1
U5
J5
D4
J2
PC
2004 Microchip Technology Inc.DS51246A-page 21
Page 26
MCP2120/MCP2150 Developer’s Kit User’s Guide
2.4HARDWARE SETUP
2.4.1Oscillator
The crystal oscillator has pin receptacles to allow the changing of the MCP2120
oscillator frequency. For the tutorial, we will be using a crystal frequency of
7.3728 MHz. This crystal frequency is shipped in the kit.
2.4.2Board Jumpers
The MCP2120 and MCP2150 Developer’s Boards may use one of two host interfaces,
the DB-9 interface to connect to a PC, or the header to connect to a controller board.
For the tutorial, the host signal will come from the DB-9 connector and the infrared data
signals will interface to the Integrated Optical Transceiver. Figure 2-2 shows how the
two 3-pin jumpers need to be connected for this configuration.
These two jumpers select the
source of the Host signals.
J1 and J4
These two jumpers select the
optical transceiver logic. Both jumpers
should connect the same pin positions
J6 and J7
DB9 is source.
Integrated Transceiver
DS51246A-page 22 2004 Microchip Technology Inc.
Page 27
MCP2120 Tutorial
Figure 2-3 shows the three Baud Rate Select jumpers (JP3:JP1) and the baud rate
formula that is specified (baud rate dependant on MCP2120 operational frequency).
The tutorial requires these jumpers to be open for a baud rate of 9600, when the
crystal frequency is 7.3728 MHz.
FIGURE 2-3:MCP2120 BAUD RATE
C11
R15
C18
U4
R5
R11
D1
D5
J7
R12
U6
U5
J5
C15
D4
C12
C13
C9
C5
C1
J2
MCP2120 Developer’s Board
02-01608 Rev. 1
CR1
C14
U1
JP5
R14
C4
C7
C8
J4
DB9
J1
R9D3
Y1
R1
Q1
U3
JP3:JP1
000=F
C2
R2
001=F
010=F
011=F
100=F
C3
111=S/W Baud
Open=0
Header
D6 D2
JP4
R4
(MCP2120)
Open=Enabled
R8 R7R6
OSC/768
OSC/384
OSC/192
OSC/128
OSC/64
RXTXMODE
RTS
J3
U2
C17
C10
R10
Component
Transceiver
J6
Integrated
Transceiver
+5V
C6
R3
R13
C16
GND
These three jumpers select the Baud Rate
JP3:JP2:JP1
FOSC/768
2004 Microchip Technology Inc.DS51246A-page 23
Page 28
MCP2120/MCP2150 Developer’s Kit User’s Guide
Figure 2-4 shows jumpers JP4 and JP5 and their state. For the tutorial, both of these
jumpers are required to be open.
FIGURE 2-4:MCP2120 UART MODE AND ENABLE MODE
U2
C6
R3
C10
U4
R5
R10
Component
Transceiver
J6
Integrated
Transceiver
R13
C16
GND
+5V
J7
R11
C11
R12
D1
D5
U5
J5
C15
D4
C12
C13
C9
C5
C1
J2
MCP2120 Developer’s Board
02-01608 Rev. 1
CR1
C14
U1
JP5
R14
C4
C7
C8
J4
DB9
J1
R9
D3
D6 D2
C17
Y1
R1
Q1
U3
C2
R2
C3
Header
JP4
R4
(MCP2120)
Open=Enabled
R8 R7R6
JP3:JP1
000=F
OSC/768
OSC/384
001=F
010=F
OSC/192
OSC/128
011=F
OSC/64
100=F
111=S/W Baud
Open=0
RXTXMODE
RTS
J3
R15
C18
U6
PC UART configuration for
Hardware/Software Baud mode
Hardware Baud Selection
MCP2120 Enable/Disable
Enabled
DS51246A-page 24 2004 Microchip Technology Inc.
Page 29
2.5SETTING UP THE TERMINAL PROGRAM
Windows 95 Operating System (OS) comes with a Terminal Emulation program called
Hyperterminal. This tutorial uses this program to demonstrate the operation of the
MPLAB C30 Developer’s Kit boards.
To open Hyperterminal, select Start > Programs > Accessories
terminal folder. Then double click the program file Hypertrm.exe. to start Hyperterminal.
Figure 2-5 shows the initial screen once the Hyperterminal program is open. You will
then need to select a name for this configuration.
MCP2120 Tutorial
and select the Hyper-
FIGURE 2-5:HYPERTERMINAL
For the initial test, we will set up the system to operate at 9600 baud. Type the name
as shown in Figure 2-6 and select any icon. Click OK.
FIGURE 2-6:CHOOSING NAME AND ICON
®
OPENING SCREEN
2004 Microchip Technology Inc.DS51246A-page 25
Page 30
MCP2120/MCP2150 Developer’s Kit User’s Guide
The menu in Figure 2-7 appears. You will need to select the port your serial port is on
(Connect using). In our case, we are using COM1. Click OK.
FIGURE 2-7:SELECTING COMMUNICATIONS (COM) PORT
The Default settings for COM1 are displayed in Figure 2-8.
FIGURE 2-8:HYPERTERMINAL
®
DEFAULT COM PORT SETTINGS
DS51246A-page 26 2004 Microchip Technology Inc.
Page 31
MCP2120 Tutorial
The COM port settings need to be modified so the Bits per second is “9600” and the
Flow Control is “None”, as shown in Figure 2-9. Click OK when done.
®
FIGURE 2-9:DESIRED HYPERTERMINAL
COM PORT SETTINGS
The terminal window opens connected to the serial port as shown in Figure 2-10.
®
FIGURE 2-10:HYPERTERMINAL
SCREEN AFTER INITIAL SETUP
2004 Microchip Technology Inc.DS51246A-page 27
Page 32
MCP2120/MCP2150 Developer’s Kit User’s Guide
When the characteristics of the Hyperterminal session need to be modified, the
program should be disconnected from the port. To disconnect, click on the icon with the
handset with the down arrow onto the phone base as shown in Figure 2-11.
FIGURE 2-11:DISCONNECTING HYPERTERMINAL
To modify the properties of this Hyperterminal session, select File > Properties as
shown in Figure 2-12.
FIGURE 2-12:SELECTING HYPERTERMINAL
®
®
PROPERTIES MENU
DS51246A-page 28 2004 Microchip Technology Inc.
Page 33
MCP2120 Tutorial
The Hyperterminal Properties window will appear as shown in Figure 2-13. Clicking the
“Configure...” button will open the COM Properties window shown in Figure 2-14.
®
FIGURE 2-13:HYPERTERMINAL
PROPERTIES MENU (CONNECT TO)
Verify the settings are as desired. If not, change the settings to match the settings in
Figure 2-14. Click the OK button and you will return to the window shown in
Figure 2-13.
FIGURE 2-14:CONFIGURE CONNECTION MENU
2004 Microchip Technology Inc.DS51246A-page 29
Page 34
MCP2120/MCP2150 Developer’s Kit User’s Guide
Click on the Settings tab. Figure 2-15 shows the default settings. The “Backscroll
buffer lines” setting can be modified to 0, if desired. This will make viewing information
in the Hyperterminal window more convenient.
FIGURE 2-15:HYPERTERMINAL
®
PROPERTIES MENU (SETTINGS)
Clicking on the “Input Translation...” button will bring up the following window. Click
Cancel to close this window.
FIGURE 2-16:INPUT TRANSLATION MENU
DS51246A-page 30 2004 Microchip Technology Inc.
Page 35
MCP2120 Tutorial
Clicking on the “ASCII Setup...” button will bring up the ASCII Setup window. Make the
changes as shown in Figure 2-17 by checking the “Echo typed characters locally”
setting. Click OK to apply these changes and close the window.
FIGURE 2-17:ASCII SETUP MENU
2.6TRANSMITTING/RECEIVING DATA
Now both PCs should have their Hyperterminal program running in the connected
mode with the same COM port settings. See Figure 2-9.
Each MCP2120 Developer’s Board should be powered. Use the pair of 18″ (45 cm)
power jumper cables to power MCP2120 Developer’s Board #2 from MCP2120
Developer’s Board #1. Optionally, MCP2120 Developer’s Board #2 could be powered
from a 9V battery. When the MCP2120 Developer’s Board is powered, the green LED
(labeled D3) will be on.
Each MCP2120 Developer’s Board should be connected to their respective PC serial
port, so that Hyperterminal can communicate to the board.
The MCP2120 Developer’s Board should be oriented so that the integrated optical
transceivers are aligned with each other (as shown in Figure 2-18). For the initial
communication between the two boards, the MCP2120 Developer’s Boards should be
approximately 6” (15 cm) apart.
Type a string of characters in the Hyperterminal window on PC #1. This same character
sting should appear in the Hyperterminal window of PC #2. Typing a string of characters in the Hyperterminal window on PC #2 should have the same character string
appear in the Hyperterminal window of PC #1. Congratulations! You may now start
modifying the system to evaluate/test the operation of the MCP2120 and MCP2120
Developer’s Board.
2004 Microchip Technology Inc.DS51246A-page 31
Page 36
MCP2120/MCP2150 Developer’s Kit User’s Guide
FIGURE 2-18:MCP2120 TUTORIAL SYSTEM
To IrDA™ Standard Developer’s Kit Power Supply (9V)
If you are not getting communications between the two boards, some debugging is in
order. Here are some suggested steps:
• Verify that the Hyperterminal programs are set up correctly
• Verify that both Hyperterminal sessions are “connected”
• Verify that the MCP2120 Developer’s Boards are powered
• Verify that the MCP2120 Developer’s Boards are set up correctly
If that review does not locate the issue, then more in depth debugging is required.
These steps require an oscilloscope. A digital 4-channel oscilloscope is recommended.
By typing a data byte into Hyperterminal on the PC, the oscilloscope can be used to
determine where in the system the data byte was “lost”.
Figure 2-19 and Figure 2-20 shows a debug flow to help troubleshoot the communications between the two MCP2120 Developer’s Boards. Figure 2-19 shows the steps for
the transmit side of System #1 (PC #1 and MCP2120 Developer’s Board #1). If it
appears that the TXIR signal is correct, then the receive side needs to be validated.
Figure 2-20 shows the steps for the receive side of System #2 (PC #2 and MCP2120
Developer’s Board #2).
These steps can then be used to debug the transmit side of System #2 and the receive
side of System #1.
Problem with MCP2120
Verify device has power/ground
Ensure jumper JP4 is open
Ensure crystal oscillator is correct
frequency and operating
Ensure Baud Rate is correct
(jumpers JP1, JP2 and JP3)
Try replacing with new MCP2120
®
Data
appear on
MCP2120
TX pin?
Yes
Data
appear on
MCP2120
TXIR pin?
Yes
Goto
window
No
Data
appear on
MAX232
R1IN pin?
Yes
Data
appear on
MAX232
R1OUT
pin?
Yes
No
Verify that the connection from
PC #1 to Board #1 is good.
Try communication with
another serial device
(such as PICSTART
Verify that the connection for
Board #1 TXIR to Optical
Transceiver and Board #2
Optical Transceiver to RXIR
(3 pin headers J6 and J7).
Ensure that the Optical
Transceivers are aligned.
Ensure that distance between
Board #1 and Board #2 is
approximately 6” (15 cm).
Try component transceiver
option on each board
(Board #1, then Board #2,
and lastly both boards)
Problem with MCP2120
Verify device has power/ground
Ensure jumper JP4 is open
Ensure crystal oscillator is correct
frequency and operating
Ensure Baud Rate is correct
(jumpers JP1, JP2 and JP3)
Try replacing with new MCP2120
Data
appear on
MAX232
T1IN
pin?
Yes
Data
appear on
MAX232
T1OUT
pin?
Yes
Verify that the connection from
PC #1 to Board #1 is good.
Try communication with
another serial device
(such as PICSTART
®
No
No
Plus).
Verify 3 pin header J4
is jumpered correctly
Disconnect serial cable
to ensure T1OUT is
not loaded down. If
still no data, it appears
that the MAX232 device
is damaged
DS51246A-page 34 2004 Microchip Technology Inc.
Page 39
Chapter 3. MCP2150 Tutorial
3.1INTRODUCTION
This chapter covers a tutorial for using the MCP2150 Developer’s Board.
3.2HIGHLIGHTS
Topics covered in this chapter
• MCP2150 Tutorial
3.3MCP2150 TUTORIAL
This tutorial was not available for this revision of the MPLAB C30 Developer’s Kit
User’s Guide. Please check in the Development Tools section of the Microchip web
site (www.microchip.com) for revision B of the User’s Guide. Revision B is planned
to include the tutorial on using the MCP2150 Developer’s Board with an MCP2120
Developer’s Board.
Information on Microchip Development Tools can be located on the web site by using
the Navigate window and selecting Developer’s Tool Box > Development Tools.
MCP2120/MCP2150
DEVELOPER’S KIT USER’S GUIDE
2004 Microchip Technology Inc.DS51246A-page 35
Page 40
MCP2120/MCP2150 Developer’s Kit User’s Guide
NOTES:
DS51246A-page 36 2004 Microchip Technology Inc.
Page 41
MCP2120/MCP2150
DEVELOPER’S KIT USER’S GUIDE
Chapter 4. Using a PICDEM™ 1 or PICDEM 2 Board as Host
4.1USING THE PICDEM 1 BOARD
The PICDEM 1 board may be used as the host controller in an IrDA standard
compatible system. PortB can be used to display received characters, while any of
the other ports would be used for the UART and control signals. A PICmicro
microcontroller may be selected that has a hardware UART, or the UART functionality
may be implemented in software.
Figure 4-1 shows the parts layout (silk-screen) for the PICDEM 1 board.
Note 1:U1 is for use with any 40-pin PIC17C4X device.
2:U2 is for use with any 18-pin PIC16C5X, PIC16CXXX device.
3:U3 is for use with any 28-pin PIC16C5X, PIC16CXXX device.
DIRECT
+5V PWR
SUPPLY
GND
+5V
GND
+5V
2004 Microchip Technology Inc.DS51246A-page 37
Page 42
MCP2120/MCP2150 Developer’s Kit User’s Guide
4.2APPLICATION NOTES
There are two Application Notes that show how to use the PICDEM 1 Board as a Host
controller.
AN756, “Using the MCP2120 for Infrared Communication”, DS00756, uses the
MCP2120 Developer’s Board and has two code examples. The first is using a
PIC16F84 with the MCP2120 Developer’s Board in Hardware Baud mode. In this
mode, only two signals need to be interfaced. The RX and TX signal. The second code
example is also using a PIC16F84 with the MCP2120 Developer’s Board in Software
Baud mode. In this mode, four signals need to be interfaced; RX, TX, MODE and RTS
(used to reset the MCP2120).
AN758, “Using the MCP2150 to Add IrDA™ Standard Wireless Connectivity”,
DS00758, uses the MCP2150 Developer’s Board and has one code example. For this
application, seven signals need to be interfaced; RX, TX, DSR, DTR, CTS, RTS and
CD.
4.2.1For Additional PICDEM 1 Information
Additional information can located on the Microchip web site (www.microchip.com).
Information on Microchip Development Tools can be located by using the Navigate
window and selecting Developer’s Tool Box > Development Tools.
The PICDEM 1 User’s Guide literature number is DS33015, and the PICDEM 1 kit can
be ordered with part number DM163001.
4.3USING THE PICDEM 2 BOARD
The PICDEM 2 board may be used as the host controller in an IrDA standard compatible system. PortB can be used to display received characters, while any of the other
ports would be used for the UART and control signals. A PICmicro microcontroller may
be selected that has a hardware UART, or the UART functionality may be implemented
in software.
Figure 4-2 shows the parts layout (silk-screen) for the PICDEM 2 board.
Note 1:U2 is for use with any 28-pin PIC16CXXX or PIC18CXXX device.
2:U1 is for use with any 40-pin PIC16CXXX or PIC18CXXX device.
4.3.1Application Notes
Currently there are no Application Notes that use the PICDEM 2 Board as a Host
controller. The examples shown for the PICDEM 1 board can be easily modified to have
the PICDEM 2 board operate as the Host controller.
4.3.2For Additional PICDEM 2 Information
Additional information can located on the Microchip web site (www.microchip.com).
Information on Microchip Development Tools can be located by using the Navigate
window and selecting Developer’s Tool Box > Development Tools.
The PICDEM 2 User’s Guide literature number is DS30374, and the PICDEM 2 kit can
be ordered with part number DM163002.
2004 Microchip Technology Inc.DS51246A-page 39
Page 44
MCP2120/MCP2150 Developer’s Kit User’s Guide
NOTES:
DS51246A-page 40 2004 Microchip Technology Inc.
Page 45
Appendix A. Hardware Detail
A.1INTRODUCTION
The MPLAB C30 Developer’s Board hardware is intended to illustrate the ease of use
of Microchip’s infrared data communication solutions. The Developer’s Board features
the following hardware elements.
A.2POWER SUPPLY
There are three ways to supply power to the MPLAB C30 Developer’s Board:
• A 9V battery can be plugged into BT1.
• A 9V, 750 mA unregulated AC or DC supply can be plugged into J5.
• A +5V, 750 mA regulated DC supply can be connected to the two pins provided,
labled +5V and GND. A pair of 18″ (45 cm) cables are provided to allow one board
to power another.
A.3POWER INDICATOR
MCP2120/MCP2150
DEVELOPER’S KIT USER’S GUIDE
One green LED indicates whether there is power applied to the MCP2120 and
MCP2150 Developer Boards (LED lit) or not (LED off).
A.4RS-232 SERIAL PORT
A.4.1MCP2120 Developer’s Board
A MAX232 compatible level shifting IC has been provided with all necessary hardware
to support connection of an RS-232 host through the DB-9 connector. The port can be
connected to a PC using a straight through cable. Refer to the MCP2120 Data Sheet
(DS21618) for more information.
A.4.2MCP2150 Developer’s Board
A MAX3238E compatible level shifting IC has been provided with all necessary
hardware to support connection of a RS-232 host through the DB-9 connector. The port
can be connected to a PC using a straight through cable. Refer to the MCP2120 Data Sheet for more information.
2004 Microchip Technology Inc.DS51246A-page 41
Page 46
MCP2120/MCP2150 Developer’s Kit User’s Guide
A.5JUMPERS
Jumpers are used to allow the Developer’s Board to be configured into the different
modes that are possible. These modes include:
• Selection of baud rate
• Source of host signals
• Source of optical transceiver signals
• Device enable signal for power down operation
A.5.1MCP2120 Developer’s Board
The MCP2120 Developer’s Board has the following jumpers:
1. Two jumpers to select source of UART signals. Either RS-232C socket or the
four-pin header.
2. Three jumpers to select desired baud rate.
3. Two jumpers to select IR Transceiver options.
4. Jumper to disable device operation.
5. Jumper for Software Baud control when using RS-232C interface.
FIGURE A-1:MCP2120 DEVELOPER’S BOARD HARDWARE
4
C11
R9D3
U5
J5
D4
C13
C9
C5
C1
J2
MCP2120 Developer’s Board
02-01608 Rev. 1
5
1
C15
C12
CR1
C14
U1
JP5
R14
C4
C7
C8
J4
DB9
J1
R1
Y1
Q1
U3
JP3:JP1
000=F
C2
R2
001=F
010=F
011=F
100=F
C3
111=S/W Baud
Open=0
Header
D6 D2
JP4
R4
(MCP2120)
Open=Enabled
R8 R7R6
OSC/768
OSC/384
OSC/192
OSC/128
OSC/64
RXTXMODE
RTS
J3
U2
C17
C10
R10
Component
Transceiver
J6
Integrated
Transceiver
R13
C16
+5V
2
C6
R3
GND
R15
C18
U4
R5
R11
D1
D5
J7
R12
3
U6
DS51246A-page 42 2004 Microchip Technology Inc.
Page 47
Hardware Detail
A.5.2MCP2150 Developer’s Board
The MCP2150 Developer’s Board has the following jumpers:
1. Three jumpers to select source of UART signals. Either RS-232C socket or the
eight-pin header.
2. Two jumpers to select desired baud rate.
3. Two jumpers to select IR Transceiver options.
4. Jumper to disable device operation.
FIGURE A-2:MCP2150 DEVELOPER’S BOARD HARDWARE
4
U5
J6
J5
MCP2150
02-01609 Rev. 1
BT1
C17
D4
C14
C15
C1C4
C3
C10
Dev Board
1
CR1
U1
C16
C2
CD
D7
DB9
C12
R7
)
DSRCDRI
C5
U4
R5
R6
Component
Transceiver
J8
J7
Integrated
Transceiver
R11C16
R13
GND
+5
+5V
R8
R9
C11
Power
C8
D3
C7
Y1
U2
JP2 JP1 BAUD
J4
J3
J2
TX
Header
J1
JP3
R2
(
MCP2150
Open=Enabled
R4 R3
JP2 JP1
0
0
9600
0
1
19200
1
0
57600
1
1
115200
RX
RTS
CTS
DTR
GND
D2
C13
R14
R10
D5
U6
C6
R1
C9
U3
D1
D6
3
2
2004 Microchip Technology Inc.DS51246A-page 43
Page 48
MCP2120/MCP2150 Developer’s Kit User’s Guide
A.6OSCILLATOR OPTIONS
The MCP2120 can be operated at different frequencies, while the MCP2150 only
operates at a single fixed frequency.
A.6.1MCP2120 Developer’s Board
The MCP2120 Developer’s Board crystal has pin receptacles so that crystal
frequencies can easily be changed. Table A-1 shows the baud rates for a given crystal
frequency, based on the state of the BAUD2:BAUD0 pins.
TABLE A-1:CRYSTAL FREQUENCY / BAUD RATE
OSC
Frequency (MHz)
F
BAUD2:BAUD0Bit Rate
000
001
010
011
100
Note 1:An external clock is recommended for frequencies below 2 MHz.
2:For frequencies above 7.5 MHz, the TXIR pulse width (MCP2120 Data Sheet
F
OSC
/ 76880026044800640096001920026042
F
OSC
/ 38416005208960012800 192003840052083
F
OSC
/ 192320010417 19200 256003840078600104167
F
OSC
/ 128480015625 28800 3840057600115200156250
F
OSC
/ 64960031250 57600 78600 115200230400312500
electrical specification parameter IR121) will be shorter than the minimum pulse width
of 1.6 µs in the IrDA standard specification.
0.6144
(1)
2.000 3.6864 4.9152 7.3728 14.7456
(2)
20.000
(2)
A.6.2MCP2150 Developer’s Board
The MCP2150 Developer’s Board requires a fixed frequency crystal (11.0592 MHz).
TABLE A-2:CRYSTAL FREQUENCY / BAUD RATE
BAUD1:BAUD0Bit RateFOSC Frequency - 11.0592 MHz
00F
01F
10F
11F
OSC / 11529600
OSC / 57619200
OSC / 19257600
OSC / 96115200
DS51246A-page 44 2004 Microchip Technology Inc.
Page 49
A.7BOARD LAYOUT
Figure A-3 shows the component layout (silkscreen) for the MCP2120 Board.