AN923

M
AN923
Using the MCP2120 Developer’s Board for “IR Sniffing”
Author:
This application note will discuss the implementation of
an “IR Sniffer” using the MCP2120 Developer’s Board
connected to a PC running a program called “Listen32”.
Mark Palmer
Microchip Technology Inc.
This application note will:
INTRODUCTION
When developing applications using a network protocol
standard, it is helpful to “see” the data being
transmitted between the devices. When the network
protocol standard uses a physical medium, a logic
analyzer can be used to view the data transmitted over
the cable. A different method must be used during the
development of an infrared application, however, since
the medium being used for the transfer of information is
light (IR), and not a physical medium that can be
connected to a cable.
• Discuss the requirements for capturing the IR
data
• Provide an introduction on how to read the
captured data
• Discuss some of the system’s limitations
This implementation provides a low-cost method for
“seeing” the IR data communication between a Primary
Device and a Secondary Device. While there are thirdparty tools that can accomplish this, these tools tend to
be quite expensive.
Figure 1 shows an IrDA ® standard system where a
Palm™ PDA device is communicating with an
embedded system. In this example, the Palm PDA
operates as the Primary Device and the embedded
system operates as the Secondary Device.
For the purposes of this Application Note, it is assumed
that the reader has an understanding of the IrDA
Standard Protocol (and its terminology) and the
connection sequence between a Primary Device and a
Secondary Device. An overview of this sequence can
be found in Appendix A: “Overview of the IrDA®
Standard Connection Sequence”, the MCP21XX
device data sheets and the IrDA.org documentation
(located at www.irda.org).
The MCP2120 Developer’s Board is contained in the
MCP2120/MCP2150 Developer’s Kit, Part Number
DM163008.
FIGURE 1:
PALM™ PDA - EMBEDDED SYSTEM BLOCK DIAGRAM
Embedded System with IrDA® Standard Port
(Secondary Device)
Host Controller
and Embedded
Circuitry
MCP215X
or
MCP2140
Optical
Transceiver
Circuitry
PDA Handheld Device
with IrDA® Standard Port
(Primary Device)
 2004 Microchip Technology Inc.
DS00923A-page 1
AN923
THE HARDWARE SETUP
To capture the data transmitted from the Primary
Device and the Secondary Device, the MCP2120
Developer’s Board must be able to “see” the IR data
from both devices. Since IR is directional, something
must be done to ensure that the light from both devices
can be detected by the MCP2120 Developer’s Board
receiver. This is accomplished by using a little trick.
Most IrDA standard devices will not receive when they
are transmitting because they don’t want to pick up the
data they just transmitted. Therefore, if a mirror or
bright white paper is placed opposite the device, it
would not see the reflected data (see Figure 2).
Note:
The MCP2120 Developer’s Board is actually stacked
on top of the embedded system (Secondary Device),
with the optical transceivers close to each other, while
the mirror/white paper is just above the PDA IR window
(see Figure 3).
Figure A-1 shows an overview of the IrDA standard
connection sequence and some common IrDA
standard terminology.
If the captured data does not follow the
expectation for frame sequence, then you
may need to:
1. Adjust your reflective surface
2. Use a better refective surface.
The success of this method is also
dependent on the strength of the transmitters and the sensitivity of the receiver
circuit.
FIGURE 2:
IR SNIFFER SETUP USING THE MCP2120 DEVELOPER’S BOARD
To PC
Serial Port
Mirror or
Reflective Surface
(such as bright white paper)
MCP2120
Developer’s
Board
Host Controller
and Embedded
Circuitry
MCP215X
or
MCP2140
Optical
Transceiver
Circuitry
Embedded System with IrDA® Port
(Secondary Device)
FIGURE 3:
FRONT VIEWS OF IR SNIFFER SETUP
MCP2120 Developer’s Board
(IR Sniffer)
Embedded System with IrDA® Port
(Secondary Device)
DS00923A-page 2
PDA Handheld Device
with IrDA® Standard Port
(Primary Device)
Mirror or
Reflective Surface (white paper)
IR Window
PDA Handheld Device
with IrDA ® Standard Port
(Primary Device)
 2004 Microchip Technology Inc.
