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

PDA 05  5/30/03  11:35 AM  Page 76
                                                     PDA Robotics
                          Normal 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. Both the pri-
                          mary 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 has not, unexpected-
                          ly, 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. It
                          is the responsibility of the host controller program to understand the
                          meaning of the data received and how the program should respond
                          to it. It is just as if the data were being received by the host controller
                          from a UART. Note: The MCP2150 is limited to a data rate of 115.2
                          kbaud.  Data  loss  will  result  if  this  hardware  handshake  is  not
                          observed. If the NCM mode is unexpectedly terminated for any rea-
                          son  (including  the  primary  device  not  issuing  a  close  link  com-
                          mand), the MCP2150 will revert to the NDM state 10 seconds after
                          the last frame has been received. Figure 5.28 shows the connection
                          sequence.


                          MCP2150 Operation
                          The MCP2150 emulates a null modem connection. The application on
                          the DTE device sees a virtual serial port. This serial port emulation is
                          provided by the IrDA standard protocols. The link between the DTE
                          device  and  the  embedded  application  is  made  using  the  MCP2150.
                          The connection between the MCP2150 and the embedded application
                          is wired as if there were a null modem connection.
                          The carrier detect (CD) signal of the MCP2150 is used to indicate that
                          a  valid  IrDA  standard  IR  link  has  been  established  between  the
                          MCP2150  and  the  primary  device.  The  CD  signal  should  be  moni-
                          tored closely to make sure that any communication tasks can be com-
                          pleted. The MCP2150 data signaling rate (DSR) signal indicates that

                          76
   95   96   97   98   99   100   101   102   103   104   105