Saturday 7 June 2014

Arduino Leonardo with ENC28J60

This is a very quick post, it's mainly to act as reference for me in the future!
When connecting an Arduino Leonardo up to the ENC28J60 cheapo ethernet adapter things are a little more complicated than with the other Arduino's

I've used them before with the Uno and it's straight forward. PIN conections are:

// PIN Connections (Using Arduino UNO):
//   VCC -   3.3V
//   GND -    GND
//   SCK - Pin 13
//   SO  - Pin 12
//   SI  - Pin 11
//   CS  - Pin  8

However, when you get to the Leonardo things are a little different, as the Leondardo has the ICSP header which you need to use for this connection.
The ICSP connections are:
//   MISO  VDD (+5v)
//   SCK   MOSI
//   RST   GND

So the connections are:

Pin Connections (Using Arduino Leonardo):
//   VCC -   3.3V
//   GND -    GND
//   SCK - SCK
//   SO  - MISO
//   SI  - MOSI
//   CS  - Pin  10

Then to init the library pass it the pin 10 like this:
ether.begin(sizeof Ethernet::buffer, mymac,10)

And it works! Hopefully this will help you out if you're trying to do the same, otherwise it's just handy for my ageing memory ;-)

No comments:

Post a Comment

Note: only a member of this blog may post a comment.