AN923
MCP2120 Developer’s Board Setup
If the MCP2120 Developer’s Board was configured for
9600 Baud, only the first part of the IR communication
would be captured until the Primary Device and
Secondary Device switched baud rates. Likewise, if the
MCP2120 Developer’s Board was configured for
115.2 Kbaud, then only the second part of the IR
communication would be captured (i.e., from the point
that the Primary Device and Secondary Device
switched from 9600 Baud to the new baud rate 115.2 Kbaud). Appendix C: “MCP215x IR Communication Capture” shows two captures of IR communication between the MCP2150 and a PDA. The first at
9600 baud and the second at 115.2 Kbaud.
The MCP2120 is an encoder/decoder device. That is, it
converts between the UART (at a specified baud rate)
and IrDA standard data formats. For this application (IR
sniffer), we are only using the decoding capabilities
(i.e., converting from the IrDA standard data format to
the UART data format).
When “sniffing” IrDA standard IR data, the protocol
used determines how the IR baud rate will behave. For
the IrCOMM protocol, the capabilities of the Primary
Device and the Secondary Device will determine the
negotiated IR baud rate. All communication starts at
9600 Baud.
Most
Primary
Devices
support
communication up to 115.2 Kbaud. The MCP215X
devices support communication up to 115.2 Kbaud,
while the MCP2140 is fixed at 9600 Baud.
Figure 4 shows the jumper configuration for the general
setup of the MCP2120 Developer’s Board, while
Figure 5 shows how to configure the jumpers for the
two main baud rates (9600 baud and 115200 baud).
The baud rate is dependent on the MCP2120’s
operational frequency. These baud rate jumper settings
are based on the MCP2120 having a crystal frequency
of 7.3728 MHz. For additional information on the operation of the MCP2120 Developer’s Board, please refer
to the MCP2120/MCP2150 Developer’s Board User
Guide (DS51246).
What does this mean? Well, for the MCP2140, the
MCP2120 Developer’s Board can be configured for
9600 baud, and the entire IR communication would be
captured. Appendix B: “MCP2140 IR Communication Capture” shows the capture of IR communication
between the MCP2140 and a Palm PDA.
However, with the MCP215X devices, the baud rate
can be negotiated to one of the available selections
between 9600 Baud and 115.2 Kbaud. In most cases,
the Primary Device will support 115.2 Kbaud.
FIGURE 4:
MCP2120 DEVELOPER’S BOARD JUMPER SETUP
C11
D3
D6 D2
R15
U2
C17
R9
C18
U5
C6
Enabled
R3
CR1
(MCP2120)
Open = Enabled
C7
C12
C13
C8
R8
These two jumpers select the
optical transceiver logic. Both
jumpers should connect the
same pin positions.
J6 and J7
U4
JP4
R4
C4
C15
D4
C10
Y1
J5
R7
R6
C14
R5
R11
R10
Component
Transceiver
J7
J6
D1
D5
R12
JP5 R1
Integrated Transceiver
Q1
C2
C3
MCP2120 Developer’s Board
02-01608 Rev. 1
DB9
U1
J4
J1
Header
C1
JP3:JP1
000 = Fosc/768
001 = Fosc/384
010 = Fosc/192
011 = Fosc/128
100 = Fosc/64
111 = S/W Baud
Open = 0
Integrated
J3
U6
Transceiver
R13
C16
RTS
C5
R2
MODE
C9
TX
R14
RX
U3
J2
MCP2120 Enable/Disable
+5V
GND
These two jumpers select the
source of the Host signals.
J1 and J4
DB9 is source.
PC UART configuration for
Hardware/Software Baud mode
Hardware Baud Selection
 2004 Microchip Technology Inc.
DS00923A-page 3
AN923
FIGURE 5:
SELECTING THE BAUD RATE FOR THE MCP2120 DEVELOPER’S BOARD
C11
D3
D6 D2
R15
U2
C17
R9
C18
U5
C6
These three jumpers select
the baud rate.
R3
CR1
C4
C15
D4
C10
Y1
J5
(MCP2120)
Open = Enabled
C7
C12
C13
C8
R8
U4
JP3:JP2:JP1
JP4
R4
R7
R6
C14
R5
R11
R10
FOSC/768
(9600 Baud)
Component
D1
Transceiver
D5
J6
J7 R12
JP5 R1
JP3:JP2:JP1
Q1
C3
MCP2120 Developer’s Board
02-01608 Rev. 1
DS00923A-page 4
DB9
U1
J2
J4
J1
Header
C1
JP3:JP1
000 = Fosc/768
001 = Fosc/384
010 = Fosc/192
011 = Fosc/128
100 = Fosc/64
111 = S/W Baud
Open = 0
Integrated
Transceiver
J3
FOSC/64
(115200 Baud)
R13
C16
RTS
C2
MODE
C5
R2
TX
C9
RX
U3
R14
U6
+5V
Baud rates assumes MCP2120
crystal frequency of
7.3728 MHz.
GND
 2004 Microchip Technology Inc.
