Arduino Ethernet Shield MEGA hack

details

Arduino Ethernet Shield MEGA hack

by NKC Electronics

NKC provides the Arduino Ethernet compatible board using WIZ810MJ and the guide of how to assembly the board.


This tutorial explains very well how to connect the Arduino MEGA board with Arduino Ethernet shield incompatible and how to modify the related software.

Hardware connection

This is very simple. The SPI signal of Ethernet shield is able to be bended or cut for avoiding connecting with them. If they are not connected, connect the SPI signal of Ethernet Shield to the SPI singal of Arduino MEGA with some wires.

Softwafe Modification

Find and replace the following 5 lines in SPI.h:

#define SPI0_SS_BIT BIT2
...
#define SPI0_SCLK_BIT BIT5
...
#define SPI0_MOSI_BIT BIT3
...
#define SPI0_MISO_BIT BIT4
...
#define IINCHIP_CS_BIT BIT2

and replace them with this code:

#define SPI0_SS_BIT BIT0
...
#define SPI0_SCLK_BIT BIT1
...
#define SPI0_MOSI_BIT BIT2
...
#define SPI0_MISO_BIT BIT3
...
#define IINCHIP_CS_BIT BIT0

[Learn More…]


AUTHOR : www.mcukits.com

COMMENTS

Please Login to comment
  Subscribe  
Notify of