Zibb

EDN Hands-On Project: Designing Web appliances on a shoestring

As designers ready progressively smaller embedded systems for the Web, the networking problem soon exceeds the application problem. Examine some guidelines for designing your next Internet appliance without breaking the project budget.

By Warren Webb, Technical Editor -- EDN, 4/13/2000

 
So far, you have seen only the tip of the networking iceberg. Billions of microprocessors are at work in intelligent devices worldwide, yet less than 1% of these microprocessors exchange data with other computers. To date, we have networked most of the desktop PCs, and we are starting down the food chain to smaller and smaller embedded systems. Our technology is on course for a world in which every embedded processor has Internet access. For now, recurring product costs limit our networking dreams.

Connected processors have sparked a revolution in our thinking, and designers and customers are pushing for embedded-system manufacturers to connect everything. The potential benefits to networking your product are enormous. You can minimize user-interface hardware and enable remote operation, software updates, troubleshooting, and performance monitoring. You can even increase the apparent performance of your product by offloading computing tasks to remote machines. Third-party electronic-commerce providers are also poised to deliver content to or collect data from your products.

The first task in designing an Internet connection is determining the network datapath. For example, your product may dial up a local Internet-service provider (ISP) through a built-in modem. If you have deployed your product in the vicinity of an Internet-connected local-area network, it may be cheaper to provide an Ethernet interface. Mobile products may reach the Internet through short-range (Bluetooth or infrared) or long-range (cellular or personal-communications-service) wireless links. Remote locations may require satellite communications to reach a network. With any luck, you can use the same type of datapath for each location in which you expect to deploy products. This project concerns the most common network connections: telephone lines and Ethernet.

Next, you need to pin down the networking functions. Your design may call for your product to simply send an e-mail to annunciate limit conditions or request service. A more complicated design serves dynamic Web pages to interface with a remote user using a PC-based browser. Each scenario requires a set of network-protocol libraries to reside in the embedded product's memory (Figure 1).

Secure and private

A networking specification is incomplete without details on security and privacy. Recent hacking attacks show that all networked computers are vulnerable. It is not enough to just connect to the Internet; you must include encryption, passwords, or other protection software to secure network data. Privacy is also a new network issue. Even if you aim to improve service or product design, you should not collect data from networked products without permission from the owner. You do not want to spend time and company resources battling privacy advocates.

Several off-the-shelf products promise to ease your connection to the Internet and conserve your budget. These products include drop-in modules, peripheral chips to reduce software complexity, a complete computer board to minimize development costs, and "software peripherals" to save recurrent costs. With a variety of low-cost networking techniques available, you should be able to find one that works for your next Internet-appliance project.

The lure of an off-the-shelf Web-enabled module with a serial interface is tempting. Changes to your product are limited to the software updates necessary to add the new data-exchange features. Hewlett-Packard's BFoot-10501 is a matchbook-sized smart module that includes an RS-232 port on one side and a 10BaseT Ethernet interface on the other (Figure 2). Software for the $240 (100) module includes a Web server for remote monitoring and control with any Internet browser. Optional $48 (100) time-synchronization software enables Ethernet-connected nodes to coordinate activities to within 200 nsec.

You cannot evaluate low-cost networking without considering the PC's network-interface card (NIC). A 10/100BaseT NIC in my PC cost me $15 at retail. A group of designers in La Jolla, CA, accepted the challenge of using NIC technology to develop a $25 Web server (Reference 1). The group's idea became Lightner Engineering's PicoWeb server. At only $79 each, the PicoWeb server serial-to-Ethernet module includes an Atmel 90S8515 8-bit microprocessor, a Realtek NE-2000 Ethernet chip, 8 kbytes of flash memory, and 16 kbytes of serial EEPROM (Figure 3).

Embedded e-mail

Without a local network and Ethernet, you will probably turn to standard telephone lines to connect to the Internet. Connect One offers the iModem complete embedded Internet-connectivity device, which combines the company's iChip peripheral chip with the Conexant Systems' SocketModem (Figure 4). You can use this product as an add-on to give a product dial-up Internet access. I ran some demonstration software on a stand-alone version of the iModem to send and receive e-mail. The user interface for the demonstration software was a simple DOS menu using a Hayes-compatible command set plus extensions for the iChip. For setup, the iModem communicates over an RS-232 serial link connected to the PC. You use the DOS program to set up the ISP phone number, log-in ID, password, and domain-name system of the ISP. You also need to store the Simple Mail Transfer-Protocol (SMTP) and Post Office Protocol 3 (POP3) server names, mailbox ID and password, and "to"and "cc" e-mail addresses for outgoing mail. The iModem retains setup information in nonvolatile flash memory. Following setup of the iModem, you can disconnect from the PC, move to the embedded system, and send or retrieve e-mails with a simple microprocessor command. The embedded iModem requires 5V dc from the host system and responds to commands to run the Point to Point Protocol (PPP), User Datagram Protocol (UDP), Transmission Control Protocol/Internet Procotol (TCP/IP), SMTP, POP3, and Multipurpose Internet Mail extensions (MIME) protocol for sending and receiving e-mail messages. The current version of iModem does not include the Hypertext Transfer Protocol (HTTP) or File Transfer Protocol (FTP), so you cannot use it as a Web server. The iModem lets you remotely update all the internal protocols as they change. The 2400-bps version of the embedded iModem costs $110 (1000).