AN923
THE SOFTWARE
To capture the data on the PC from the MCP2120
Developer’s Board, a third-party program called
“Listen32” was used. Listen32 was chosen due to its
capability to display the data that is received in several
formats, including hexadecimal. This is required
because numerous hex values are not displayable
when using many terminal programs since they only
display the ASCII character (many hex values are nonprinting characters).
Listen32 was developed by Win-Tech Software Design.
Their web site is:
http://www.win-tech.com
To use the program, you will need to select the Setup
→ Hardware menu. Here you will select the characteristics of the UART port that the MCP2120 Developer’s
Board is connected to. For both the MCP2140 and
MCP215X devices, the port should be configured for
“No parity”, 8 data bits and 1 Stop bit. The baud rate
MUST match the baud rate of the MCP2120 Developer’s Board and should match the IR baud rate that
you wish to monitor. Table 1 shows how the baud rates
will work with the MCP21XX devices. Then select OK.
TABLE 1:
Ensure that the program displays the information in the
correct numerical base (Num Base). Navigate to the
Setup → Preferences → Num Base menu and select
Hex. Then select OK. This will ensure that you see the
hex value of the data that is received.
Before you start the capture, you should clear the
Listen32 receive buffer. This is done by selecting Clear
Buffer from the Edit pull-down menu (Edit → Clear
Buffer).
Now you are ready to use Listen32 for capturing data.
You can do this by either clicking on the “green light”
icon (in the tool bar), or by selecting File → New/
Collect. Once this is done, Listen32 will prompt you to
specify the serial port, for which you will select the port
that is connected to the MCP2120 Developer’s Board.
Once the IR communication is complete, clicking on
the “red light” icon (in the tool bar) ends the data-capture process. You can then save the file by selecting
Save As from the File pull-down menu (File → Save
As). It is suggested that you select the .TXT format
(not the .LSN) so that you can format the captured
information in your favorite text editor.
LISTEN32 BAUD RATE
SELECTION (2)
Baud Rate
MCP2140
MCP215x
9600
Entire IR
Communication
(NDM, Discovery
and NRM)
NDM and
Discovery up to
when baud rate
changes (1)
115200
N.A.
Discovery after
baud rate changes
and NRM
Note 1: Entire
IR
Communication
(NDM,
Discovery and NRM) if Primary Device
specifies 9600 baud rate in Discovery
mode.
2: To better understand what the terms
“NDM”, “Discovery” and “NRM” represent,
please refer to Appendix A: “Overview
of the IrDA® Standard Connection
Sequence”.
 2004 Microchip Technology Inc.
DS00923A-page 5
AN923
LIMITATIONS
Some of the limitations of this technique are discussed
below, and depend on the MCP21XX protocol handling
device used.
The beginning of a frame (BOF) will start with a C0h
character, but may have preceding FFh characters.
(See Figure B-1, Frame 1). The end of the frame is
signified with a C1h character. Figure 6 shows the
structure of the IrLAP frame.
For a System using an MCP2140 Device
FIGURE 6:
This technique will capture the entire IR communication
since the IR data remains at 9600 Baud for all states
(NDM, Discovery and NRM).
You will need to parse the saved text file from the
Listen32 program.
For a System using an MCP215X Device
If the Primary Device (such as a PC or PDA) will
negotiate a communication baud rate greater then
9600 Baud, then either:
1.
2.
the MCP2120 Developer’s Board can be
configured to capture the first portion of the IR
communication, when IR data is transmitted at
9600 Baud. This occurs during the NDM and
Discovery states, up to where the IR Baud rate
is changed, or
the MCP2120 Developer’s Board can be configured to capture the second portion of the IR
communication, when IR data is transmitted at
faster than 9600 Baud (such as 115.2 Kbaud).
This occurs during the Discovery state once the
IR baud rate is changed, and the NRM state.
In these cases, you are not able to see the entire IR
communication in a single capture.
If the Primary Device’s baud rate will remain at
9600 Baud, the entire IR communication can be
captured.
IRLAP FRAME
N BOF BOF A C I FCS EOF
2
N•C0h + C0h payload bytes C1h
or
N•FFh + C0h
The address byte (A field) is odd for the Primary
Device, as well as the Secondary Device (See
Figure B-1, Frames 1 and 2). The control byte (C field)
differentiates between different types of frames. The
information field (I field) carries the data. If the first 4
characters of the I field are xxh:04h:00h:00h, the
following information in the I field is data payload. That
is, this is the data that the host controller is sending to
the Primary Device (See Figure B-1, Frame 30).
SUMMARY
It is sometimes useful in the debugging process of an
IrDA standard system to monitor the IR communications. The MCP2120 Developer’s Board allows the
implementation of a low-cost IR sniffer, which will assist
in the system development of your application from
both the Primary Device application program to the
embedded system (Secondary Device) hardware and
firmware.
You will also need to parse the saved text file from the
Listen32 program.
IR CAPTURE EXAMPLES
An embedded system that transmits a 250 byte table to
a PDA was implemented. The embedded system’s
host controller will send the data to the MCP21XX
device, which will then format the data for the IrCOMM
frame and transmit to the PDA. Each appendix will
show the data as it was saved by the Listen32 program
(in .TXT format), and then that data formatted into the
IR frames.
Appendix B: “MCP2140 IR Communication Capture” shows the capture of IR communication between
the MCP2140 and a PDA.
Appendix C: “MCP215x IR Communication Capture” shows two captures of IR communication
between the MCP2150 and a PDA. The first at
9600 Baud and the second at 115.2 Kbaud.
DS00923A-page 6
 2004 Microchip Technology Inc.
AN923
APPENDIX A:
FIGURE A-1:
OVERVIEW OF THE IRDA® STANDARD CONNECTION SEQUENCE
CONNECTION SEQUENCE
Primary Device
Normal Disconnect Mode (NDM)
Secondary Device
(ex. MCP215X or MCP2140)
Send XID Commands
(timeslots n, n+1, ...)
No Response
Finish sending XIDs
(max timeslots - y frames)
Broadcast ID
XID Response in timeslot y,
claiming this timeslot
— MCP215X claims timeslot 2
— MCP2140 claims timeslot 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
— MCP2150 CD pin driven low,
— MCP2155 and MCP2140 DSR
pin is driven low
Send Data or Status
Send Data or Status
Send Data or Status
Shutdown link
Confirm shutdown
(back to NDM state)
 2004 Microchip Technology Inc.
