Issue
139 February 2002
eZ
Embedded Web
by
Tom Cantrell
Proof
Is In the Booting
With
the board, emulator, development PC, not to mention possible
additional ’Net client PCs, and maybe a router, this all
makes for quite a lash-up. It’s a nice touch that the
kit includes all the power supplies and cables (both RS-232
and Ethernet) for immediate gratification.
There
were even printed manuals for the board and emulator,
which I greatly prefer over electronic ones. How-ever,
I did discover there’s one important manual that’s missing,
so I downloaded it from Zilog’s web site. [3]
While
you’re there, make sure you have the latest copy of the
eZ80 chip documentation, as well. Remember my earlier
comment about breaking out the bubbly prematurely? Check
out the eZ80 errata and you’ll see that last year’s beta
chips expectedly had some severe bugs. By contrast, the
production rev chips appear more than up to snuff with
only two minor bugs noted, so feel free to pop the cork.
All
three CDs (ZDS, IAR C compiler, and the Metro Link stack
and RTOS) installed without a hiccup, so I was anxious
to fire up everything and do some embedded web surfing.
The first choice you’ve got to make is how you want to
wire up things (see Figure 2). I advise you to watch out
for a few potential stumbling blocks.
|
|
Figure
2—As with the Internet in general, evaluation board
connection options abound. It’s best to start using
a single PC setup with hardwired IP addresses and
move on to multiple PCs and dynamic IP addresses (via
DHCP) after everything checks out. |
The
demo in flash memory on the board fires up looking for
a dynamic host control protocol (DHCP) server. For those
of you, like me, who aren’t experts on all this ’Net stuff,
the idea is that you can just plug in a client (e.g.,
eZ80 board) and a web server with DHCP can issue it an
IP address. That way you don’t have to hardwire an address,
which may be problematic in a particular installation,
on the board.
According
to the Quick Start guide, the eZ80 will look for a DHCP
server for a couple of minutes, and then default to a
hardwired address (192.168.1.1). Unfortunately, that’s
the same address as my router. I’ve learned over the years
it’s better not to muck around with my main-squeeze work
PC. Instead I hauled out my laptop and went with the simplest
one-PC setup. It isn’t a web server or running DHCP, so
I simply went into the networking control panel and hardwired
a local IP address of 192.168.1.2.
As
you’re hooking up everything, a run-in with Murphy’s Law
will have you juggling regular and crossover Ethernet
cables. Fortunately, the board includes LINK/RX/ TX LEDs,
so just plug in a cable of any pedigree. If the LEDs light
up, you’ve got it right.
I
fired up everything and had a coffee break to while away
the couple of minutes. Then, I came back to the laptop,
opened up my browser, and typed "http://192.168.1.1".
Nothing happened. The browser sat there trying to find
the page for awhile, then timed out, just like when my
regular ISP is out to lunch.
I’ve
tinkered with a lot of eval gadgets over the years. One
thing I’ve learned is that if something doesn’t work,
sometimes it’s better to just move on and see if you can
find something that does work and go from there. So, I
proceeded with the next step, which is to compile the
same demo ostensibly programmed into flash memory and
download it to the SRAM of the board via the emulator.
While I was at it, I inserted some code (shown in the
documentation) to disable the DHCP time-out stuff and
go straightaway with a hardwire address for the board,
which I set to 192.168.1.3.
Now,
it was time to rebuild the project, connect to the emulator,
download, reset, and go. Everything went smoothly, albeit
a bit slowly. Despite the speed, I remain impressed with
the power and quality of the tools. The only major complaint
I have is that the RS-232 connection between the PC and
emulator is limited to 57.6 Kbps. That’s OK for traditional
64-KB or less 8-bit programs but gets annoying as program
size creeps into triple digits.
As
an aside, I noticed the ZPAK emulator has a USB port on
the back. I strongly encourage Zilog and every other toolmaker
to support USB and/or Ethernet connections as an alternative
to (rather ungracefully) aging serial and parallel ports.
Anyway,
I clicked the ZDS Go button, switched over to the browser,
typed in http://192.168.1.3, and that was it. Frenetic
blinking by the onboard Ethernet LEDs was shortly followed
by the appearance of the Zilog demo page on my laptop.
Cool.
I
don’t know exactly what if anything was put in the flash
memory at the factory or why it didn’t seem to work. Subsequently,
I loaded the rebuilt demonstration program into the flash
memory and everything worked as advertised.
I
even went back and checked the DHCP function using a two-PC
configuration similar to the networked setup shown in
Figure 2. Although neither of the PCs is running a web
server, it turns out my desktop router (taking the place
of the hub in Figure 2) does provide DHCP service. Sure
enough, the newly flashed eZ80 board happily accepted
the IP address offered by my router.