Designing your Internet appliance from scratch allows you the most flexibility. You can select a processor with enough power to support the application and the networking tasks. Most commercial real-time operating systems (RTOSs) include networking-protocol modules, so your job is to design the hardware, write the application code, and make everything work together. A new design has the potential to yield the lowest recurring cost but with substantial, nonrecurring development and integration costs. Because this hands-on project emphasizes low-budget approaches to Internet access, I investigated the current state of 8-bit processor networking.

EmWare pioneered one of the earliest approaches to minimizing the size and cost of network nodes. Its embedded-micro-internetworking-technology (EMIT) software enables local 8- and 16-bit microprocessors to exchange data over simple serial networks and link to the Internet through a gateway PC. The royalty-free Web-server software required in each node microprocessor occupies a little as 1kbyte of ROM. The emGateway software for the PC translates the serial data from each node to Internet-compatible TCP/IP packets. An EMIT development kit, which includes host PC and target software along with prototype hardware, costs $3995. Under the terms of a recent infrastructure agreement, AT&T will host emGateway software on AT&T's global network ISP servers to enable low-cost processors with a modem to dial directly into the AT&T network and gain access to the Internet. This approach will reduce the cost of gateway software but will likely boost ISP fees.

At the low end of the price scale are 8-bit microprocessors with a growing list of networking capabilities. Except for the emWare approach, which concentrates the network complexity on a gateway PC, many designers feel that networking with an 8-bit microprocessor is unrealistic. However, Microchip Technology has demonstrated a microprocessor PPP connection to an ISP (Reference 2). The demonstration hardware consists of a PIC16C63 interfaced to an external modem via a serial connection. The software dials the ISP, negotiates a PPP connection, and pings every 30 sec to keep the connection open. The 2-kbyte algorithm includes IP but not TCP, so you cannot use e-mail, HTTP Web pages, or FTP.

Budget MIPS

Semiconductor vendor Scenix provides an extensive Internet-networking package for its 8-bit processors. I spent a long time investigating the networking capabilities of the $5 (10,000) SX52 communications controller. The four-stage-pipeline SX52 RISC architecture executes one instruction per cycle for performance approaching 50 MIPS. The processor's memory complement includes 262 bytes of SRAM for data and 4096 12-bit words of high-speed flash memory for programs. Scenix processors also have a long list of hardware capabilities, including a jitter-free, three-cycle internal-interrupt response that enables deterministic task switching. The most important networking feature it includes is the online library of virtual peripherals.

Scenix virtual peripherals are software modules that take advantage of the processor architecture and speed to replace external support chips. For example, the UART is easy to visualize. An interrupt-driven routine that buffers data, converts parallel bytes to serial, and clocks the output pin at a precise data rate simulates the output functions of an external UART chip. Scenix lists more than 40 no-charge, no-royalty virtual peripherals in its Web library, which covers modems, serial interfaces, networking, keyboard/display interfaces, and D/A and A/D converters. Specifications for each library item include memory size, I/O pins, and the percentage of processor performance that the peripheral consumes. You can easily mix and match peripherals and retain the CPU performance necessary for your application. Scenix expects third-party vendors to also offer fee-based virtual peripherals.

Scenix microprocessor-development tools are available from several sources. Advanced Transdata offers a $300 debugger and a $69 SXDemo52 prototyping board. Parallax, which targets the hobbyist market, offers a wide selection of Scenix development tools and online documentation. Parallax's SX-Key development system takes advantage of the Scenix simplified flash-programming and -debugging interface. With a two-pin interface (plus power and ground), you can reprogram memory and single-step through your program. The 0.5×1.7-in. Parallax SX-Key programmer device connects to the host PC via a serial cable and plugs into a four-pin connector on the target board. You can purchase the SX-Key programmer, a small prototyping board for Scenix SX28 processors, and development tools (an assembler, a debugger, and documentation) from Parallax for $149 (Figure 5).

My interest in Scenix virtual peripherals centers on SX-Stack, which is a complete TCP/IP stack and physical-layer interface, including PPP, IP, ICMP, UDP, TCP, SMTP, POP3, and HTTP. I used the Scenix SXB-TCP01 evaluation board to download two prepackaged virtual-peripheral integrations that demonstrate e-mail and Web-server applications. The evaluation board includes 32 kbytes of external EEPROM to store Web pages for the server. I had no trouble setting up a PPP connection to a PC and viewing Web pages or e-mail from the SX52 chip, but I could not connect directly to my ISP because the demonstration software did not include a modem. Today, the SX-Stack requires an external modem to connect to the Internet. According to Chris Waters, a development engineer at Scenix, the currently available V.23 software modem is too slow for successful PPP negotiation. A faster 1200-bps, full-duplex modem will be available this year to complete the networking package. Along with the higher speed modem, Scenix is also developing an Ethernet virtual peripheral and a 100-MIPS processor.