DS00923A-page 7
AN923
APPENDIX B:
FIGURE B-1:
DS00923A-page 8
MCP2140 IR COMMUNICATION CAPTURE
MCP2140 RAW CAPTURE @ 9600 BAUD
 2004 Microchip Technology Inc.
AN923
FIGURE B-1:
MCP2140 FORMATTED CAPTURE @ 9600 BAUD - PAGE 1
Frame Frame
#
Sent By
Frame Data
1
P
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][68][ac][38][48]
[ff][ff][ff][ff][01][00][00][7b][bd][c1]
[c0][fe][bf][01][b5][b5][b5][b5][68][ac][38][48][01][00][00][90][04][00]
[4d][43][50][32][31][34][30][20][41][35][f0][6f][c1]
2
S
3
P
4
P
5
P
6
P
7
P
8
P
9
P
10
S
11
12
13
14
15
16
P
S
P
S
P
S
[ff][c0][3f][11][25][3b][c1]
[c0][3e][11][fd][22][c1]
[c0][3f][10][80][01][01][00][fc][d7][c1]
[c0][3e][31][ff][03][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][30][81][00][81][00][ed][79][c1]
17
P
18
19
20
21
22
S
P
S
P
S
[c0][3f][32][00][01][84][0b][49][72][44][41][3a][49][72][43][4f][4d][4d]
[13][49][72][44][41][3a][54][69][6e][79][54][50][3a][4c][73][61][70]
[53][65][6c][64][f6][c1]
[c0][3e][52][01][00][84][00][00][01][00][04][01][00][00][00][04][d3][47][c1]
[c0][3f][54][84][02][01][00][01][03][00][01][04][1f][ad][c1]
[c0][3e][74][82][04][81][00][05][1a][e6][c1]
[c0][3f][71][23][58][c1]
[c0][3e][71][fb][41][c1]
23
P
24
25
26
27
28
S
P
S
P
S
29
30
P
S
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][68][ac][38][48]
[ff][ff][ff][ff][01][01][00][a3][a4][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][68][ac][38][48]
[ff][ff][ff][ff][01][02][00][cb][8e][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][68][ac][38][48]
[ff][ff][ff][ff][01][03][00][13][97][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][68][ac][38][48]
[ff][ff][ff][ff][01][04][00][1b][da][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][68][ac][38][48]
[ff][ff][ff][ff][01][05][00][c3][c3][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][68][ac][38][48]
[ff][ff][ff][ff][01][ff][00][82][04][00][49][72][43][4f][4d][4d][d0][c7][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][93][68][ac][38][48][b5]
[b5][b5][b5][3e][01][01][3f][82][01][01][83][01][0f][84][01][01][85]
[01][08][86][01][07][08][01][ff][83][7d][e0][c1]
[c0][3e][73][b5][b5][b5][b5][68][ac][38][48][01][01][02][82][01][01][83]
[01][01][84][01][01][85][01][80][86][01][07][08][01][ff][b9][15][c1]
[c0][3f][76][04][02][00][17][10][04][00][00][c2][00][11][01][03][12][01]
[00][13][02][11][13][14][02][13][11][20][01][0c][af][a8][c1]
[c0][3e][96][02][04][01][1a][1c][c1]
[c0][3f][91][2d][bf][c1]
[c0][3e][91][f5][a6][c1]
[c0][3f][98][04][02][00][00][35][cc][57][c1]
[c0][3e][b8][02][04][01][0b][3d][c1]
[c0][3f][b1][2f][9e][c1]
[c0][3e][ba][02][04][00][00]
------------------------------------------------------[31][32][33][34][35][36][37][38][0d][0a]
[32][42][43][44][45][46][47][48][0d][0a]
Data Payload
[33][32][33]
------------------------------------------------------[15][34][c1]
Legend: P = Primary Device
 2004 Microchip Technology Inc.
