circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 100 November 1998
emWare Top to Bottom
Part 1: Monitoring via the Internet


emWARE COMPONENTS

As you see in Photo 1, emWare uses Visual Café as a tool for integrating something physical and logical to something conjured like web browsers. Notice the first button, Install EMIT 2.5.

EMIT is short for embedded micro internetworking technology. That first word makes EMIT a topic of interest to us. Do what you will with the remaining words, but be aware that the "I" and "M" words are as just as important in the scheme of things as the "E" word.

By the way, the sign to the left of the install buttons alluding to the universal Ethernet is a pretty good clue as to what emWare and EMIT are all about.

Before diving into the install, I was not looking forward to hooking up to the Internet to download the browsers. It was a relief to see the browser-install buttons when I fired up the toolkit CD. Somebody was on the ball with that one.

Let’s start from the top down. Clicking the EMIT 2.5 button starts the install process. After the standard "who are you" screens, the dialog box in Photo 2 is presented.

(Click here to enalrge)

Photo 2—Depending on your application, you can load all of EMIT or just the pieces you need.

Notice that you can install client and gateway code but no server code. Don’t worry. That’s OK. Let’s climb back up to the 5000˘ level for a moment and I’ll tell you why. emWare is an application set that consists of three major components: server, gateway, and client codes.

AT YOUR SERVICE

The server code—emMicro—is a tiny web-server application that resides on your target microprocessor platform. The target can be anything from an 8-pin PIC to a full-blown Pentium-based board.

For this discussion, my platform will be 8051 based, mainly because that’s what ships with the EMIT SDK. There’s no reason why an embedded PC or even a Microchip PIC couldn’t be a target. In fact, once I finish with the hows and whys of emWare, I’ll put this newly acquired EMIT knowledge to work on an embedded PC and PIC emWare application.

Judging from the target material, it would be logical to assume that the emMicro code is not lengthy. It’s not. The server code is responsible for relaying variable information from the target server to the gateway device. As you’ll see, this is all done via tables and a common telecommunications interface.

One of the most interesting aspects of emMicro is its use of microtags. Microtags are compressed references to interface objects or device states. Normally, microtags are found on the server device and are expanded by the gateway device (with emGateway code) when needed. This process of tagging saves considerable space on the server machine and offloads some of the processing load to the gateway code.

All of this conversation between the server machine and the gateway machine is done via a lightweight network, emNet. emNet is responsible for handling the communication path between emMicro and emGateway.

Due to EMIT targeting the Internet, a serial link is the default method that emNet employs. For local implementations, standard Ethernet and RS-485 are also valid considerations. In a nutshell, emNet handles all of the low-level communications.

Functions, events, variables, and documents are all components of a complete emMicro server installation. Of course, the main user application is the boss, but it too has to be intertwined with the emMicro code to effect the EMIT functionality.

Functions are defined as the processes that the device performs. These functions are the standard jobs or procedures you code into any application.

Events consist of a table of predefined states that must be reported when that particular state occurs. An example of an event would be the tripping of a flood sensor in your basement.

Variables contain the state of physical or logical objects. For example, variables store the state of a logical switch or the numeric value of a thermistor reading.

Documents in this context are HTML pages that contain either information about the server device or HTML pages that are served on demand. In a sense, there’s no real difference in functions, events, variables, and documents in the emWare environment than in any other program you would write.

The key here is that all of these program products are given the ability to be transported bidirectionally between the server machine and a web-browser application using the emMicro code.