Twin iChips

An alternative approach for new designs is to add a peripheral chip that handles the networking load. This technique simplifies the application software and may eliminate the need for an RTOS, but it comes with higher hardware costs. Connect One's $25 (1000) iChip is an element of the company's embedded iModem and contains the protocols to add e-mail capability to your product. You need an external modem to dial up an ISP. Seiko offers an Internet chip with the same name. (The lawyers will have fun with that situation.) Seiko's $8 (1000) S7600A iChip also requires an external physical-layer interface, such as a modem. Seiko also has a software-development kit for the S7600A that includes an ISA-bus board with a large prototyping area and two iChips (Figure 6). The Seiko software developer's kit costs $199.

If you are starting your design from scratch and would like to buy the hardware and networking library so that you can concentrate on value-added application software, look at the NetBurner from the company with the same name. The $499 NetBurner Network development kit includes a stand-alone single-board computer, complete networking software, and the development tools to create your application. A 40-MHz Motorola ColdFire 5206e CPU powers the CFV2-40 single-board computer, which includes 4 Mbytes of DRAM, a 512-kbyte flash memory, two RS-232 ports, and a 10BaseT Ethernet interface. NetBurner claims that the kit allows you to set up your network in one day. In fact, I set up the hardware, installed the development software, compiled one of the sample applications, and created an Ethernet Web server in about two hours. Of course, I spent the rest of the day creating my own extensions. You can start developing your application code on the first day. The hardware setup is a serial cable from the PC to the single-board computer for flash programming, a 12V plug-in adapter for power, and an Ethernet connection to the network. Everything you need to create a network node, including an Ethernet crossover cable so you can connect directly to a PC's NIC without a hub, is in the kit. The NetBurner software includes the full source code for a TCP/IP stack, a Web server, an RTOS, and a debugging monitor. Plenty of application examples demonstrate how to interface with the supplied software. The development kit also includes the Gnu tool set, a C/C compiler, and flash-memory-downloading tools.

One of the NetBurner examples is a Web server displaying single-board-computer LEDs and switches. You can change the state of the LEDs and read the switches from any Web browser on the network or worldwide if your network is bridged to the Internet. If the single-board computer meets your needs, you can purchase the board, including the software license, for $199 (1000). If you want to design your own hardware, you can purchase a software license for $14,500 per product line.

It's easy to speculate that the lowest cost Internet-appliance designs will probably include the application and networking software in a single chip. It will become difficult for third-party suppliers to sell networking-software libraries, because processor vendors will include them in the price of the hardware. Internet-appliance designers will continue to find new ways to get onto the Internet, using RF, power lines, phone lines, coax, fiber optics, satellite, and infrared. No matter how sophisticated the networking, your job is to make the network invisible to users. The users want to pick up their appliance and be connected—no booting, no logging in, no passwords (although it must be secure), and no waiting. They just want it to work.


For more information...
For information on subjects discussed in this article, use EDN's InfoAccess service . When you contact any of the following manufacturers directly, please let them know you read about their products in EDN.
Advanced Transdata
1-972-980-2960
www.adv-transdata.com
Circle No. 301
AT&T
1-877-700-2467
www.att.com/globalnetwork
Circle No. 302
Conexant Systems Inc
1-949-483-4600
www.conexant.com
Circle No. 303
Connect One Ltd
+972-9-766-0456
www.connectone.com
ircle No. 304
emWare Inc
1-877-436-9273
www.emware.com
Circle No. 305
Lightner Engineering
1-858-551-4011
www.picoweb.net
Circle No. 306
Microchip Technology
1-480-786-7200
www.microchip.com
Circle No. 307
NetBurner Inc
1-858-530-0293
www.netburner.com
Circle No. 308
Parallax Inc
1-916-624-8333
www.parallaxinc.com
Circle No. 309
Scenix Semiconductor
1-650-210-1500
www.scenix.com
Circle No. 310
Seiko Instruments
1-310-517-7771
www.seiko-usa-ecd.com
Circle No. 312

Author info

You can reach Technical Editor Warren Webb at 1-619-513-3713, fax 1-619-486-3646, wwwebb@cts.com.

 

 

REFERENCE

1.Freyder, S, D Helland, and B Lightner, "A $25 Web server," Circuit Cellar Online, July 1999, www.chipcenter.com/circuitcellar/july99/c79bl1.htm.

2. Loewen, M, "Microchip Application Note AN724: Using PICmicro MCUs to connect to Internet via PPP," www.microchip.com/10/Appnote/Category/Internet/00724/index.htm.




Reed Business Information Resource Center

Featured Company


Related Resources

ADVERTISEMENT

ADVERTISEMENT

Feedback Loop


Post a CommentPost a Comment

There are no comments posted for this article.

Related Content

 

By This Author


ADVERTISEMENT

Knowledge Center



Technology Quick Links

EDN Marketplace


©1997-2009 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other Reed Business sites