S = Secondary Device
DS00923A-page 9
AN923
FIGURE B-2:
MCP2140 FORMATTED CAPTURE @ 9600 BAUD - PAGE 2
Frame Frame
#
Sent By
Frame Data
31
32
33
34
P
S
P
S
[c0][3f][da][04][02][05][f0][52][c1]
[c0][3e][d1][f1][e4][c1]
[c0][3f][d1][29][fd][c1]
[c0][3e][dc][02][04][00][00]
------------------------------------------------------[34][35][36][37][38][0d][0a]
[34][62][63][64][65][66][67][68][0d][0a]
Data Payload
[35][32][33][34][35][36]
------------------------------------------------------[25][cd][c1]
35
36
37
38
P
S
P
S
[c0][3f][fc][04][02][01][1d][d0][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][f1][2b][dc][c1]
[c0][3e][fe][02][04][00][00]
------------------------------------------------------[37][38][0d][0a]
[36][42][43][44][45][46][47][48][0d][0a]
Data Payload
[37][32][33][34][35][36][37][38][0d]
------------------------------------------------------[1c][dd][c1]
39
40
41
42
P
S
P
S
[c0][3f][1e][04][02][01][e1][5d][c1]
[c0][3e][11][fd][22][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][10][02][04][00][00]
------------------------------------------------------[0a]
[38][62][63][64][65][66][67][68][0d][0a]
Data Payload
[39][32][33][34][35][36][37][38][0d][0a]
[41][42]
------------------------------------------------------[cb][6a][c1]
43
44
45
46
P
S
P
S
[c0][3f][30][04][02][01][f0][7c][c1]
[c0][3e][31][ff][03][c1]
[c0][3f][31][27][1a][c1]
[c0][3e][32][02][04][00][00]
------------------------------------------------------[43][44][45][46][47][48][0d][0a]
[42][32][33][34][35][36][37][38][0d][0a]
Data Payload
[43][62][63][64][65]
------------------------------------------------------[46][04][c1]
47
48
49
50
P
S
P
S
[c0][3f][52][04][02][01][62][dc][c1]
[c0][3e][51][f9][60][c1]
[c0][3f][51][21][79][c1]
[c0][3e][54][02][04][00][00]
------------------------------------------------------[66][67][68][0d][0a]
[44][32][33][34][35][36][37][38][0d][0a]
Data Payload
[45][42][43][44][45][46][47][48]
------------------------------------------------------[df][d6][c1]
Legend: P = Primary Device
DS00923A-page 10
S = Secondary Device
 2004 Microchip Technology Inc.
AN923
FIGURE B-3:
MCP2140 FORMATTED CAPTURE @ 9600 BAUD - PAGE 3
Frame Frame
#
Sent By
Frame Data
51
52
P
S
[c0][3f][71][23][58][c1]
[c0][3e][56][02][04][00][00]
------------------------------------------------------[0d][0a]
[46][32][33][34][35][36][37][38][0d][0a]
Data Payload
[31][62][63][64][65][66][67][68][0d][0a]
[32]
------------------------------------------------------[5c][ae][c1]
53
54
55
56
P
S
P
S
[c0][3f][94][04][02][01][21][ac][c1]
[c0][3e][71][fb][41][c1]
[c0][3f][91][2d][bf][c1]
[c0][3e][78][02][04][00][00]
------------------------------------------------------[32][33][34][35][36][37][38][0d][0a]
[33][42][43][44][45][46][47][48][0d][0a]
Data Payload
[34][32][33][34]
------------------------------------------------------[16][2e][c1]
57
58
59
60
P
S
P
S
[c0][3f][b6][04][02][02][9f][28][c1]
[c0][3e][91][f5][a6][c1]
[c0][3f][b1][2f][9e][c1]
[c0][3e][9a][02][04][00][00]
------------------------------------------------------[35][36][37][38][0d][0a]
[35][62][63][64][65][66][67][68][0d][0a]
Data Payload
[36][32][33][34][35][36][37]
------------------------------------------------------[0e][4f][c1]
61
62
63
64
P
S
P
S
[c0][3f][d8][04][02][01][a2][2d][c1]
[c0][3e][b1][f7][87][c1]
[c0][3f][d1][29][fd][c1]
[c0][3e][bc][02][04][00][00]
------------------------------------------------------[38][0d][0a]
[37][42][43][44][45][46][47][48][0d][0a]
Data Payload
[38][32][33][34][35][36][37][38][0d]
------------------------------------------------------[3d][ca][c1]
65
66
67
68
P
S
P
S
[c0][3f][fa][04][02][01][87][9b][c1]
[c0][3e][d1][f1][e4][c1]
[c0][3f][f1][2b][dc][c1]
[c0][3e][de][02][04][00][00]
------------------------------------------------------[0a]
Data Payload
[39][62][63][64][65][66][67][68][0d]
------------------------------------------------------[af][c9][c1]
Legend: P = Primary Device
 2004 Microchip Technology Inc.
