Page 93 - PDA Robotics Using Your Personal Digital Assistant to Control Your Robot
P. 93

PDA 05  5/30/03  11:35 AM  Page 69
                                                      Chapter 5 / The Electronics
                                 packets (or “frames”) of data to emulate data that would normally be
                                 free to stream back and forth.
                                 IRDA Standard Protocol Layers
                                 The IrLAP 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 mul-
                                 tiple 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 has a com-
                                 mand syntax of its own. These commands are part of the control byte.
                                 Last, IrLAP frames carry data. These data are 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 trans-
                                 mitted  least  signification  bit  (LSB)  first.  The  end  of  the  frame  is
                                 marked with an end of frame (EOF) character, which is always a 0xC1.
                                 The frame structure described here is used for all versions of IrDA pro-
                                 tocols used for serial wire replacement for speeds up to 115.2 kbaud.
                                 In addition to defining the frame structure, IrLAP provides the “house-
                                 keeping” 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. This is
                                 done during the handshaking phase when the PDA is connecting to
                                 PDA Robot.


                                 IrLMP.   The MCP2150 implements the IrLMP. The IrLMP provides:

                                 •    Multiplexing of the IrLAP layer. This allows multiple channels
                                      above an IrLAP connection.

                                 •    Protocol and service discovery via the IAS.
                                 When two devices that contain the IrDA standard feature are connected,
                                 generally one device has something to do and the other device has the

                                                                                                69
   88   89   90   91   92   93   94   95   96   97   98