DPRG List  

DPRG: microcontroller + ethernet card?

Subject: DPRG: microcontroller + ethernet card?
From: Bryan Andersen bryan at visi.com
Date: Sun Feb 7 13:21:43 CST 1999

Ed Koffeman wrote:
> >add networked devices in your house.  I know an ethernet interface has
> >been made with a PIC (in Circuit Cellar INK), but that solution seems
> That was an IP protocol packet responder in a PIC.
> The Ethernet itself is much more demanding.
> Ed Koffeman

On a cheep basis I found that single board PC Computers 
with onboard ethernet controlers was the overall cheepest 
and least effort way to get full ethernet nodes around 
the house.  The thing is you are now talking $300+ a 
node.  The nice thing is you can use full PC development 
software to program them.  It's a little over my price 
range right now, so I haven't done anything with it yet.  

For truely cheep communication in a networked fasion, 
consider using a RS-485 bus, then talk simple RS-232 
timed serial over it.  

     MCU<-->UART<-->RS-485 tranceiver<--> bus. 
I'm using a similar method for communication between 
processor nodes on my robot, but I'm using IRDA 3 of 
16 timing specs.  Using the IRDA timing I can do simple 
collision detection on Scenix SX CPUs.  I'm getting 
transfer rates fo 250k bits a second between nodes for 
short < 12 inch links.  I haven't tried longer liinks 
out yet as I don't have use for them.  The RS-485 specs 
for > 1000 feet links over twisted pair at 250k baud.

My hardware is simple, I just use three pins on the 
SX-50 MCU tied to the tranceiver chip's pins for  
transmit, receive, and transmit enable.  (Receive Enable 
on the RS-485 tranceiver is always enabled).  There are 
only two link wires which go directly to the A/B pins on 
the tranceiver, then a place on the PCB for a 1/4watt 120 
Ohm resistor if needed.  (The resistor is used if the 
board is at the end of the link.  It provides loop 
termination much like thin wire ethernet needs.)

For a description of the RS-485 bus, look at some of the 
spec sheets for tranceiver chips at www.maxim-ic.com.  
Do a search on RS-485.  It's a simple current loop 
interface that allows up to 32 devices per loop (or 128 
if using low draw devices).  At the ends of each loop 
are a 120 Ohm resistor, then each device is tapped onto 
the loop pair.  Makes for a very simple bus that can be 
put on a board for less than $15 including PCB space, 
connectors, etc.

With the software I'm using for the SX-50 CPU, I'm getting
reliable communication rates from 110 baud to 250k baud
at any rate so long as the rate stays consistent in each 
frame sent.  The IRDA timing does cause a bit of problems
communicating to a PC, but I'm working on a bufferred
interface to translate between my RS-485/IRDA to standard
RS-232 at regular baud rates.

- -- 
Bryan Andersen
bryan at visi.com


More information about the DPRG mailing list