S = Secondary Device
DS00923A-page 11
AN923
FIGURE B-4:
MCP2140 FORMATTED CAPTURE @ 9600 BAUD - PAGE 4
Frame Frame
#
Sent By
Frame Data
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
[c0][3f][11][25][3b][c1]
[c0][3e][d1][f1][e4][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][d1][f1][e4][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][d1][f1][e4][c1]
[c0][3f][1c][04][02][01][97][64][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
[c0][3f][11][25][3b][c1]
[c0][3e][f1][f3][c5][c1]
105
106
107
108
109
110
P
S
P
P
P
P
[c0][3f][53][33][5a][c1]
[c0][3e][53][eb][43][c1]
[c0][3f][53][33][5a][c1]
[c0][3f][53][33][5a][c1]
[c0][3f][53][33][5a][c1]
[c0][3f][53][33][5a][c1][ff][ff]
Legend: P = Primary Device
DS00923A-page 12
S = Secondary Device
 2004 Microchip Technology Inc.
AN923
APPENDIX C:
FIGURE C-1:
MCP215X IR COMMUNICATION CAPTURE
MCP2150 RAW CAPTURE @ 9600 BAUD
 2004 Microchip Technology Inc.
DS00923A-page 13
AN923
FIGURE C-1:
MCP2150 FORMATTED CAPTURE @ 9600 BAUD - PAGE 1
Frame Frame
#
Sent By
1
P
2
P
3
P
4
S
5
P
6
P
7
P
8
P
9
P
10
S
11
Note 1
Frame Data
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][02][3c][00][43]
[ff][ff][ff][ff][01][00][00][d3][25][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][02][3c][00][43]
[ff][ff][ff][ff][01][01][00][0b][3c][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][02][3c][00][43]
[ff][ff][ff][ff][01][02][00][63][16][c1]
[c0][c0][c0][c0][c0][c0][c0][c0][c0][c0][c0][fe][bf][01][b5][b5][b5][b5]
[02][3c][00][43][01][02][00][90][04][00][47][65][6e][65][72][69][63]
[20][49][72][44][41][28][ef][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][02][3c][00][43]
[ff][ff][ff][ff][01][03][00][bb][0f][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][02][3c][00][43]
[ff][ff][ff][ff][01][04][00][b3][42][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][02][3c][00][43]
[ff][ff][ff][ff][01][05][00][6b][5b][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][3f][01][02][3c][00][43]
[ff][ff][ff][ff][01][ff][00][82][04][00][49][72][43][4f][4d][4d][d2]
[36][c1]
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][c0][ff][93][02][3c][00][43][b5]
[b5][b5][b5][84][01][01][3f][82][01][01][83][01][0f][84][01][01][85]
[01][08][86][01][07][08][01][ff][16][9b][c1]
[c0][c0][c0][c0][c0][c0][c0][c0][c0][c0][c0][84][73][b5][b5][b5][b5][02]
[3c][00][43][01][01][3e][82][01][01][83][01][01][84][01][01][85][01]
[80][86][01][01][08][01][ff][70][1b][c1]
[ff][80][e0][02][ff][e0][01][00][fc][c2][00][00][00][ff][00][00][02][e0]
[00][fe][80][e0][c0][00][00][f8][00][f0][00][e0][02][fe][00][81][00]
[00][00][00][00][00][00][c0][81][00][00][00][00][00][00][00][c0][02]
[00][00][00][00][00][00][00][c0][00][00][00][00][00][00][00][00][ff]
[03][e0][81][e0][80][e0][80][e0][80][e0][00][e0][80][e0][80][e0][80]
[e0][81][e0][81][e0][81][e0][80][e0][80][e0][80][e0][81][80][80][81]
[ff][ff]
Legend: P = Primary Device
S = Secondary Device
Note 1: The information captured here is “garbage data”. That is, the data that was communicated between the
Primary Device and Secondary Device at 115200 baud, but captured by the MCP2120 Developer’s Board
at 9600 baud.
DS00923A-page 14
 2004 Microchip Technology Inc.
AN923
FIGURE C-2:
MCP2150 RAW CAPTURE @ 115200 BAUD
 2004 Microchip Technology Inc.
DS00923A-page 15
AN923
FIGURE C-3:
MCP2150 FORMATTED CAPTURE @ 115200 BAUD - PAGE 1
Frame Frame
#
Sent By
Frame Data
Note 1
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff]
................[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff]
P
S
P
S
P
S
P
[c0][db][11][dc][b5][c1]
[c0][da][11][04][ac][c1]
[c0][db][10][80][01][01][00][43][45][c1]
[c0][da][31][06][8d][c1]
[c0][db][11][dc][b5][c1]
[c0][da][30][81][00][81][00][47][d9][ff][f6][c1]
[c0][db][32][00][01][84][0b][49][72][44][41][3a][49][72][43][4f][4d][4d]
[13][49][72][44][41][3a][54][69][6e][79][54][50][3a][4c][73][61][70]
[53][65][6c][8d][c2][c1]
[c0][da][52][01][00][84][00][00][01][00][04][01][00][00][00][04][74][86][c1]
S
P
S
P
S
P
S
P
S
P
S
[c0][db][54][84][02][01][00][01][03][00][01][04][de][4e][c1]
[c0][da][74][82][04][81][00][05][f4][ab][c1]
[c0][db][71][da][d6][c1]
[c0][da][71][02][cf][c1]
[c0][db][76][04][02][00][17][10][04][00][00][c2][00][11][01][03][12][01]
[00][13][02][11][13][14][02][13][11][20][01][0c][17][5b][c1]
[c0][da][96][02][04][00][03][21][01][7d][e0][35][81][c1]
[c0][db][98][04][02][04][4e][6a][c1]
[c0][da][b1][0e][09][c1]
[c0][db][9a][04][02][00][00][35][74][12][c1]
[c0][da][d8][02][04][01][19][a2][c1]
P
S
[c0][db][b1][d6][10][c1]
[c0][da][da][02][04][00][00]
------------------------------------------------------[31][32][33][34][35][36][37][38][0d][0a]
[32][42][43][44][45][46][47][48][0d][0a]
[33][32][33][34][35][36][37][38][0d][0a]
[34][62][63][64][65][66][67][68][0d][0a]
Data Payload
[35][32][33][34][35][36][37][38][0d][0a]
[36][42][43][44][45][46][47][48][0d][0a]
[37][32][33][34]
------------------------------------------------------[b3][7f][c1]
P
S
[c0][db][d1][d0][73][c1]
[c0][da][dc][02][04][00][00]
------------------------------------------------------[35][36][37][38][0d][0a]
[38][62][63][64][65][66][67][68][0d][0a]
[39][32][33][34][35][36][37][38][0d][0a]
[41][42][43][44][45][46][47][48][0d][0a]
Data Payload
[42][32][33][34][35][36][37][38][0d][0a]
[43][62][63][64][65][66][67][68][0d][0a]
[44][32][33][34][35][36][37][38]
------------------------------------------------------[65][62][c1]
Legend: P = Primary Device
S = Secondary Device
Note 1: The information captured here is “garbage data”. That is, the data that was communicated between the
Primary Device and Secondary Device at 9600 baud, but captured by the MCP2120 Developer’s Board at
115200 baud. Only a portion of this “garbage data” is shown due to space limitations (indicated by .......).
DS00923A-page 16
 2004 Microchip Technology Inc.
