copyright 2003 by Jan Axelson. All rights reserved.
Published by Lakeview Research LLC
Cover by Rattray Design. Cover Photo by Bill Bilsley Photography. Index by Lucie Haskins
Lakeview Research LLC
5310 Chinook Ln. www.Lvr.com
Madison, WI 53704
Rights
All rights reserved. No part of this book except the programs and program listings may be reproduced in any form, or stored in a database or retrieval system, or transmitted or distributed in any form, by any means, electronic, mechanical photocopying, recording, or otherwise, without the prior written permission of Lakeview Research LLC or the author. The programs and program listings, or any portion of these, may be stored and executed in a computer system and may be incorporated into computer programs developed by the reader.
Warranty
The information, computer programs, schematic diagrams, documentation, and other material in this book are provided as is, without warranty of any kind, expressed or implied, including without limitation any warranty concerning the accuracy, adequacy, or completeness of the material or the results obtained from using the material. Neither the publisher nor the author shall be responsible for any claims attributable to errors, omissions, or other inaccuracies in the material in this book. In no event shall the publisher or author be liable for direct, indirect, special, incidental, or consequential damages in connection with, or arising out of, the construction, performance, or other use of the materials contained herein.
Trademarks
This book contains references to product designations that are claimed as trademarks. In all instances where Lakeview Research LLC was aware of a trademark claim, the product designation appears as requested by the trademark owner. All trademarks and registered trademarks in this book are the property of their respective holders.
ISBN 1-931448-01-9
Contents
Introduction
This is a guide to designing and programming embedded systems to communicate in local Ethernet networks and on the Internet.
An embedded system is a device that has computer intelligence and is dedicated to performing a single task, or a group of related tasks. Embedded systems often perform monitoring and control functions such as gathering and reporting sensor readings or controlling motors and switches. Theyre called embedded systems because the program code is an integral part of, or embedded in, the devices.
Ethernet is the networking technology used in many offices and homes to enable computers to communicate and share resources. Many Ethernet networks also connect to a router that provides access to the Internet.
For many years, embedded systems and Ethernet networks existed in separate worlds. Ethernet was available only to desktop computers and other large computers. Embedded systems that needed to exchange information with other computers were limited to interfaces with low speed, limited range, or lack of standard application protocols.
But developments in technology and the marketplace now make it possible for embedded systems to communicate in local Ethernet networks as well as on the Internet. Network communications can make an embedded system more powerful and easier to monitor and control. An embedded system can host a Web site, send and receive e-mail, upload and download files, and exchange information of any kind with other computers connected via a network interface.
One development that has made Ethernet feasible for embedded systems is the availability of inexpensive controller chips to handle the details of Ethernet communications. The CPUs that provide the processing power for embedded systems have also gotten faster and more capable of handling the demands of communicating with the controllers. Internet protocols provide standard, well-documented ways of exchanging data. Both Ethernet and the Internet protocols are free and open standards available for use without royalties or licensing fees.
Technologies and Protocols
Designing and programming an embedded system for networking can require skills and knowledge in a variety of areas in electronics, programming, and networking.
To interface an Ethernet controller to a CPU, youll need to know about hardware design.
To write the program code that controls the system, youll need to know how to write and debug code for your systems CPU.
To build the network, youll need to know how to select and use cables, repeater hubs, switches, and other network hardware.
To enable sending and receiving data over the local network, youll need to be familiar with the Ethernet protocol.
To enable sending and receiving data over the Internet and some local networks, youll need to be familiar with Internet protocols.
To serve Web pages, youll need to know about Web-page design.
To keep your system and its data safe, youll need to know how to implement measures that provide network security.
This book brings together all of these fields of knowledge with a focus on how they relate to the networking of embedded systems. Creating a Web page for a major corporations Web site is very different from creating a home page for a device with limited resources. But designing for small systems isnt just a matter of scaling back. For example, a Web page hosted by an embedded system will almost certainly want to display more than basic pages with static, unchanging text. Instead, the pages typically provide real-time information and may want to accept and act on user input as well.
This book shows how to meet the networking and application needs of embedded systems in spite of their hardware and software limitations of small devices. In many cases, you can choose to simplify the tasks involved by using hardware and software modules that do much of the work for you.
Who should read this book?
This book is for anyone who wants to design, program, or learn about networking with embedded systems.
These are some of the questions this book answers:
What are the advantages and limits of using Ethernet with embedded systems? Find out whether Ethernet is the right technology for your project.
What hardware and program code do I need to connect an embedded system to an Ethernet network? There are many options for creating an Ethernet-capable embedded controller, from buying a module with hardware and software support for networking to putting it all together from scratch. This book will help in selecting the components for your systems.
How do I build a network? An Ethernet-capable device cant communicate if it doesnt have a network to connect to. Find out how to select network cables and hubs and use them to put together an Ethernet network
How can I connect my device or network to the Internet? An Internet connection can extend a devices reach to the entire Internet. Find out how to obtain an Internet connection for your device and ensure that your network is configured to enable your device to perform the communications it requires.
How can my devices send and receive messages over the local network or the Internet? The Internet and many local networks use the TCP/IP suite of Internet protocols to send and receive messages of all types. This book will show you how embedded systems can use these protocols to exchange messages.
How can I host a Web site on my embedded system? Even a very basic embedded system can function as a Web server, which responds to requests from other computers for Web pages. Find out what a device requires to function as a Web server and how to create the pages your device will serve.
Next page