MCP2150
DS21655B-page 12
Preliminary
2002 Microchip Technology Inc.
2.9.1.2
IrLAP
The MCP2150 supports the IrLAP protocol. The IrLAP
protocol provides:
Management of communication processes on the
link between devices.
A device-to-device connection for the reliable,
ordered transfer of data.
Device discover procedures.
Hidden node handling.
Figure 2-7 identifies the key parts and hierarchy of the
IrDA protocols. The bottom layer is the Physical layer,
IrPHY. This is the part that converts the serial data to
and from pulses of IR light. IR transceivers can’t trans-
mit and receive at the same time. The receiver has to
wait for the transmitter to finish sending. This is some-
times referred to as a “Half-Duplex” connection. The IR
Link Access Protocol (IrLAP) provides the structure for
packets (or “frames”) of data to emulate data that would
normally be free to stream back and forth.
FIGURE 2-7:
IRDA STANDARD
PROTOCOL LAYERS
Figure 2-8 shows how the IrLAP frame is organized.
The frame is proceeded by some number of Beginning
of Frame characters (BOFs). The value of the BOF is
generally 0xC0, but 0xFF may be used if the last BOF
character is a 0xC0. The purpose of multiple BOFs is to
give the other station some warning that a frame is
coming.
The IrLAP frame begins with an address byte (“A”
field), then a control byte (“C” field). The control byte is
used to differentiate between different types of frames
and is also used to count frames. Frames can carry sta-
tus, data or commands. The IrLAP protocol has a com-
mand syntax of it’s own. These commands are part of
the control byte. Lastly, IrLAP frames carry data. This
data is the information (or “I”) field. The integrity of the
frame is ensured with a 16-bit CRC, referred to as the
Frame Check Sequence (FCS). The 16-bit CRC value
is transmitted LSB first. The end of the frame is marked
with an EOF character, which is always a 0xC1. The
frame structure described here is used for all versions
of IrDA protocols used for serial wire replacement for
speeds up to 115.2 kbaud.
FIGURE 2-8:
IRLAP FRAME
In addition to defining the frame structure, IrLAP pro-
vides the “housekeeping” functions of opening, closing
and maintaining connections. The critical parameters
that determine the performance of the link are part of
this function. These parameters control how many
BOFs are used, identify the speed of the link, how fast
either party may change from receiving to transmitting,
etc. IrLAP has the responsibility of negotiating these
parameters to the highest common set so that both
sides can communicate as quickly, and as reliably, as
possible.
Host O.S. or Application
IrCOMM
IrLAP
IrPHY
Protocols
resident in
MCP2150
IR pulses
transmitted
and
received
IrLMP – IAS
Note 1: Another IrDA standard that is entering
general usage is IR Object Exchange
(IrOBEX). This standard is not used for
serial connection emulation.
2: IrDA communication standards faster
than 115.2 kbaud use a different CRC
method and physical layer.
X BOFs BOF A C
FCS
I
EOF
(1+N) of C0h payload
2
bytes C1h