ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

AN S-7600A/PIC16F877 JOURNEY


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

AN S-7600A/PIC16F877 JOURNEY

Lessons from the Trenches Part 4: Road Testing
by Fred Eady

Start ý Janis Joplin School of Programming ý Who or What is Perl? ý Setting Up the Server ý Applying What Weýve Learned ý Internet Engine Client Code ý Get on the ýNet ý Sources and PDF

INTERNET ENGINE CLIENT CODE

I told you in the beginning that the S-7600A/PIC16F877 Internet Engine can serve web pages, send e-mail, and talk to other hosts using standard Internet protocols. At that time, you probably didnýt expect to be able to do all of these things without rewriting the code every time you needed a different function. If you followed the first installments, you know that the code changes have been minimal and most of the code is reused from application to application. Well, thereýs been no change in that paradigm.

In the main code segment, the changes include bit twiddling to put the S-7600A in Client mode and writing a different port address to the S-7600A registers. The new client module begins at the comment Client Algorithm. Algorithm is a big word for a small amount of code. Basically, the client code is simpler than the Perl server code.

When the Internet Engine fires up the modem and makes a connection to the local ISP, the TCP/IP stack inside the S-7600A is called on to request a connection to the Linux server at 216.53.172.209 on Port 8080 decimal. When the TCP/IP handshaking is done and the connection is established, the Internet Engine sends a canned set of characters to the Linux serverýs Perl program. It then waits for the letters it sent to return. After it gets them, it prints them to the terminal screen and closes the socket. I sent the letters to spell out my name followed by a carriage return and linefeed. As you can see in Photo 1, it all worked as planned. The complete Internet Engine client code is provided for downloading.

Photo 1ýYou can put up to 256 characters into your Internet Engine code for transmission to the Florida-room Linux server. I sent a four-letter word, my name.

 

PREVIOUSNEXT


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.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