|
Part 2: Revving It Up
by Fred Eady
Start ý Tera
Term Pro ý Road Test ý The
Hardware ý As a Web Server ý Branching
Out ý Making Changes ý ReadyýSet?
ý Go ý Sources
and PDF
READYýSET?
The modem is ready, but before you fire
off any phone numbers, the S-7600A must be told that PPP mode will
be used and the authentication method will be PAP. Then all of the
data entered into the EEPROM via the Menu function in Photo 4 (with
the exception of the phone number) is retrieved and placed into the
appropriate S-7600A registers. The username and password are written
into the S-7600A PAP string register. The length of the field precedes
the actual data. For instance, if the username is Fred, a 0x04 is
written to the PAP register first followed by Fred in consecutive
ASCII characters. When all of the user data is entered, a final NULL
character (0x00) is written to the PAP string register.
The next step is to issue the ATDT modem
command followed by the ISP phone number entered earlier. The PIC16F877
has control of the S-7600A UART and is responsible for issuing the
dial command. With some extra command work up front, you can configure
the US Robotics modem to give you result codes during the dial process.
I chose to simply wait for a connection, as the US Robotics modem
has a built-in speaker and I wonýt be putting this S-7600A/PIC16F877
Internet Engine out in the real world. I arbitrarily set the wait
time for 20 s, which should be long enough for a connection to be
established at 2400 bps. You should write some code to track modem
and line status if you plan to deploy your S-7600A/PIC16F877 Internet
Engine in the field.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |