19.08.2013 Views

AN2120: Connecting an M68HC08 Family Microcontroller to an ...

AN2120: Connecting an M68HC08 Family Microcontroller to an ...

AN2120: Connecting an M68HC08 Family Microcontroller to an ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Application Note<br />

In the on-line state, once a connection has been established with a<br />

modem of a remote system (for inst<strong>an</strong>ce, <strong>an</strong> ISP), the local modem<br />

enters the on-line state <strong>an</strong>d no longer attempts <strong>to</strong> interpret the data<br />

being sent <strong>to</strong> it. In other words, every data sent while on-line state is<br />

tr<strong>an</strong>smitted <strong>to</strong> the remote modem regardless of its nature. If the remote<br />

system h<strong>an</strong>gs up or for <strong>an</strong>y other reason the carrier signal is lost while<br />

in on-line state, the modem will revert <strong>to</strong> local comm<strong>an</strong>d mode.<br />

When the modem receives a comm<strong>an</strong>d (in comm<strong>an</strong>d mode), it returns a<br />

result code. This code c<strong>an</strong> be in the form of either a text string or a<br />

numeric code. A numeric code is more appropriate for embedded<br />

systems, but if we w<strong>an</strong>t <strong>to</strong> control the modem by using a terminal <strong>an</strong>d a<br />

keyboard, a verbose mode or text messages are more preferable. We<br />

c<strong>an</strong> set the type of result code by using a comm<strong>an</strong>d message.<br />

Table 5 shows the result codes of a Hayes-compatible modem.<br />

No.<br />

Verbose<br />

Equivalent<br />

Table 5. Result Codes Summary<br />

0 OK Comm<strong>an</strong>d executed<br />

1 CONNECT Connection established<br />

2 RING Ring signal detected<br />

Description<br />

3 NO CARRIER Carrier signal lost or not detected<br />

4 ERROR Invalid comm<strong>an</strong>d, checksum, error in comm<strong>an</strong>d line,<br />

or comm<strong>an</strong>d line <strong>to</strong>o long<br />

5 CONNECT 1200 Connection established at 1200 bps<br />

6 NO DIALTONE No dial <strong>to</strong>ne detected<br />

7 BUSY Busy signal detected<br />

8 NO ANSWER No response when dialing a system<br />

9 CONNECT 2400 Connection established at 2400 bps<br />

<strong>AN2120</strong><br />

34 MOTOROLA

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!