![](http://datasheet.mmic.net.cn/Microchip-Technology/MCP2140A-I-P_datasheet_98944/MCP2140A-I-P_53.png)
2007-2011 Microchip Technology Inc.
DS22050B-page 53
MCP2140A
B.2
Discovery Mode
Discovery mode allows the primary device to determine
the capabilities of the MCP2140A (secondary device).
Discovery mode is entered once the MCP2140A (sec-
ondary device) has sent an XID response to the pri-
mary device and the primary device has completed
sending the XIDs and a Broadcast ID. If this sequence
is not completed, a primary and secondary device can
stay in NDM indefinitely.
When the primary device has something to do, it
initiates Discovery. Discovery has the following two
parts:
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
Turnaround time
Number of packets without a response
How long to wait before disconnecting
Both the primary and secondary devices begin commu-
nications at 9600 baud, which is the default baud rate.
The primary device sends its parameters and the sec-
ondary device responds with its parameters. For exam-
ple, if the primary device supports all data rates up to
115.2 kbaud and the secondary device only supports
9.6 kbaud, the link will be established at 9.6 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 que-
ries 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 MCP2140A handles all
out any communication with the host controller. The
host controller is inhibited by the CTS signal of the
MCP2140A from sending data to the MCP2140A.
B.3
Normal Connect Mode (NCM)
Once discovery has been completed, the primary
device and secondary device can freely exchange
data.
The MCP2140A uses a hardware handshake to stop
the local serial port from sending data when the
MCP2140A host UART receiving buffer is full.
Both the primary device and the MCP2140A (second-
ary 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 connec-
tion hasn’t, unexpectedly, been dropped. When the pri-
mary device has finished, it then transmits the close
link command to the MCP2140A (secondary device).
The MCP2140A will confirm the “close link” command
and both the primary device and the MCP2140A (sec-
ondary 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’s just as if the data
were being received by the host controller from a
UART.
B.3.1
PRIMARY DEVICE NOTIFICATION
The MCP2140A identifies itself to the primary device as
a modem.
However, the MCP2140A is not a modem, and the non-
data circuits are not handled in a modem fashion.
Note:
The MCP2140A is limited to a data rate of
9.6 kbaud.
Note:
Data loss will result if this hardware
handshake is not observed.
Note:
If the NCM mode is unexpectedly termi-
nated for any reason (including the pri-
mary device not issuing a close link
command), the MCP2140A will revert to
the NDM state after a time delay (after the
last frame has been received).
Note:
The MCP2140A identifies itself as a
modem to ensure that it is identified as a
serial device with a limited amount of
memory.