ENC28J60 based Cards / Modules / Shields []

Outils pour utilisateurs

Outils du site


ENC28J60 based Cards / Modules / Shields

Ceci est une ancienne révision du document !


ENC28J60 based Cards / Modules / Shields

Libraries

  • UIPEthernet great for projects that require “print” to be fully implemented and need to be a drop-in replacement for the standard “Ethernet” library
  • ETHER_28j60 is great for its simplicity and small size, but comes with limitations
  • Ethercard best for very advanced users

Wiring


Code

#include <EtherCard.h>
 
static byte mac[] = { 0x74, 0x69, 0x69, 0x2D, 0x30, 0x31 };
static byte ip[] = { 192, 168, 1, 10 };
byte Ethernet::buffer[500];
 
void setup () {
    if (ether.begin(sizeof Ethernet::buffer, mac, 8) == 0) 
        Serial.println("Failed to access Ethernet controller");
    if (!ether.staticSetup(ip))
        Serial.println("Failed to set IP address");
}
 
void loop() {
    ether.packetLoop(ether.packetReceive());  
}
documentation/microcontroleurs/arduino/modules/network_shields/enc28j60/index.1585944159.txt.gz · Dernière modification : de f1sls