ENC28J60 Ethernet controller with Arduino

This is a notes post for future reference
Description: Cheap/cheapest ethernet controller
Speed: 10MB/s (half duplex I believe)
POE: no
Operating voltage: 5 or 3.3v
WOL: Yes, although not tested.
Libraries: EtherCard (My prefered).

enc_ebay

CODE:

Add the following to: enc28j60.cpp to enable promiscuous mode (disable ip filters), can be used for packet sniffing.

void ENC28J60::enablePromiscuous () {
//writeRegByte(ERXFCON, readRegByte(ERXFCON) & ERXFCON_CRCEN|ERXFCON_PMEN|ERXFCON_BCEN);
writeRegByte(ERXFCON, 0);
}

Credit

#include <EtherCard.h>
byte Ethernet::buffer[500];
ether.begin(sizeof Ethernet::buffer, mymac,10);

if (!ether.dhcpSetup())
{
tft.print(“DHCP failed.”);
}

ENC28J60::enablePromiscuous();

Pins:

Controller -> UNO/Micro/Mini Pro (Compatible)
INT -> D2
SO -> D12
SI -> D11
SCK -> D13
CS -> D10 (or D8)
VCC -> 5V
GND -> GND

Leave a Reply

Your email address will not be published. Required fields are marked *

*