AN923
FIGURE C-4:
MCP2150 FORMATTED CAPTURE @ 115200 BAUD - PAGE 2
Frame Frame
#
Sent By
Frame Data
P
S
[c0][db][fc][04][02][01][eb][d6][c1]
[c0][da][fe][02][04][00][00]
------------------------------------------------------[0d][0a]
[45][42][43][44][45][46][47][48][0d][0a]
[46][32][33][34][35][36][37][38][0d][0a]
[31][62][63][64][65][66][67][68][0d][0a]
Data Payload
[32][32][33][34][35][36][37][38][0d][0a]
[33][42][43][44][45][46][47][48][0d][0a]
[34][32][33][34][35][36][37][38][0d][0a]
[35][62]
------------------------------------------------------[2d][c7][c1]
P
S
[c0][db][1e][04][02][01][17][5b][c1]
[c0][da][10][02][04][00][00]
------------------------------------------------------[63][64][65][66][67][68][0d][0a]
[36][32][33][34][35][36][37][38][0d][0a]
[37][42][43][44][45][46][47][48][0d][0a]
Data Payload
[38][32][33][34][35][36][37][38][0d][0a]
[39][62][63][64][65][66][67][68][0d][0a]
[61][32][33][34][35][36][37][38][0d][0a]
------------------------------------------------------[11][7d][e1][c1]
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
[c0][db][30][04][02][01][06][7a][c1]
[c0][da][31][06][8d][c1]
[c0][db][31][de][94][c1]
[c0][da][31][06][8d][c1]
[c0][db][31][de][94][c1]
[c0][da][31][06][8d][c1]
[c0][db][31][de][94][c1]
[c0][da][31][06][8d][c1]
[c0][db][31][de][94][c1]
[c0][da][31][06][8d][c1]
[c0][db][32][04][02][01][70][43][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
Legend: P = Primary Device
 2004 Microchip Technology Inc.
S = Secondary Device
DS00923A-page 17
AN923
FIGURE C-5:
MCP2150 FORMATTED CAPTURE @ 115200 BAUD - PAGE 3
Frame Frame
#
Sent By
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
S
P
P
P
P
Frame Data
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][31][de][94][c1]
[c0][da][51][00][ee][c1]
[c0][db][53][ca][d4][c1]
[c0][da][53][12][cd][c1]
[c0][db][53][ca][d4][c1]
[c0][db][53][ca][d4][c1]
[c0][db][53][ca][d4][c1]
[c0][db][53][ca][d4][c1][ff][ff]
Legend: P = Primary Device
DS00923A-page 18
S = Secondary Device
 2004 Microchip Technology Inc.
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, KEELOQ, MPLAB, PIC, PICmicro, PICSTART,
PRO MATE, PowerSmart and rfPIC are registered
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
AmpLab, FilterLab, microID, MXDEV, MXLAB, PICMASTER,
SEEVAL, SmartShunt and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
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, PICtail, PowerCal,
PowerInfo, PowerMate, PowerTool, rfLAB, Select Mode,
SmartSensor, SmartTel and Total Endurance are trademarks
of Microchip Technology Incorporated in the U.S.A. and other
countries.
Serialized Quick Turn Programming (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.
 2004 Microchip Technology Inc.
DS00923A-page 19
M
WORLDWIDE SALES AND SERVICE
AMERICAS
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: http://www.microchip.com
China - Beijing
Korea
Unit 706B
Wan Tai Bei Hai Bldg.
No. 6 Chaoyangmen Bei Str.
Beijing, 100027, China
Tel: 86-10-85282100
Fax: 86-10-85282104
168-1, Youngbo Bldg. 3 Floor
Samsung-Dong, Kangnam-Ku
Seoul, Korea 135-882
Tel: 82-2-554-7200 Fax: 82-2-558-5932 or
82-2-558-5934
China - Chengdu
200 Middle Road
#07-02 Prime Centre
Singapore, 188980
Tel: 65-6334-8870 Fax: 65-6334-8850
3780 Mansell Road, Suite 130
Alpharetta, GA 30022
Tel: 770-640-0034
Fax: 770-640-0307
Rm. 2401-2402, 24th Floor,
Ming Xing Financial Tower
No. 88 TIDU Street
Chengdu 610016, China
Tel: 86-28-86766200
Fax: 86-28-86766599
Boston
China - Fuzhou
Atlanta
2 Lan Drive, Suite 120
Westford, MA 01886
Tel: 978-692-3848
Fax: 978-692-3821
Chicago
333 Pierce Road, Suite 180
Itasca, IL 60143
Tel: 630-285-0071
Fax: 630-285-0075
Dallas
4570 Westgrove Drive, Suite 160
Addison, TX 75001
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Tri-Atria Office Building
32255 Northwestern Highway, Suite 190
Farmington Hills, MI 48334
Tel: 248-538-2250
Fax: 248-538-2260
Kokomo
2767 S. Albright Road
Kokomo, IN 46902
Tel: 765-864-8360
Fax: 765-864-8387
Los Angeles
18201 Von Karman, Suite 1090
Irvine, CA 92612
Tel: 949-263-1888
Fax: 949-263-1338
San Jose
1300 Terra Bella Avenue
Mountain View, CA 94043
Tel: 650-215-1444
Fax: 650-961-0286
Toronto
6285 Northam Drive, Suite 108
Mississauga, Ontario L4V 1X5, Canada
Tel: 905-673-0699
Fax: 905-673-6509
ASIA/PACIFIC
Australia
Suite 22, 41 Rawson Street
Epping 2121, NSW
Australia
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
Unit 28F, World Trade Plaza
No. 71 Wusi Road
Fuzhou 350001, China
Tel: 86-591-7503506
Fax: 86-591-7503521
China - Hong Kong SAR
Unit 901-6, Tower 2, Metroplaza
223 Hing Fong Road
Kwai Fong, N.T., Hong Kong
Tel: 852-2401-1200
Fax: 852-2401-3431
Singapore
Taiwan
Kaohsiung Branch
30F - 1 No. 8
Min Chuan 2nd Road
Kaohsiung 806, Taiwan
Tel: 886-7-536-4818
Fax: 886-7-536-4803
Taiwan
Taiwan Branch
11F-3, No. 207
Tung Hua North Road
Taipei, 105, Taiwan
Tel: 886-2-2717-7175 Fax: 886-2-2545-0139
EUROPE
China - Shanghai
Austria
Room 701, Bldg. B
Far East International Plaza
No. 317 Xian Xia Road
Shanghai, 200051
Tel: 86-21-6275-5700
Fax: 86-21-6275-5060
Denmark
China - Shenzhen
Rm. 1812, 18/F, Building A, United Plaza
No. 5022 Binhe Road, Futian District
Shenzhen 518033, China
Tel: 86-755-82901380
Fax: 86-755-8295-1393
China - Shunde
Room 401, Hongjian Building, No. 2
Fengxiangnan Road, Ronggui Town, Shunde
District, Foshan City, Guangdong 528303, China
Tel: 86-757-28395507 Fax: 86-757-28395571
China - Qingdao
Rm. B505A, Fullhope Plaza,
No. 12 Hong Kong Central Rd.
Qingdao 266071, China
Tel: 86-532-5027355 Fax: 86-532-5027205
India
Divyasree Chambers
1 Floor, Wing A (A3/A4)
No. 11, O’Shaugnessey Road
Bangalore, 560 025, India
Tel: 91-80-22290061 Fax: 91-80-22290062
Japan
Benex S-1 6F
3-18-20, Shinyokohama
Kohoku-Ku, Yokohama-shi
Kanagawa, 222-0033, Japan
Tel: 81-45-471- 6166 Fax: 81-45-471-6122
Durisolstrasse 2
A-4600 Wels
Austria
Tel: 43-7242-2244-399
Fax: 43-7242-2244-393
Regus Business Centre
Lautrup hoj 1-3
Ballerup DK-2750 Denmark
Tel: 45-4420-9895 Fax: 45-4420-9910
France
Parc d’Activite du Moulin de Massy
43 Rue du Saule Trapu
Batiment A - ler Etage
91300 Massy, France
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
Germany
Steinheilstrasse 10
D-85737 Ismaning, Germany
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Italy
Via Quasimodo, 12
20025 Legnano (MI)
Milan, Italy
Tel: 39-0331-742611
Fax: 39-0331-466781
Netherlands
P. A. De Biesbosch 14
NL-5152 SC Drunen, Netherlands
Tel: 31-416-690399
Fax: 31-416-690340
United Kingdom
505 Eskdale Road
Winnersh Triangle
Wokingham
Berkshire, England RG41 5TU
Tel: 44-118-921-5869
Fax: 44-118-921-5820
02/17/04
DS00923A-page 20
 2004 Microchip Technology Inc.