Close your eyes. Picture a web server. Id bet that what comes to mind is at least a tower PC, if not an array of machines. Now, try going in the other direction--how small can a web server be and still do something useful? Id bet that few of you went far enough. The topic of this article is a web server that the folks at NetMedia have come up with--the SitePlayer (www.siteplayer.com)--a 1" square, 2- chip web server with ethernet, serial and I/O connections. Not too long ago, this device was being referred to as the worlds smallest web server, but I doubt that distinction still holds true. There are currently two contrary
trends in the computer industry, exemplified by the thought exercise
above: The most familiar leads to faster, more powerful systems
with more functions; while at the other end of the spectrum is
a trend to move intelligence and connectivity down the food chain--to
devices that were never envisioned to be intelligent. Evidence
of the latter trend includes the increased use of microprocessors
in formerly dumb things: cars, appliances and the like; the spread
of networking into the home and even in the underlying protocols
of the internet itself. Most of us are using IPV4 (Internet Protocol--the
IP part of TCP/IP), where one of the base design features is
an address space based on a combination of 4 eight bit numbers
In a previous dacs.doc article (www.dacs.org/archive/0002/feature2.htm), I wrote about the use of embedded processors, using an example of distributed control for an audio system. That article addressed distributing the intelligence, but not the connectivity (a direct wired connection was used). Recently, Ive been experimenting with more uses for my home network (100Mb ethernet wired to most rooms in the house) beyond the obvious internet connection sharing and music distribution. The siteplayer has opened up many new possibilities by providing an easy-to-use ethernet connection and a common communications protocol (http). First, Ill describe the siteplayer in more detail, then outline some of the uses Im developing. The siteplayer itself consists of a Philips 89C51 microcontroller coupled with a Realtek RL1019AS Ethernet transceiver chip. Beside the ethernet port (meant to be hooked up to an RJ45 LAN connector with built-in transformer), there are eight general purpose I/O lines and a serial port. The siteplayer has 48Kbytes of flash memory to hold web pages and 1Kbyte of SRAM is available for storage. There is no conventional operating system available; instead, there is a small control program that supports internet protocols (which currently include ARP, ICMP, BOOTP, UDP, TCP/IP, and HTTP) and the way that it deals with web pages. Aside from some simple math functions which are used in conjunction with variable replacement on web pages (described below), the siteplayer has no real computational facilities available--if general processing is required, it would be expected to be provided by a companion processor. The 48Kbytes of flash can be used to hold any web pages that fit (as well as the associated assetsfor example graphics files and sound clips). Besides creating the web page, programming also involves defining variables (which are mapped to memory locations in the 1Kbyte SRAM space). A value can be associated to a variable through a communication on the serial port, or by mapping the variable to the address of one of the I/O lines, where a change in state on a given pin will be directly reflected in the variables value. On a web page, the use of a special leading character (^) in front of a variable name results in the replacement of the variable with the value found at the associated memory location when the web page is delivered. Conversely, by use of the query parameters in an http get request, variable values can be directly set from clicks on a web page. This seems quite confusing at first, so a few examples might be in order:
As you might guess, the discussion
above only scratches the surface of what can be done. To summarize,
the siteplayer allows both the setting and reading of variables
and I/O connections through simple interactions with a web page.
It should be noted that while these interactions would be done
via a web browser most of the time, its a relatively simple
matter to use http transactions from any sort of program to achieve
the same results. 1. Network connected character display: One of the items thats been lying around my surplus collection for many years is a serially connected 16 character vacuum fluorescent display. This display is quite easy to read from a distance, but had turned out to be difficult to interface. The siteplayer has pre-defined variable "COM", which is directly mapped to its serial port. Any data assigned to the COM variable through an http transaction will be directly output on the serial port. Ill be mounting this display in the kitchen, connected to my LAN through the siteplayers ethernet. Most of the time, one of my servers will be periodically sending weather information scavenged from the internet (to provide a real-time weather display in the kitchen). The siteplayer will also hold a web page that will allow my kids to send messages to the display from their computers (an alternative to the normal yelling back and forth that goes on around dinner time). 2. Remote temperature sensing: Ive cobbled together a basic stamp with a Maxim (Dallas) 1620 thermometer chip, which will be mounted outside of the house. By having the stamp communicate with a siteplayer through the serial port as described above, Ill be able to add the current outdoor temperature to my home web pages. This capability will be expanded to other forms of monitoring, once I figure out how. 3. Web interface for remote audio preamp: Im going to attempt to replace the "physical knobs on a box" interface for the remote preamp I referred to earlier in this article with one that utilizes a web interface (I have an Audry internet appliance near where the box currently is). The siteplayer will be located near the serially controlled preamplifier, with a basic stamp in between to handle the protocol conversions. A web site will be loaded into the siteplayer that gives the normal control interface for a preamplifier (volume, bass, treble and the like) that will talk to the preamp through the basic stamp. This project will take a bit of work, but should be possible. Hopefully, this article has started you thinking about the small end of the hardware spectrum and gives a preview of some of the things that are likely to start emerging on the consumer market in the future. |
Rich Chernock is currently working on digital television and networked multimedia at IBM research. He is still leading many of the ATSC standards activities for broadcast High Definition Television. Earlier this year, he co-authored "Data Broadcasting: Understanding the ATSC Data Broadcast Standard". |