• Provides IrDA standard physical signal layer
support including:
- Bidirectional communication
- CRC implementation
- Data communication rates up to 115.2 kbaud
• Includes UART to IrDA standard encoder/decoder
functionality:
- Easily interfaces with industry standard
UARTs and infrared transceivers
• UART interface for connecting to Data Terminal
Equipment (DTE) systems
• Transmit/Receive formats (bit width) supported:
-1.63µs
• Hardware baud rate selection for UART:
- 9.6 kbaud
- 19.2 kbaud
- 57.6 kbaud
- 115.2 kbaud
• Infrared baud rates supported:
- 9.6 kbaud
- 19.2 kbaud
- 38.4 kbaud
- 57.6 kbaud
- 115.2 kbaud
• 64 Byte Data Packet Size
• Programmable Device ID String
• Operates as Secondary Device
CMOS Technology
• Low power, high-speed CMOS technology
• Fully static design
• Low voltage operation
• Industrial temperature range
• Low power consumption
- < 1 mA @ 3.3 V, 11.0592 MHz (typical)
- 3 µA typical @ 5.0 V when disabled
Package Types
PDIP, SOIC
18
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
17
16
MCP2150
15
14
13
12
11
10
20
19
18
MCP2150
17
16
15
14
13
12
11
SSOP
BAUD0
TXIR
RXIR
RESET
V
SS
EN
TX
RX
RI
BAUD0
TXIR
RXIR
RESET
V
SS
SS
V
EN
TX
RX
RIDSR
Block Diagram
MCP2150
TXTXIR
EN
BAUD1
BAUD0
RX
RTS
CTS
DSR
DTR
CD
RI
Encode and
Protocol Handler
Logic
Baud Rate
Generator
Protocol Handler
and Decode
UART
Control
BAUD1
CD
OSC1/CLKI
OSC2
DD
V
RTS
CTS
DTR
DSR
BAUD1
CD
OSC1/CLKI
OSC2
DD
V
DD
V
RTS
CTS
DTR
RXIR
OSC1
OSC2
2002 Microchip Technology Inc.Preliminary
DS21655B-page 1
MCP2150
NOTES:
DS21655B-page 2
Preliminary 2002 Microchip Technology Inc.
MCP2150
1.0DEVICE OVERVIEW
This document contains device specific information for
the following device:
• MCP2150
The MCP2150 is a cost effective, low pin count (18-pin),
easy to use device for implementing IrDA standard wireless connectivity. The MCP2150 provides support for
the IrDA standard protocol “stack” plus bit encoding/
decoding.
The serial interface baud rates are user selectable to
one of four IrDA standard baud rates between 9600
baud and 115.2 kbaud (9600, 19200, 57600, 115200).
The IR baud rates are user selectable to one of five
IrDA standard baud rates between 9600 baud and
115.2 kbaud (9600, 19200, 37400, 57600, 115200).
The serial interface baud rate will be specified by the
BAUD1:BAUD0 pins, while the IR baud rate is specified
by the Primary Device (during Discover phase). This
means that the baud rates do not need to be the same.
The MCP2150 operates in Data Terminal Equipment
(DTE) applications and sits between a UART and an
infrared optical transceiver.
The MCP2150 encodes an asynchronous serial data
stream, converting each data bit to the corresponding
infrared (IR) formatted pulse. IR pulses received are
decoded and then handled by the protocol handler
state machine. The protocol handler sends the appropriate data bytes to the Host Controller in UART
formatted serial data.
The MCP2150 supports “point-to-point” applications.
That is, one Primary device and one Secondary device.
The MCP2150 operates as a Secondary device. It does
not support “multi-point” applications.
Sending data using IR light requires some hardware
and the use of specialized communication protocols.
These protocol and hardware requirements are
described, in detail, by the IrDA standard specifications. The encoding/decoding functionality of the
MCP2150 is designed to be compatible with the physical layer component of the IrDA standard. This part of
the standard is often referred to as “IrPHY”.
The complete IrDA standard specifications are available for download from the IrDA website
(www.IrDA.org).
2002 Microchip Technology Inc.Preliminary
DS21655B-page 3
MCP2150
1.1Applications
The MCP2150 Infrared Communications Controller
supporting the IrDA standard provides embedded system designers the easiest way to implement IrDA standard wireless connectivity. Figure 1-1shows a typical
application block diagram. Table 1-2 shows the pin
definitions.
TABLE 1-1:OVERVIEW OF FEATURES
FeaturesMCP2150
Serial CommunicationsUART, IR
Baud Rate SelectionHardware
Low Power ModeYes
Resets (and Delays)RESET
Packages18-pin DIP, SOIC,
, POR
(PWRT and OST)
20-pin SSOP
Infrared communication is a wireless two-way data
connection, using infrared light generated by low-cost
transceiver signaling technology. This provides reliable
communication between two devices.
Infrared technology offers:
• Universal standard for connecting portable
computing devices
• Easy, effortless implementation
• Economical alternative to other connectivity
solutions
• Reliable, high-speed connection
• Safe to use in any environment (can even be
used during air travel)
• Eliminates the hassle of cables
• Allows PCs and other electronic devices (such as
PDAs, cell phones, etc.) to communicate with
each other
• Enhances mobility by allowing users to easily
connect
The MCP2150 allows the easy addition of IrDA standard wireless connectivity to any embedded application that uses serial data. Figure 1-1 shows typical
implementation of the MCP2150 in an embedded
system.
The IrDA protocols for printer support are not included
in the IrCOMM 9-wire “cooked” service class.
FIGURE 1-1:SYSTEM BLOCK DIAGRAM
Host Controller
(Microcontroller)
TX
UART
RX
EN
BAUD1
BAUD0
RTS
CTS
DSR
DTR
CD
RI
TX
RX
MCP2150
Encode
Power Down
Logic
Decode
Baud Rate
Generator
UART
Control
TXIR
RXIR
Optical
Transceiver
TXD
RXD
DS21655B-page 4
Preliminary 2002 Microchip Technology Inc.
TABLE 1-2:PIN DESCRIPTIONS
MCP2150
Pin Name
BAUD0111ISTBAUD1:BAUD0 specify the baud rate of the device.
TXIR222O—Asynchronous transmit to Infrared transceiver.
RXIR333ISTAsynchronous receive from Infrared transceiver.
444ISTResets the device.
RESET
SS555, 6—PGround reference for logic and I/O pins.
V
EN667ITTLDevice enable.
TX778ITTLAsynchronous receive; from Host Controller UART.
RX889O—Asynchronous transmit; to Host Controller UART.
RI9910——Ring Indicator. The value on this pin is driven high.
DSR101011O—Data Set Ready. Indicates that the MCP2150 has completed
DTR111112ITTLData Terminal Ready. The value of this pin is ignored once
CTS121213O—Clear to Send. Indicates that the MCP2150 is ready to
RTS131314ITTLRequest to Send. Indicates that a Host Controller is ready to
V
DD
141415, 16—PPositive supply for logic and I/O pins.
CD171719O—Carrier Detect. Indicates that the MCP2150 has established a
BAUD1181820ISTBAUD1:BAUD0 specify the baud rate of the device.
Legend:TTL = TTL compatible input
I = Input
P = Power
Pin Number
PDIP SOIC SSOP
Pin
Buffer
Type
Type
1 = Device is enabled.
0 = Device is disabled (low power). MCP2150 only monitors
this pin when in the NDM state.
reset.
1 = MCP2150 is initialized.
0 = MCP2150 is not initialized.
the MCP2150 is initialized. It is recommended that this pin be
connected so that the voltage level is either V
device power up, this signal is used with the RTS signal to
enter device ID programming.
1 = Enter Device ID programming mode (if RTS is cleared).
0 = Do not enter Device ID programming mode.
receive data from the Host Controller.
1 = Host Controller should not send data.
0 = Host Controller may send data.
receive data from the MCP2150. The MCP2150 prepares to
send data, if available.
1 = Host Controller not ready to receive data.
0 = Host Controller ready to receive data.
At device power up, this signal is used with the DTR signal to
enter device ID programming.
1 = Do not enter Device ID programming mode.
0 = Enter Device ID programming mode (if DTR is set).
valid link with a Primary Device.
1 = An IR link has not been established (No IR Link).
0 = An IR link has been established (IR Link).
ST = Schmitt Trigger input with CMOS levels
O = Output
CMOS = CMOS compatible input
Description
SS or VCC. At
2002 Microchip Technology Inc.Preliminary
DS21655B-page 5
MCP2150
1.1.1SIGNAL DIRECTIONS
Table 1-3 shows the direction of the MCP2150 signals.
The MCP2150 is designed for use in Data Terminal
Equipment (DTE) applications.
TABLE 1-3:MCP2150 S IGNAL DIRECTION
DB-9
Pin No.
Legend: HC = Host Controller
Note 1: This signal is not implemented in the MCP2150.
SignalDirectionComment
1CDMCP2150 → HCCarrier Detect
2RXMCP2150 → HCReceived Data
3TXHC → MCP2150Transmit Data
4DTR
5GND—Ground
6DSRMCP2150 → HCData Set Ready
7RTSHC → MCP2150R equest to Send
8CTSMCP2150 → HCClear to Send
9RI
(1)
(1)
—Ring Indicator
—Data Terminal
Ready
DS21655B-page 6
Preliminary 2002 Microchip Technology Inc.
MCP2150
2.0DEVICE OPERATION
The MCP2150 is a cost effective, low pin count (18pin), easy to use device for implementing IrDA standard wireless connectivity. The MCP2150 provides
support for the IrDA standard protocol “stack” plus bit
encoding/decoding. The Serial interface and IR baud
rates are independantly selectable.
2.1Power Up
Any time the device is powered up (parameter D003),
the Power Up Timer delay (parameter 33) occurs, followed by an Oscillator Start-up Timer (OST) delay
(parameter 32). Once these delays complete, communication with the device may be initiated. This communication is from both the infrared transceiver’s side as
well as the controller’s UART interface.
2.2Device Reset
The MCP2150 is forced into the reset state when the
RESET
pin is in the low state. Once the RESET pin is
brought to a high state, the Device Reset sequence
occurs. Once the sequence completes, functional
operation begins.
2.3Clock Source
The MCP2150 requires a clock source to operate. The
frequency of this clock is 11.0592 MHz (electrical specification parameter 1A). This clock can be supplied by
either a crystal/resonator or as an external clock input.
2.3.1CRYSTAL OSCILLATOR / CERAMIC
RESONATORS
A crystal or ceramic resonator can be connected to the
OSC1 and OSC2 pins to establish oscillation
(Figure 2-1). The MCP2150 oscillator design requires
the use of a parallel cut crystal. Use of a series cut crystal may give a frequency outside of the crystal
manufacturers specifications.
FIGURE 2-1:CRYSTAL OPERATION
(OR CERAMIC
RESONATOR)
TABLE 2-1:CAPACITOR SELECTION FOR
CERAMIC RESONATORS
FreqOSC1 (C1)OSC2 (C2)
11.0592 MHz10 - 22 pF10 - 22 pF
Higher capacitance increases the stability of the oscillator but also increases the start-up time. These values are for design guidance only. Since each
resonator has its own characteristics, the user should
consult the resonator manufacturer for appropriate
values of external components.
TABLE 2-2:CAPACITOR SELECTION FOR
CRYSTAL OSCILLATOR
FreqOSC1 (C1) OSC2 (C2)
11.0592 MHz15 - 30 pF15 - 30 pF
Higher capacitance increases the stability of the oscillator but also increases the start-up time. These values are for design guidance only. R
to avoid overdriving crystals with low drive level specification. Since each crystal has its own
characteristics, the user should consult the crystal
manufacturer for appropriate values of external
components.
S may be required
2.3.2EXTERNAL CLOCK IN
For applications where a clock is already available
elsewhere, users may directly drive the MCP2150 provided that this external clock source meets the AC/DC
timing requirements listed in Section 4.3. Figure 2-2
shows how an external clock circuit should be
configured.
FIGURE 2-2:EXTERNAL CLOCK INPUT
OPERATION
Clock From
external
system
Open
OSC1
MCP2150
OSC2
OSC1
C1
XTAL
OSC2
RS
Note
C2
See Tab le 2 -1 and Tab le 2- 2 for recommended values of
C1 and C2.
Note:A series resistor may be required for AT
strip cut crystals.
2002 Microchip Technology Inc.Preliminary
RF
To internal
logic
MCP2150
DS21655B-page 7
MCP2150
2.4Bit Clock
The device crystal is used to derive the communication
bit clock (BITCLK). There are 16 BITCLKs for each bit
time. The BITCLKs are used for the generation of the
start bit and the eight data bits. The stop bit uses the
BITCLK when the data is transmitted (not for
reception).
This clock is a fixed frequency and has minimal
variation in frequency (specified by crystal
manufacturer).
2.5UART Interface
The UART interface communicates with the "controller". This interface is a half duplex interface, meaning
that the system is either transmitting or receiving, but
not both simultaneously.
2.5.1BAUD RATE
The baud rate for the MCP2150 serial port (the TX and
RX pins) is configured by the state of the BAUD1 and
BAUD0 pins. These two device pins are used to select
the baud rate at which the MCP2150 will transmit and
receive serial data (not IR data). Table 2-3 shows the
baud rate configurations.
TABLE 2-3:SERIAL BAUD RATE
SELECTION VS. FREQUENCY
BAUD1:BAUD0
009600F
0119200F
1057600F
11115200F
Baud Rate @
11.0592 MHz
Bit Rate
OSC / 1152
OSC / 576
OSC / 192
OSC / 96
2.5.2TRANSMITTING
When the controller sends serial data to the MCP2150,
the controller’s baud rate is required to match the baud
rate of the MCP2150’s serial port.
2.5.3RECEIVING
When the controller receives serial data from the
MCP2150, the controller’s baud rate is required to
match the baud rate of the MCP2150’s serial port.
DS21655B-page 8
Preliminary 2002 Microchip Technology Inc.
MCP2150
2.6Modulation
The data that the MCP2150 UART received (on the TX
pin) that needs to be transmitted (on the TXIR pin) will
need to be modulated. This modulated signal drives the
IR transceiver module. Figure 2-3 shows the encoding
of the modulated signal.
Note:The signal on the TXIR pin does not actu-
ally line up in time with the bit value that
was transmitted on the TX pin, as shown in
Figure 2-3. The TX bit value is shown to
represent the value to be transmitted on
the TXIR pin.
Each bit time is comprised of 16-bit clocks. If the value
to be transmitted (as determined by the TX pin) is a
logic low, then the TXIR pin will output a low level for
7-bit clock cycles, a logic high level for 3-bit clock
cycles or a minimum of 1.6 µsec. (see parameter
IR121). The remaining 6-bit clock cycles will be low. If
the value to transmit is a logic high, then the TXIR pin
will output a low level for the entire 16-bit clock cycles.
FIGURE 2-3:ENCODING
2.7Demodulation
The modulated signal (data) from the IR transceiver
module (on RXIR pin) needs to be demodulated to form
the received data (on RX pin). Once demodulation of
the data byte occurs, the data that is received is transmitted by the MCP2150 UART (on the RX pin).
Figure 2-4 shows the decoding of the modulated
signal.
Note:The signal on the RX pin does not actually
line up in time with the bit value that was
received on the RXIR pin, as shown in
Figure 2-4. The RXIR bit value is shown to
represent the value to be transmitted on
the RX pin.
Each bit time is comprised of 16-bit clocks. If the value
to be received is a logic low, then the RXIR pin will be
a low level for the first 3-bit clock cycles or a minimum
of 1.6 µs. The remaining 13-bit clock cycles (or difference up to the 16-bit clock time) will be high. If the value
to be received is a logic high, then the RXIR pin will be
a high level for the entire 16-bit clock cycles. The level
on the RX pin will be in the appropriate state for the
entire 16 clock cycles.
Start BitData bit 0Data bit 1Data bit 2Data bit ...
16 CLK
BITCLK
TX Bit
Value
TXIR
7 CLK
24 Tosc
010001
FIGURE 2-4:DECODING
Start BitData bit 0Data bit 1Data bit 2Data bit ...
16 CLK
BITCLK
(CLK)
RXIR Bit
Valu e
RX
≥ 1.6 µs (up to 3 CLK)
16 CLK16 CLK16 CLK16 CLK16 CLK16 CLK
≥ 13 CLK
010001
2002 Microchip Technology Inc.Preliminary
DS21655B-page 9
MCP2150
2.8Minimizing Power
The device can be placed in a low power mode by disabling the device (holding the EN pin at the low state).
The internal state machine is monitoring this pin for a
low level and, once this is detected, the device is
disabled and enters into a low power state.
2.8.1RETURNING TO DEVICE
OPERATION
When disabled, the device is in a low power state.
When the EN pin is brought to a high level, the device
will return to the operating mode. The device requires
a delay of 1024 T
or received.
FIGURE 2-5:ISO REFERENCE LAYER MODEL
OSC before data may be transmitted
OSI REFERENCE LAYERS
Application
Presentation
Session
Transport
Network
Data Link Layer
2.9Network Layering Reference
Model
Figure 2-5 shows the ISO Network Layering Reference
Model. The shaded areas are implemented by the
MCP2150, the cross-hatched area is implemented by
an infrared transceiver. The unshaded areas should be
implemented by the Host Controller.
Has to be implemented in Host
Controller firmware
(such as a PICmicro
microcontroller)
Regions implemented
by the MCP2150
Regions implemented
by the Optical Transceiver logic
®
LLC (Logical Link Control)
Acceptance Filtering
Overload Notification
Recovery Management
MAC (Medium Access Control)
Data Encapsulation/Decapsulation
Frame Coding (stuffing, destuffing)
Medium Access Management
Error Detection
Error Signalling
Acknowledgment
Serialization/Deserialization
Physical Layer
PLS (Physical Signalling)
Bit Encoding/Decoding
Bit Timing
Synchronization
PMA (Physical Medium Attachment)
Driver/Receiver Characteristics
MDI (Medium Dependent Interface)
Connectors
Supervisor
Fault
confinement
(MAC-LME)
Bus Failure
management
(PLS-LME)
DS21655B-page 10
Preliminary 2002 Microchip Technology Inc.
MCP2150
The IrDA standard specifies the following protocols:
• Physical Signaling Layer (PHY)
• Link Access Protocol (IrLAP)
• Link Management Protocol/Information Access
Service (IrLMP/IAS)
The IrDA data lists optional protocols. They are:
•Tiny TP
• IrTran-P
• IrOBEX
•IrLAN
•IrCOMM
•IrMC
•IrDA Lite
Figure 2-6 shows the IrDA data protocol stack and
which components are implemented by the MCP2150.
FIGURE 2-6:IRDA DATA - PROTOCOL
STACKS
IrTran-PIrObex IrLanIrMC
LM-IASTiny Transport Protocol (Tiny TP)
IR Link Management - Mux (IrLMP)
IR Link Access Protocol (IrLAP)
Asynchronous
Serial IR
(9600 -115200 b/s)
Supported by
the MCP2150
(2)
Synchronous
IrComm
Serial IR
(1.152 Mb/s)
Optional IrDA data
protocols not
supported by
the MCP2150
(1)
Synchronous
4 PPM
(4 Mb/s)
2.9.1IrDA DATA PROTOCOLS
SUPPORTED BY MCP2150
The MCP2150 supports these required IrDA standard
protocols:
• Physical Signaling Layer (PHY)
• Link Access Protocol (IrLAP)
• Link Management Protocol/Information Access
Service (IrLMP/IAS)
The MCP2150 also supports some of the optional protocols for IrDA data. The optional protocols that the
MCP2150 implements are:
•Tiny TP
•IrCOMM
2.9.1.1Physical Signal Layer (PHY)
The MCP2150 provides the following Physical Signal
Layer specification support:
• Bidirectional communication
• Data Packets are protected by a CRC
- 16-bit CRC for speeds up to 115.2 kbaud
• Data Communication Rate
- 9600 baud minimum data rate
The following Physical Layer Specification is dependant on the optical transceiver logic used in the
application. The specification states:
• Communication Range, which sets the end user
expectation for discovery, recognition and performance.
- Continuous operation from contact to at least
1 meter (typically 2 meters can be reached)
- A low power specification reduces the objective for operation from contact to at least
20 cm (low power and low power) or 30 cm
(low power and standard power).
Note 1: The MCP2155 implements the 9-wire
“cooked" service class serial replicator.
2: An optical transceiver is required.
2002 Microchip Technology Inc.Preliminary
DS21655B-page 11
MCP2150
2.9.1.2IrLAP
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 transmit and receive at the same time. The receiver has to
wait for the transmitter to finish sending. This is sometimes 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
Host O.S. or Application
IrCOMM
IrLMP – IAS
IrLAP
Protocols
resident in
MCP2150
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 status, data or commands. The IrLAP protocol has a command 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.
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.
FIGURE 2-8:IRLAP FRAME
IrPHY
IR pulses
transmitted
and
received
X BOFs BOF A CFCSIEOF
2
(1+N) of C0h payload
In addition to defining the frame structure, IrLAP provides 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.
bytes
C1h
DS21655B-page 12
Preliminary 2002 Microchip Technology Inc.
MCP2150
2.9.1.3IrLMP
The MCP2150 implements the IrLMP protocol. The
IrLMP protocol provides:
• Multiplexing of the IrLAP layer. This allows multiple channels above an IrLAP connection.
• Protocol and service discovery. This is via the
Information Access Service (IAS).
When two devices that contain the IrDA standard feature are connected, there is generally one device that
has something to do and the other device that has the
resource to do it. For example, a laptop may have a job
to print and an IrDA standard compatible printer has the
resources to print it. In IrDA standard terminology, the
laptop is a Primary device and the printer is the Secondary device. When these two devices connect, the
Primary device must determine the capablities of the
Secondary device to determine if the Secondary device
is capable of doing the job. This determination is made
by the Primary device asking the Secondary device a
series of questions. Depending on the answers to
these questions, the Primary device may or may not
elect to connect to the Secondary device.
The queries from the Primary device are carried to the
Secondary device using IrLMP. The responses to these
queries can be found in the Information Access Service
(IAS) of the Secondary device. The IAS is a list of the
resources of the Secondary device. The Primary
device compares the IAS responses with its requirements and then makes the decision if a connection
should be made.
The MCP2150 identifies itself to the Primary device as
a modem.
2.9.1.4Link Management - Information
Access Service (LM-IAS)
The MCP2150 implements the LM-IAS. Each LM-IAS
entity maintains an information database to provide:
• Information on services for other devices that
contain the IrDA standard feature (Discovery).
• Information on services for the device itself.
• Remote accessing of another device’s information
base.
This is required so that clients on a remote device can
find configuration information needed to access a
service.
2.9.1.5Tiny TP
Tiny TP provides the flow control on IrLMP connections. An optional service of Segmentation and
Reassembly can be handled.
2.9.1.6IrCOMM
IrCOMM provides the method to support serial and parallel port emulation. This is useful for legacy COM
applications, such as printers and modem devices.
The IrCOMM standard is just a syntax that allows the
Primary device to consider the Secondary device as a
serial device. IrCOMM allows for emulation of serial or
parallel (printer) connections of various capabilities.
The MCP2150 supports the 9-wire “cooked” service
class of IrCOMM. Other service classes supported by
IrCOMM are shown in Figure 2-9.
Note:The MCP2150 identifies itself as a modem
to ensure that it is identified as a serial
device with a limited amount of memory.
The MCP2150 is not a modem, and the non-data circuits are not handled in a modem fashion.
FIGURE 2-9:IRCOMM SERVICE CLASSES
IrCOMM Services
Uncooked ServicesCooked Services
ParallelSerial
IrLPT
Supported by MCP2150
3-wire Raw
Parallel
Centronics
IEEE 1284
Serial
3-wire Cooked
9-wire Cooked
2002 Microchip Technology Inc.Preliminary
DS21655B-page 13
MCP2150
2.9.2OTHER OPTIONAL IrDA DATA
PROTOCOLS
Other IrDA data protocols have been developed to specific application requirements. These optional protocols
are not supported by the MCP2150. These IrDA data
protocols are briefly described in the following sub-sections. For additional information, please refer to the
IrDA website (www.IrDA.org).
2.9.2.1IrTran-P
IrTran-P provides the protocol to exchange images with
digital image capture devices/cameras.
2.9.2.2IrOBEX
IrOBEX provides OBject EXchange services. This is
similar to HTTP.
2.9.2.3IrLAN
IrLAN describes a protocol to support IR wireless
access to a Local Area Network (LAN).
2.9.2.4IrMC
IrMC describes how mobile telephony and communication devices can exchange information. This information includes phonebook, calender and message data.
Also how call control and real-time voice are handled
(RTCON).
2.9.2.5IrDA Lite
IrDA Lite describes how to reduce the application code
requirements, while maintaining compatibility with the
full implementation.
DS21655B-page 14
Preliminary 2002 Microchip Technology Inc.
MCP2150
2.9.3HOW DEVICES CONNECT
When two devices implementing the IrDA standard feature establish a connection using the IrCOMM protocol,
the process is analogous to connecting two devices
with serial ports using a cable. This is referred to as a
"point-to-point" connection. This connection is limited
to half-duplex operation because the IR transceiver
cannot transmit and receive at the same time. The purpose of the IrDA protocol is to allow this half-duplex link
to emulate, as much as possible, a full-duplex connection. In general, this is done by dividing the data into
“packets”, or groups of data. These packets can then
be sent back and forth, when needed, without risk of
collision. The rules of how and when these packets are
sent constitute the IrDA protocols. The MCP2150 supports elements of this IrDA protocol to communicate
with other IrDA standard compatible devices.
When a wired connection is used, the assumption is
made that both sides have the same communications
parameters and features. A wired connection has no
need to identify the other connector because it is
assumed that the connectors are properly connected.
In the IrDA standard, a connection process has been
defined to identify other IrDA compatible devices and
establish a communication link. There are three steps
that these two devices go through to make this
connection. They are:
• Normal Disconnect Mode (NDM)
• Discovery Mode
• Normal Connect Mode (NCM)
Figure 2-10 shows the connection sequence.
2.9.3.1Normal Disconnect Mode (NDM)
When two IrDA standard compatible devices come into
range they must first recognize each other. The basis
of this process is that one device has some task to
accomplish and the other device has a resource
needed to accomplish this task. One device is referred
to as a Primary device and the other is referred to as a
Secondary device. This distinction between Primary
device and Secondary device is important. It is the
responsibility of the Primary device to provide the
mechanism to recognize other devices. So the Primary
device must first poll for nearby IrDA standard compatible devices. During this polling, the defaut baud rate of
9600 baud is used by both devices.
For example, if you want to print from an IrDA
equipped laptop to an IrDA printer, utilizing the IrDA
standard feature, you would first bring your laptop in
range of the printer. In this case, the laptop is the one
that has something to do and the printer has the
resource to do it. The laptop is called the Primary
device and the printer is the Secondary device. Some
data-capable cellphones have IrDA standard infrared
ports. If you used such a cellphone with a Personal Dig-
ital Assistant (PDA), the PDA that supports the IrDA
standard feature would be the Primary device and the
cellphone would be the Secondary device.
When a Primary device polls for another device, a
nearby Secondary device may respond. When a Secondary device responds, the two devices are defined to
be in the Normal Disconnect Mode (NDM) state. NDM
is established by the Primary device broadcasting a
packet and waiting for a response. These broadcast
packets are numbered. Usually 6 or 8 packets are sent.
The first packet is number 0, the last packet is usually
number 5 or 7. Once all the packets are sent, the Primary device sends an ID packet, which is not numbered.
The Secondary device waits for these packets and then
responds to one of the packets. The packet it responds
to determines the “time slot” to be used by the Secondary device. For example, if the Secondary device
responds after packet number 2, then the Secondary
device will use time slot 2. If the Secondary device
responds after packet number 0, then the Secondary
device will use time slot 0. This mechanism allows the
Primary device to recognize as many nearby devices
as there are time slots. The Primary device will continue to generate time slots and the Secondary device
should continue to respond, even if there’s nothing to
do.
Note 1: The MCP2150 can only be used to
implement a Secondary device.
2: The MCP2150 supports a system with
only one Secondary device having exclusive use of the IrDA standard infrared link
(known as "point-to-point" communication).
3: The MCP2150 always responds to packet
number 2. This means that the MCP2150
will always use time slot 2.
4: If another Secondary device is nearby,
the Primary device may fail to recognize
the MCP2150, or the Primary device may
not recognize either of the devices.
During NDM, the MCP2150 handles all of the
responses to the Primary device (Figure 2-10) without
any communication with the Host Controller. The Host
Controller is inhibited by the CTS signal of the
MCP2150 from sending data to the MCP2150.
2002 Microchip Technology Inc.Preliminary
DS21655B-page 15
MCP2150
2.9.3.2Discovery Mode
Discovery mode allows the Primary device to determine the capabilities of the MCP2150 (Secondary
device). Discovery mode is entered once the MCP2150
(Secondary device) has sent an XID response to the
Primary device and the Primary device has completed
sending the XIDs and then sends a Broadcast ID. If this
sequence is not completed, then a Primary and
Secondary device can stay in NDM indefinitely.
When the Primary device has something to do, it
initiates Discovery. Discovery has two parts. They are:
• Link initialization
• Resource determination
The first step is for the Primary and Secondary devices
to determine, and then adjust to, each other’s hardware
capabilities. These capabilities are parameters like:
• Data rate
• Turn around time
• Number of packets without a response
• How long to wait before disconnecting
Both the Primary and Secondary device begin communications at 9600 baud, which is the default baud rate.
The Primary device sends its parameters, then the
Secondary device responds with its parameters. For
example, if the Primary supports all data rates up to
115.2 kbaud and the Secondary device only supports
19.2 kbaud, the link will be established at 19.2 kbaud.
Note:The MCP2150 is limited to a data rate of
115.2 kbaud.
Once the hardware parameters are established, the
Primary device must determine if the Secondary device
has the resources it requires. If the Primary device has
a job to print, then it must know if it’s talking to a printer,
not a modem or other device. This determination is
made using the Information Access Service (IAS). The
job of the Secondary device is to respond to IAS queries made by the Primary device. The Primary device
must ask a series of questions like:
• What is the name of your service?
• What is the address of this service?
• What are the capabilities of this device?
When all the Primary device’s questions are answered,
the Primary device can access the service provided by
the Secondary device.
During Discovery mode, the MCP2150 handles all
responses to the Primary device (see Figure 2-10)
without any comm unication with the Host Controller.
The Host Controller is inhibited by the CTS signal of the
MCP2150 from sending data to the MCP2150.
2.9.3.3Normal Connect Mode (NCM)
Once discovery has been completed, the Primary
device and MCP2150 (Secondary device) can freely
exchange data.
The MCP2150 can receive IR data or serial data, but
not both simultaneously. The MCP2150 uses a hardware handshake to stop the local serial port from
sending data while the MCP2150 is receiving IR data.
Note:Data loss will result if this hardware
handshake is not observed.
Both the Primary device and the MCP2150 (Secondary
device) check to make sure that data packets are
received by the other without errors. Even when data is
required to be sent, the Primary and Secondary
devices will still exchange packets to ensure that the
connection hasn’t, unexpectedly, been dropped. When
the Primary device has finished, it then transmits the
close link command to the MCP2150 (Secondary
device). The MCP2150 will confirm the close link command and both the Primary device and the MCP2150
(Secondary device) will revert to the NDM state.
Note:If the NCM mode is unexpectedly termi-
nated for any reason (including the Primary
device not issuing a close link command),
the MCP2150 will revert to the NDM state
10 seconds after the last frame has been
received.
It is the responsability of the Host Controller program to
understand the meaning of the data received and how
the program should respond to it. It’s just as if the data
were being received by the Host Controller from a
UART.
DS21655B-page 16
Preliminary 2002 Microchip Technology Inc.
Loading...
+ 36 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.