Scale-N

Scale-N
Arduino
Componenten
Rollend Materieel
Naslag
Onderdelen
Wissels
Basis Electronica
Symbols Electronica
Programming Arduino
DCC++
DR5000
Products
Link













































PCB ENC28J60 Ethernet-module

ENC28J60 Ethernet Module utilizes the new Microchip ENC28J60 Stand-Alone Ethernet Controller IC featuring a host of features to handle most of the network protocol requirements. The board connects directly to most microcontrollers with a standard SPI interface with a transfer speed of up to 20MHz. ENC28J60 Ethernet chips, SOP28 package; SPI Interface; 1 x10 connector, can be easily mounted with the MCU; Built-in isolation transformer RJ45 connectors HR911102A; Power LED; Single Supply: +3.3 V; 25MHz Crystal; PCB size: 55 x 36 mm



Connections
  • ENC SO -> Arduino pin 12
  • ENC SI -> Arduino pin 11
  • ENC SCK -> Arduino pin 13
  • ENC CS -> Arduino pin 8 (or 10, read further)
  • ENC VCC -> Arduino 3V3 pin (watch out, it needs quite some juice, you may consider a seperate supply)
  • ENC GND -> Arduino Gnd pin

For the ENC28J60 chip/module, there are two Arduino libraries available: Ethershield (development has stopped) and Ethercard (the newest). There is also the UIPEthernet library (Thanks for pointing that out Norbert Truchsess) that is compatible to the Ethernet library. To be clear: the Ethernet library is for the WIZ5100 ethernetshield, using the UIPEthernet library makes (most of) the WIZ5100 based programs suitable for the ENC28J60.


Library
Ethercard"
UIPEthernet

A note on the Chipselect CS The use of the proper CS pin is depending on what library one uses for the ENC28J60. there are defacto three libraries: The EtherShield library, the EtherCard library and the UUPEthernet library. The Ethershield library uses pin 10 as a chipselect The EtherCard library uses pin 8 as a chipselect The UUPEthernet library uses pin 10 as a chipselect The reason for this change is to be able to use the Ethercard together with an SD card. If you buy a module, rather than a shield, it is very easy to determine what chipselect pin you want to use. If you use the older EtherShield library, use pin 10 as CS, if you use the somewhat newer Ethercard library, use pin 8. If for whatever reason you want to use the Ethercard library with pin 10, change the pin assignment in the library files ENC28J60.h (line 25 and 41 I believe) and the EtherCard.h (Line 134: uint8_t csPin = 8 ). (Depending on the version it can also be in line 154.)


It is also possible to add the declaration for pin 10 in the program itself like this:
ether.begin(sizeof Ethernet::buffer, mymac, 10)
This card works with a Mega2650 if you override the CS pin in the sketch. The pin mapping is –

  • ENC 2650
  • SO 50 (MISO)
  • SI 51 (MOSI)
  • CLK 52 (SCK)
  • CS 53 (SS)


In the sketch you need to override the begin with ether.begin(sizeof Ethernet::buffer, mymac, 53) (note the 53) because the default is for pin 8 on a UNO. If you use another pin for the CS you will need to manually set pin 53 as an output or SPI doesn’t work.

More info:
http://www.geeetech.com/wiki/index.php/Arduino_ENC28J60_Ethernet_Module
Download local:
Ethercard
UIPEthernet
Sources:
Ethercard
UIPEthernet
Ref:
www.dx.com
https://arduinodiy.wordpress.com