<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ethernet | Learn with Edwin Robotics</title>
	<atom:link href="https://learn.edwinrobotics.com/category/ethernet/feed/" rel="self" type="application/rss+xml" />
	<link>https://learn.edwinrobotics.com</link>
	<description>Tutorials on basics of electronics, etc.</description>
	<lastBuildDate>Wed, 08 Jun 2016 12:31:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>Ethernet Hookup Guide</title>
		<link>https://learn.edwinrobotics.com/ethernet-hookup-guide/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ethernet-hookup-guide</link>
					<comments>https://learn.edwinrobotics.com/ethernet-hookup-guide/#respond</comments>
		
		<dc:creator><![CDATA[Abhishek Nair]]></dc:creator>
		<pubDate>Wed, 08 Jun 2016 12:30:01 +0000</pubDate>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Ethernet]]></category>
		<guid isPermaLink="false">http://learn.edwinrobotics.com/?p=485</guid>

					<description><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-cover.jpg" class="attachment- size- wp-post-image" alt="" style="float:left; margin:0 15px 15px 0;" decoding="async" fetchpriority="high" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-cover.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-cover-140x94.jpg 140w" sizes="(max-width: 6000px) 100vw, 6000px" />&#160; There are cases where we cannot totally rely on WiFi network for internet connectivity with device, thus we will prefer to use wired connection in such cases, network critical applications must be provided with wireless and wired connectivity options in order to achieve greater result and to get more flexibility and reliability and this [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-cover.jpg" class="attachment- size- wp-post-image" alt="" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-cover.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-cover-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-cover-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-cover-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" /><p>&nbsp;</p>
