
circuitcellar.com
69
TESTS & CHALLENGES
Sponsored by WIZnet — circuitcellar.com/wiznet2014
(MISO, MOSI, SCLK, nSCS), three status/
control lines (nRESET, RDY, nINT), and power
and ground. The WIZ550io power supply
is 3.3 V, but the module inputs are all 5-V
tolerant.
Ideally your processor has a hardware
SPI port that can take advantage of the
WIZnet module’s high-speed (up to 80 MHz)
SPI. But if not, bit banging is fine since the
W5500 RAM buffers will take up the slack for
a slow microcontroller connection.
As for the three control lines, you can
connect them or not, depending on the
particulars of your application.
nRESET does a hardware reset of the
module, but the automatic power on reset will
typically suffice. Alternatively, you can do a
little housekeeping (save the current network
parameters) and issue a software reset.
After hardware reset (i.e., power on or
nRESET), the RDY output will assert after a
delay (50 ms) for internal module initialization.
Instead of dedicating a pin to monitor RDY,
it’s easy to just insert a software delay when
the application starts.
The nINT pin is there if you want to
implement an interrupt-driven interface.
Software can define which particular event(s)
(e.g., data transfer, socket disconnect, link
loss, etc.) trigger an interrupt request. But
with the W5500 handling most network
activity, there’s no need to interrupt the
microcontroller in normal operation. The
network can be dealt with in the background,
leaving interrupts free for real-time tasks
that truly need them.
How many times have you gotten near
the end of a project and discovered you
really need one more I/O line? The W5500
offers an optional fixed transfer length SPI
mode that works with the chip select (nSCS)
input grounded. However, fixed mode only
supports short transfers (1, 2, or 4 bytes),
not the arbitrarily large block transfers
possible using nSCS, so only consider it as a
last resort if you’re really desperate to free
up a pin.
HIDDEN WIRES
Blasting data fast and far is Ethernet’s
claim to fame, but that requires a lot of
power (e.g., 100+ mA) just to maintain the
link (i.e., PHY enabled). Fortunately, the
W5500 has a standby mode that drops the
link (i.e., disables the PHY), reducing the
W5500 power consumption by a factor of 10
as well as that of the un-linked partner.
Having an AC outlet nearby gives you the
option of piggybacking your Ethernet data
onto the power lines. That’s exactly what I do
with my own garage door monitoring “Thing”
(see Photo 3). Shop around and you’ll find
FIGURE 1
The WIZnet W5500 is an Ethernet chip with a difference—large RAM buffers and hardware TCP/IP processing
that make it easy for any microcontroller to go online.
Host
25 MHz
PLL
150 MHz
SPI manager
SPI
Register manager
TCP/IP Core
TCP
UDP
ICMP
IGMP
V1/V2
ARP IPPPPoE
802.3 Ethernet MAC
MII Manager
(CSMA/CD)
Ethernet PHY
Media interface
Transformer
RJ45
Power
regulator
3.3 V
Memory
manager
32-KB
TX/RX
Memory
1.2 V
PHOTO 1
Magic tricks are easy when you’ve got the right cards up your sleeve.
Copyright © 2014 by Circuit Cellar, Inc.
Subscription: http://circuitcellar.com/subscription/
Kommentare zu diesen Handbüchern