beautypg.com

Digilent MX7cK User Manual

Page 12

background image

Cerebot MX7cK Reference Manual

www.digilentinc.com

page 12 of 36

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

Layer Transceiver (PHY). Together, the MAC
and PHY in combination with an appropriate
coupling transformer and RJ45 jack provide a
standard 10/100 Ethernet interface.

The RJ45 connector J11, provides the physical
connection to an Ethernet network using a
standard Ethernet cable.

All devices on an Ethernet network must have
a unique address. This address is used to
direct packets on the network to a specific
device and to identify the device that originated
a packet. An Ethernet MAC uses a 48-bit
address value, commonly called the “MAC
Address”. These address values are globally
unique to ensure that no two devices on a
network can have conflicting addresses. MAC
addresses are assigned by the IEEE. Each
PIC32MX795 device is programmed at the
factory to have a unique MAC address that will
be loaded by default when the device is reset.

Digilent provides another unique MAC address
that can be used as well. This address is
printed on a sticker attached to the bottom of
the board. The Digilent provided MAC address
is a twelve digit hexadecimal number of the
form: 00183Exxxxxx, where xxxxxx represents
six hexadecimal digits. This value is used to
initialize the Ethernet Controller MAC Station
Address registers in the Ethernet controller of
the PIC32MX795 microcontroller.

In order to connect to and operate with an
Ethernet network, the PIC32 microcontroller
must be running network protocol stack
firmware. Normally, the TCP/IP (Transmission
Control Protocol/Internet Protocol) network
protocol is used and “TCP/IP Stack” software
must be used. The Microchip Applications
Library, available for download from the
Microchip web site provides full protocol stack
support compatible with the PIC32MX795 MAC
and the LAN8720 PHY. Microchip also
provides numerous example programs
illustrating the use of their network protocol
stack for various applications.

When not using the Microchip network protocol
stack, refer to the manufacturer documentation

for the PIC32MX795 and LAN8720, plus
network protocol documentation, for operation
of the Ethernet interface.

Digilent has Network libraries available that
can be used to develop both client and server
applications when using the board with the
chipKIT MPIDE development environment.
These libraries are built on a custom version of
the Microchip Applications Library network
stack and support various network protocols
such as TCP, UDP, DHCP and others to
provide complete Ethernet network support.
These libraries can be downloaded from the
Cerebot MX7cK product page on the Digilent
web site.

The Digilent chipKIT libraries contain examples
illustrating various network applications.

The PIC32MX795 microcontroller provides two
alternate sets of pins that can be used to
connect the MAC to the external PHY. It also
provides two alternate standard MAC/PHY
interface signaling conventions. The Cerebot
MX7cK is designed to use the standard (not
the alternate) pins, and to use the RMII (not
the MII) interface signaling convention. These
options are selected using the configuration
variables in the PIC32 microcontroller and are
specified using the

#pragma config

statement. To enable the Ethernet controller in
the correct configuration, the following
statements must appear in the main program
module:

#pragma config FETHIO=ON
#pragma config FMIIEN=OFF


The chipKIT MPIDE boot loader sets these
configuration variables, and so no action is
necessary when using the MPIDE software
system.

The LAN8720 PHY has a reset signal, labeled
NRST in the schematic, used to reset the PHY.
This signal is connected to the TRCLK/RA6 pin
on the PIC32 microcontroller. The NRST signal
is active low. Configure the microcontroller pin
as an output and drive it low to reset the PHY,
or drive it high to allow the PHY to come out of