Projects Home Schematics Datasheets Links    
   
Description

The ENC28J60 is Microchip's first incursion into the ethernet controller arena, this new device includes all MAC & PHY IEEE 802.3 10BaseT functions, 8KB of dual access RAM packet buffer and a SPI serial interface, all in a convenient 28-pin package (SPDIP, SOIC, SSOP and QFN packages available).

It takes just few components to get the ENC28J60 up and running and connected to a host microprocessor or microcontroller with support for the industry standard SPI interface.

This project includes the schematics and related information for a simple hardware implementation based on the ENC28J60 (ENC) and a Microchip 28-pin PIC18LF2620 8-bit microcontroller running Microchip's free TCP/IP stack.




Click for a larger image [Click Image to Enlarge]

This project is a variant of the PIC10T Project, that shows a minimal hardware implementation for the Microchip TCP/IP Stack.


Design considerations

While a different MCU can be used for this project, a recommended option due its additional program and RAM memory space is the the PIC18LF2620 (notice that we are using an LF part that has an extended power supply range).

To reduce the number of required components both devices will use a 3.3V Vdd supply, and the PIC18LF2620 will source the clock from the ENC CLKOUT output.

Given that both devices use the same power supply level conversion is not required and by sourcing the clock from the ENC we will avoid the clock synchronization problem with ENC silicon revisions prior to B5.

Remember that now the recommended value for RBIAS (R9 in the schematics) is 2.32K 1% for Rev B5 and 2.7K 1% for Rev B1/B4. It's important that you use the correct value for RBIAS since it controls the signal shape of the differential outputs, a wrong value can produce deformation of the signal and non-compliance with IEEE 802.3.

In this design we do not include an external serial EEPROM, we will compile the MPFS HTTP documents image into the code to be stored in program memory.

The whole circuit was built in a prototype breadboard shown in the picture above. To facilitate connecting the RJ45 I put the connector, the 49.99 resistors, the limiting resistors for the LEDs included in the RJ45 jack, the ferrite bead and two ceramic capacitors in a small board that plugs into the breadboard.

The schematic shows also the RS-232 serial interface but it's not included in the circuit shown in the picture. If you are considering doing some software development it's recommended to include the serial interface as another way to provide additional debugging information.

Getting the circuit up and running

Compiling the firmware is not a huge or complicated task, it requires few software tools available for download from Microchip's website at no cost, and obviously the TCP/IP stack source code distribution and a PIC programmer. For this project I used Microchip's MPLAB ICD2 as a programmer.

With the latest modified version of the Microchip TCP/IP Stack v3.75, the process is quite simple.

This new version adds the MINIPIC10T macro definition that combined with the device selection for the Microcontroller generates the appropriate code for this particular project.

The software distribution includes the MPLAB IDE project file MINIPIC10T.mcp, load this project into MPLAB IDE, select the correct processor (by default the project has selected the PIC18F2620) and verify that the settings on the config.h and minipic10t.h files apply to your project or modify them accordingly (both files are located in the include subdirectory of the main src directory).

Since we will be using the program memory to store the HTTP server documents you must verify that on the config.h file the line with the MPFS_USE_EEPROM macro is commented and the line with the MPFS_USE_PGRM is uncommented.

Also previously to build the code, you must generate a C language image of the HTTP documents using the MPFS.EXE utility with the /c option.

Once you have the C file, move it to the src directory, double check that is included in the project Source file list and edit it to replace the line that has the #include "..\Include\Compiler.h" by #include "include/config.h".

For additional details check the README.TXT file included in the software distribution.

For a detailed explanation about how to build Microchip's TCP/IP stack
for this or similar projects Click Here.


Schematics & Firmware source Code

PIC18LF2620-ENC28J60 Schematics  
Building the Microchip TCP/IP Stack for this project  


Datasheets for relevant parts used in this project

Microchip's PIC18F2620/4620 8-bit MCU Datasheet  
Microchip's PIC18F2620/4620 8-bit MCU Datasheet Errata  
Microchip's PIC18F2620/4620 8-bit MCU Silicon/Datasheet Errata Rev.A3  
Microchip's PIC18F2620/4620 8-bit MCU Silicon/Datasheet Errata Rev.A4  
Microchip's ENC28J60 Ethernet Controller Datasheet (Version A)  
Microchip's ENC28J60 Ethernet Controller Datasheet (Version B - Latest)  
Microchip's ENC28J60 Silicon Errata Rev.B1  
Microchip's ENC28J60 Silicon Errata Rev.B4  
Microchip's ENC28J60 Silicon Errata Rev.B5  
Pulse Engineering J1006F01P 10/100BaseT Integrated magnetics RJ45 Jack  
Xicon 60ohm Chip Ferrite Bead  


Useful Links

TCP/IP Stack Source code and useful software tools

Microchip's TCP/IP Stack v3.02  
Microchip's TCP/IP Stack v3.60  
Microchip's TCP/IP Stack v3.75  
Microchip's TCP/IP Stack v4.02  
Microchip's TCP/IP Latest Version  
Microchip's MPLAB Integrated Development Environment  
Microchip's MPLAB C18 Compiler  
Wireshark (formerly Ethereal) Network Protocol Analyzer  
CoffeCup HTML Editor 2007  


Some Boards/Products developed with the ENC28J60 controller

nic28 - ENC28J60 Network Controller Interface Card  
eip-10 - Embedded TCP/IP Network Module  
PICNet 1 - PIC18 Network Development Board  
Microchip's Ethernet PICTail Daughter Board  
NorthMicro NM121 ENC28J60 Network Board  
CCS Embedded Ethernet Prototyping Board  
Olimex ENC28J60-H Ethernet Controller Header Board  
Olimex PIC-WEB WEB Server TCP-IP Development Board  
Olimex PIC-MINI-WEB WEB Server TCP-IP Development Board  


Additional Resources

Brush Electronics Ethernet Boot Loader  
Microchip TCP/IP Stack Application Note (AN833)  
Microchip Users Forum - TCP/IP-Ethernet  




   
    ©2006-2009, Jorge Amodio, All rights reserved

Last Update: Jan 28, 2008