The ENC28J60 Ethernet Module is a versatile network module that enables Ethernet connectivity for microcontrollers and embedded systems. Utilizing the ENC28J60, a standalone Ethernet controller with an industry-standard Serial Peripheral Interface (SPI), it is particularly suitable for applications where network connection is required for data exchange, remote control, or monitoring purposes. Common applications include home automation systems, IoT devices, and networked sensors.
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | 3.3V power supply input |
2 | GND | Ground connection |
3 | CLKOUT | Clock output (can be left unconnected) |
4 | INT | Interrupt output (active low) |
5 | WOL | Wake on LAN input (active low) |
6 | SO | SPI Serial Output (MISO) |
7 | SI | SPI Serial Input (MOSI) |
8 | SCK | SPI Clock Input |
9 | CS | SPI Chip Select (active low) |
10 | RESET | Reset input (active low) |
11-28 | NC | No Connection (reserved for internal use) |
Q: Can the ENC28J60 be used with a 5V microcontroller? A: Yes, but level shifters should be used for SPI lines, and the VCC must be supplied with 3.3V.
Q: Is it possible to connect multiple ENC28J60 modules to a single microcontroller? A: Yes, by using separate chip select (CS) lines for each module.
Q: Does the ENC28J60 support full-duplex Ethernet communication? A: No, it supports half-duplex 10 Mbps Ethernet.
#include <SPI.h>
#include <Ethernet.h>
// MAC address for the Ethernet shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// Initialize the Ethernet client
EthernetClient client;
void setup() {
// Start the Ethernet connection
Ethernet.begin(mac);
Serial.begin(9600);
while (!Serial) {
; // Wait for serial port to connect
}
Serial.println("Ethernet ready");
// Print the IP address
Serial.println(Ethernet.localIP());
}
void loop() {
// Your code here to handle Ethernet communication
}
Note: This example assumes the use of the standard Ethernet library compatible with the ENC28J60 module. Make sure to include the correct library for the ENC28J60 if you're not using a standard Ethernet shield.