■ BY FRED EADY
ADVANCED TECHNIQUES FOR DESIGN ENGINEERS
USB TO ETHERNET USING
MICROCHIP’S FREE STACKS PART 1
When it comes to electronic projects, I’m a mountain man. Despite the
proliferation of manufacturer and third party demo boards out there, I prefer
to write my own code, design my own printed circuit boards, and take my
chances with a soldering iron. This month, the mountain man is coming to
town as the coders at Microchip have put together a brand new TCP/IP
Stack to support the new Ethernet ICs and wireless Ethernet modules that
are coming out of the pipe.
If you’ve had the chance to read some of the most
recent Design Cycle columns, you know we’ve been
exploring the possibilities of replacing embedded RS-232
interfaces with USB interfaces. Although his first love is
Ethernet, the Microchip USB coding crew has attracted
the attention of the mountain man.
Now, he doesn’t come into town very often, so we
must make the most of this trip. Our goal this month is
to place a PIC18F14K50 low pin count USB device in
front of a Microchip PIC18F67J60 standalone Ethernet
controller. The resulting Serial-to-Ethernet hardware will
be driven using Microchip’s free USB Framework and
TCP/IP Stack which has enticed the mountain man to
leave the forest.
TOOL CHAIN CHANGES
Although Microchip has acquired HI-TECH Software
and its family of C compilers, as of this moment Version
5.00 of the Microchip TCP/IP Stack can only be compiled
using Microchip’s legacy C compilers. So, instead of the
HI-TECH PICC- 18 code you normally see in this column,
this month I’ll be dishing out a different flavor of C in the
guise of Microchip’s C18 Compiler.
I’ll also be moving on to a different Ethernet sniffer
platform. Due to its high cost, many of you have
requested that I move away from the commercial sniffer
product I’ve used in past columns and networking books.
I listen to Design Cycle readers and from this point on, the
new Ethernet sniffer standard for this column will be the
Wireshark Network Analyzer. Wireshark is free for a
download from www.wireshark.org and is just as powerful
as its commercial counterparts. Another plus for Wireshark
is that it is extremely easy to learn and operate. I’ll run a
copy of the Wireshark Network Analyzer on a Lenovo
S10 NetBook and provide network captures for you as
necessary during our discussion.
The PIC18F67J60 is supported by every Microchip
programmer that is currently in production with the
exception of the PICkit 1. The same PIC18F67J60
compatibility environment holds true for current
Microchip debugging hardware. I have chosen to use the
REAL ICE programmer/debugger to support this project.
With that, gather up the tools that will form your personal
tool chain and let’s get started.
THE ETHERNET HARDWARE
Many of you are familiar with the EDTP Packet
Whacker, which is a Realtek-based Ethernet NIC. The
classic Whacker Realtek device led the way to a new
■ PHOTO 1.You can get the Ethernet MINI schematic from
the downloads area of the EDTP Electronics website.
Note that I’ve attached a circular power jack and
programming dongle in this shot. I’ll power the MINI
with a regulated 3. 3 volt wall wart.