Datasheet
SPI ETHERNET LIBRARY
The ENC28J60 is a stand-alone Ethernet controller with an industry standard Serial
Peripheral Interface (SPIā¢). It is designed to serve as an Ethernet network interface
for any controller equipped with SPI.
The
ENC28J60 meets all of the IEEE 802.3 specifications. It incorporates a number
of packet filtering schemes to limit incoming packets. It also provides an internal
DMA module for fast data throughput and hardware assisted IP checksum calcula-
tions. Communication with the host controller is implemented via two interrupt pins
and the SPI, with data rates of up to 10 Mb/s. Two dedicated pins are used for LED
link and network activity indication.
This library is designed to simplify handling of the underlying hardware (
ENC28J60).
It works with any AVR MCU with integrated SPI and more than 4 Kb ROM memory.
SPI Ethernet library supports:
- IPv4 protocol.
- ARP requests.
- ICMP echo requests.
- UDP requests.
- TCP requests (no stack, no packet reconstruction).
- packet fragmentation is NOT supported.
Note: Prior to calling any of this library routines, Spi_Rd_Ptr needs to be initialized
with the appropriate SPI_Read routine.
Note: The appropriate hardware SPI module must be initialized before using any of
the SPI Ethernet library routines. Refer to SPI Library.
367
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6