<p>There are cases where we cannot totally rely on WiFi network for internet connectivity with device, thus we will prefer to use wired connection in such cases, network critical applications must be provided with wireless and wired connectivity options in order to achieve greater result and to get more flexibility and reliability and this can be accomplished by integrating the Ethernet protocol, which is the basic of the communication protocol used in the internet into the embedded system. There are lots of options available in the market to get the Ethernet connectivity and one of the option to get Ethernet connectivity to your own micro controllers is by adding WIZ811MJ Ethernet module to your microcontrollers.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ul>
<li>
<h1 style="text-align: left;"><strong><a href="#Step1">Introduction to WIZ811MJ Ethernet module</a></strong></h1>
</li>
<li>
<h1 style="text-align: left;"><strong><a href="#Step3">Connection reference</a></strong></h1>
</li>
<li>
<h1 style="text-align: left;"><strong><a href="#Step4">Sample Code</a></strong></h1>
</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h1 id="Step1" class="step-title" style="text-align: left;"><strong>Introduction to WIZ811MJ Ethernet module</strong></h1>
<p>&nbsp;</p>
<p>The module we are going to use in this hookup is WIZnet W5100 Network Module with Mag Jack &#8211; WIZ811MJ. The WIZ811MJ is an ideal option for users who want a simple solution to adding TCP/IP and rapidly enabling Internet capability to their project. The WIZ811MJ network module comes with the Wiznet W5100 chip, MAG-JACK (RJ45) together with the glued logic needed to communicate with the microcontroller through the SPI or bus interface.</p>
<p>WIZ811MJ consists of W5100 and MAG-JACK.</p>
<ul>
<li>TCP/IP, MAC protocol layer: W5100</li>
<li>Physical layer: Included in W5100</li>
<li>Connector: MAG-JACK(RJ45 with Transformer)</li>
</ul>
<p>&nbsp;</p>
<p>We are using the version 1.1 of the WIZ811MJ module, its comes with following features:</p>
<ul>
<li>Supports 10/100 Base TX</li>
<li>Supports half/full duplex operation</li>
<li>Supports auto-negotiation and auto cross-over detection</li>
<li>IEEE 802.3/802.3u Compliance</li>
<li>Operates 3.3V with 5V I/O signal tolerance</li>
<li>Supports network status indicator LEDs</li>
<li>Includes Hardware Internet protocols: TCP, IP Ver.4, UDP, ICMP, ARP, PPPoE, IGMP</li>
<li>Includes Hardware Ethernet protocols: DLC, MAC</li>
<li>Supports 4 independent connections simultaneously</li>
<li>Supports MCU bus Interface and SPI Interface</li>
<li>Supports Direct/Indirect mode bus access</li>
<li>Supports Socket API for easy application programming</li>
<li>Interfaces with two 2.54mm pitch 2 x 10 header pin</li>
<li>Temperature : 0 ~ 70℃ (Operation), -40 ~ 85℃ (Storage)</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/s-1.jpg" target="_blank"><img decoding="async" class="alignnone wp-image-509 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/s-1.jpg" alt="WIZ811MJ" width="600" height="600" srcset="https://learn.edwinrobotics.com/wp-content/uploads/s-1.jpg 600w, https://learn.edwinrobotics.com/wp-content/uploads/s-1-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/s-1-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/s-1-184x184.jpg 184w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
<p style="text-align: left; padding-left: 210px;">     Image Credit: Sparkfun</p>
<p>&nbsp;</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/s-2.jpg" target="_blank"><img decoding="async" class="alignnone wp-image-511 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/s-2.jpg" alt="WIZ811MJ" width="567" height="340" srcset="https://learn.edwinrobotics.com/wp-content/uploads/s-2.jpg 567w, https://learn.edwinrobotics.com/wp-content/uploads/s-2-300x180.jpg 300w" sizes="(max-width: 567px) 100vw, 567px" /></a></p>
<p style="padding-left: 180px;">Image Credit: Sparkfun</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The Wiznet 5100 based chip has the TCP/IP hardwired on it; therefore it will help developing the TCP/IP protocol stack based application much easier and could be implemented on the small RAM size microcontroller class compared to the firmware TCP/IP protocols stack based implementation approach.</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/s-3.jpg" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-513 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/s-3.jpg" alt="WIZ811MJ-pinouts" width="1276" height="1332" srcset="https://learn.edwinrobotics.com/wp-content/uploads/s-3.jpg 1276w, https://learn.edwinrobotics.com/wp-content/uploads/s-3-287x300.jpg 287w, https://learn.edwinrobotics.com/wp-content/uploads/s-3-981x1024.jpg 981w" sizes="auto, (max-width: 1276px) 100vw, 1276px" /></a></p>
<p style="padding-left: 150px;">Image Source: Wiznet WIZ811MJ Datasheet</p>
<p>&nbsp;</p>
<h1></h1>
<h1 id="Step2"></h1>
<p>We are going to use this module together with arduino to get started with it. The Arduino UNO does not have any options onboard to connect with internet, adding this module to Arduino UNO will give the Ethernet connectivity to the UNO board, thus it will provide a great option to create internet dependent applications using Arduino UNO board. You are free to use Arduino ethernet shield also (Since the ethernet sheild comes with same W5100 Chip onboard).</p>
<p>&nbsp;</p>
<p>The Arduino can produce web pages from within the Arduino sketch or host web pages that are stored on the SD card (there is a micro SD card socket on the Arduino Ethernet shield). These web pages can be configured to control and monitor hardware from a web browser on any Ethernet network that the Arduino is connected to. The WIZ811MJ module uses SPI Protocol to communicate with other devices, thus we are going to connect the Ethernet module to the arduino using SPI lines. Use the table below to check your SPI lines (Incase you are using any other Arduino Boards)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3></h3>
<table border="1" width="90%" cellpadding="5">
<tbody>
<tr>
<td align="center"><strong>Arduino / Genuino Board</strong></td>
<td align="center"><strong>MOSI</strong></td>
<td align="center"><strong>MISO</strong></td>
<td align="center"><strong>SCK</strong></td>
<td align="center"><strong>SS (slave)</strong></td>
<td align="center"><strong>SS (master)</strong></td>
<td align="right"><strong>Level</strong></td>
</tr>
<tr>
<td align="left">Uno or Duemilanove</td>
<td align="center">11 or ICSP-4</td>
<td align="center">12 or ICSP-1</td>
<td align="center">13 or ICSP-3</td>
<td align="center">10</td>
<td align="center">&#8211;</td>
<td>5V</td>
</tr>
<tr>
<td align="left">Mega1280 or Mega2560</td>
<td align="center">51 or ICSP-4</td>
<td align="center">50 or ICSP-1</td>
<td align="center">52 or ICSP-3</td>
<td align="center">53</td>
<td align="center">&#8211;</td>
<td>5V</td>
</tr>
<tr>
<td align="left">Leonardo</td>
<td align="center">ICSP-4</td>
<td align="center">ICSP-1</td>
<td align="center">ICSP-3</td>
<td align="center">&#8211;</td>
<td align="center">&#8211;</td>
<td>5V</td>
</tr>
<tr>
<td align="left">Due</td>
<td align="center">ICSP-4</td>
<td align="center">ICSP-1</td>
<td align="left">ICSP-3</td>
<td align="center">&#8211;</td>
<td align="center">4, 10, 52</td>
<td>3,3V</td>
</tr>
<tr>
<td align="left">Zero</td>
<td align="center">ICSP-4</td>
<td align="center">ICSP-1</td>
<td align="left">ICSP-3</td>
<td align="center">&#8211;</td>
<td align="center">&#8211;</td>
<td>3,3V</td>
</tr>
<tr>
<td align="left">101</td>
<td align="center">11 or ICSP-4</td>
<td align="left">12 or ICSP-1</td>
<td align="center">13 or ICSP-3</td>
<td align="center">10</td>
<td align="center">10</td>
<td>3,3V</td>
</tr>
<tr>
<td><span class="wikiword">MKR1000</span></td>
<td align="center">8</td>
<td align="center">10</td>
<td align="center">9</td>
<td align="center">&#8211;</td>
<td align="center">&#8211;</td>
<td>3,3V</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Note that MISO, MOSI, and SCK are available in a consistent physical location on the ICSP header; this is useful, for example, in designing a shield that works on every board.</p>
<div><img decoding="async" title="" src="https://www.arduino.cc/en/uploads/Reference/ICSPHeader.jpg" alt="" data-pin-nopin="true" /></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h1 id="Step3" style="text-align: left;"><strong>Connections</strong></h1>
<p>&nbsp;</p>
<p>The connections between the Ethernet module and Arduino is really simple, you just need six lines to be connected to get it going. Refer the Images below to connect your circuit.</p>
<p>&nbsp;</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/Ethernet-Connections.jpg" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-536 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/Ethernet-Connections.jpg" alt="Ethernet Connections" width="600" height="600" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-Connections.jpg 600w, https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-Connections-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-Connections-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Ethernet-Connections-184x184.jpg 184w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p style="padding-left: 210px;">Image Credit: Sparkfun</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/Arduino-SPI.jpg" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-540 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/Arduino-SPI.jpg" alt="Arduino-SPI" width="1843" height="1984" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Arduino-SPI.jpg 1843w, https://learn.edwinrobotics.com/wp-content/uploads/Arduino-SPI-279x300.jpg 279w, https://learn.edwinrobotics.com/wp-content/uploads/Arduino-SPI-951x1024.jpg 951w" sizes="auto, (max-width: 1843px) 100vw, 1843px" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://learn.edwinrobotics.com/wp-content/uploads/EthernetArduino.jpg" target="_blank"><img loading="lazy" decoding="async" class="alignnone wp-image-542 size-full" src="http://learn.edwinrobotics.com/wp-content/uploads/EthernetArduino.jpg" alt="Ethernet+Arduino" width="770" height="953" srcset="https://learn.edwinrobotics.com/wp-content/uploads/EthernetArduino.jpg 770w, https://learn.edwinrobotics.com/wp-content/uploads/EthernetArduino-242x300.jpg 242w" sizes="auto, (max-width: 770px) 100vw, 770px" /></a></p>
<p style="padding-left: 210px;">Circuit generated Using Fritzing Software</p>
<p>Connect the Jumper wires as mentioned above, once done power up your arduino and connect the Ethernet cable from the router to the WIZ811MJ Module. Refer the next section to see the code used for this module.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h1 id="Step4" style="text-align: left;"><strong>Sample Code</strong></h1>
<p>&nbsp;</p>
<p>We have reached the last step of this hookup guide, only thing left in this hookup guide is to upload the code to the arduino and see the output. In order to get it running we are going to use the Arduino Ethernet Library which comes by default when you install the software.</p>
<p>Open the example code from this mentioned path:</p>
<p>Arduino Examples  -&gt;  Ethernet  -&gt;   WebServer</p>
<p>&nbsp;</p>
<p>or copy paste the follwing into your arduino and upload the code</p>
<blockquote><p>/*<br />
Web Server</p>
<p>A simple web server that shows the value of the analog input pins.<br />
using an Arduino Wiznet Ethernet shield.</p>
<p>Circuit:<br />
* Ethernet shield attached to pins 10, 11, 12, 13<br />
* Analog inputs attached to pins A0 through A5 (optional)</p>
<p>created 18 Dec 2009<br />
by David A. Mellis<br />
modified 9 Apr 2012<br />
by Tom Igoe</p>
<p>*/</p>
<p>#include &lt;SPI.h&gt;<br />
#include &lt;Ethernet.h&gt;</p>
<p>// Enter a MAC address and IP address for your controller below.<br />
// The IP address will be dependent on your local network:<br />
byte mac[] = {<br />
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED<br />
};<br />
IPAddress ip(192, 168, 1, 177);</p>
<p>// Initialize the Ethernet server library<br />
// with the IP address and port you want to use<br />
// (port 80 is default for HTTP):<br />
EthernetServer server(80);</p>
<p>void setup() {<br />
// Open serial communications and wait for port to open:<br />
Serial.begin(9600);<br />
while (!Serial) {<br />
; // wait for serial port to connect. Needed for Leonardo only<br />
}<br />
// start the Ethernet connection and the server:<br />
Ethernet.begin(mac, ip);<br />
server.begin();<br />
Serial.print(&#8220;server is at &#8220;);<br />
Serial.println(Ethernet.localIP());<br />
}<br />
void loop() {<br />
// listen for incoming clients<br />
EthernetClient client = server.available();<br />
if (client) {<br />
Serial.println(&#8220;new client&#8221;);<br />
// an http request ends with a blank line<br />
boolean currentLineIsBlank = true;<br />
while (client.connected()) {<br />
if (client.available()) {<br />
char c = client.read();<br />
Serial.write(c);<br />
// if you&#8217;ve gotten to the end of the line (received a newline<br />
// character) and the line is blank, the http request has ended,<br />
// so you can send a reply<br />
if (c == &#8216;\n&#8217; &amp;&amp; currentLineIsBlank) {<br />
// send a standard http response header<br />
client.println(&#8220;HTTP/1.1 200 OK&#8221;);<br />
client.println(&#8220;Content-Type: text/html&#8221;);<br />
client.println(&#8220;Connection: close&#8221;); // the connection will be closed after completion of the response<br />
client.println(&#8220;Refresh: 5&#8221;); // refresh the page automatically every 5 sec<br />
client.println();<br />
client.println(&#8220;&lt;!DOCTYPE HTML&gt;&#8221;);<br />
client.println(&#8220;&lt;html&gt;&#8221;);<br />
// output the value of each analog input pin<br />
for (int analogChannel = 0; analogChannel &lt; 6; analogChannel++) {<br />
int sensorReading = analogRead(analogChannel);<br />
client.print(&#8220;analog input &#8220;);<br />
client.print(analogChannel);<br />
client.print(&#8221; is &#8220;);<br />
client.print(sensorReading);<br />
client.println(&#8220;&lt;br /&gt;&#8221;);<br />
}<br />
client.println(&#8220;&lt;/html&gt;&#8221;);<br />
break;<br />
}<br />
if (c == &#8216;\n&#8217;) {<br />
// you&#8217;re starting a new line<br />
currentLineIsBlank = true;<br />
}<br />
else if (c != &#8216;\r&#8217;) {<br />
// you&#8217;ve gotten a character on the current line<br />
currentLineIsBlank = false;<br />
}<br />
}<br />
}<br />
// give the web browser time to receive the data<br />
delay(1);<br />
// close the connection:<br />
client.stop();<br />
Serial.println(&#8220;client disconnected&#8221;);<br />
}<br />
}</p></blockquote>
<p>&nbsp;</p>
<p>Once done with uploading the code, you must open the serial terminal. Now open web browser in your Computer and copy paste this IP address 192.168.1.177 to your address bar and hit enter. If some page loads up showing up values from the arduino it means your connection is established successfully. In order to  see the sensor readings on the web page, connect some sensors or potentiometer to Analog pins A0, A1, A2, A3, A4 and A5. You are able to read these values on the web page. Now try with other examples provided with Ethernet library.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://learn.edwinrobotics.com/ethernet-hookup-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 57/98 objects using APC
Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching 6/23 queries in 0.015 seconds using APC

Served from: learn.edwinrobotics.com @ 2025-07-26 02:01:48 by W3 Total Cache
-->