<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=YC</id>
		<title>Microduino Wikipedia - 用户贡献 [zh-cn]</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=YC"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php/%E7%89%B9%E6%AE%8A:%E7%94%A8%E6%88%B7%E8%B4%A1%E7%8C%AE/YC"/>
		<updated>2026-04-21T11:30:20Z</updated>
		<subtitle>用户贡献</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_ENC_Network_(1)&amp;diff=3211</id>
		<title>Microduino ENC Network (1)</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_ENC_Network_(1)&amp;diff=3211"/>
				<updated>2014-07-06T06:24:30Z</updated>
		
		<summary type="html">&lt;p&gt;YC：Misspelled word(s) - already was spelled as alredy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Language | Microduino ENC网络（一）}}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
This tutorial will show you how to ping the Microduino.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
*'''[[Microduino-ENC28J60]]'''&lt;br /&gt;
*'''[[Microduino-RJ45]]'''&lt;br /&gt;
*Other equipment&lt;br /&gt;
**USB cable&lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
*Microduino-ENC28J60&lt;br /&gt;
*Microduino-RJ45&lt;br /&gt;
*Microduino-Core&lt;br /&gt;
*Microduino-FT232R&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! rowspan=&amp;quot;1&amp;quot; | ENC28J60 module || Microduino Pin || Function&lt;br /&gt;
|-&lt;br /&gt;
| SCK|| D13 || SPI bus clock&lt;br /&gt;
|-&lt;br /&gt;
| SI || D12 || Data input pin&lt;br /&gt;
|-&lt;br /&gt;
| SO  || D11 || Data output pin&lt;br /&gt;
|-&lt;br /&gt;
| CS || D8 || SPI chip select (Defined in program)&lt;br /&gt;
|-&lt;br /&gt;
| INT || D2 || interrupt (INT0)&lt;br /&gt;
|-&lt;br /&gt;
| RST || RST || reset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Stack all modules and then connect the ethernet cable, as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:MicroduinoENCShow.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
Download the program:&lt;br /&gt;
https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_ENC/ENCnetworkone&lt;br /&gt;
&lt;br /&gt;
==Debug==&lt;br /&gt;
&lt;br /&gt;
Step 1：  Download the EtherCard library and copy to your libraries fold of IDE, then restart IDE.&lt;br /&gt;
https://github.com/jcw/ethercard&lt;br /&gt;
&lt;br /&gt;
Step 2：  Before connect to network, you need learn some network parameter.&lt;br /&gt;
&lt;br /&gt;
'''Network parameter：'''&lt;br /&gt;
Before connecting Ethernet shield to the net, you need some parameters:&lt;br /&gt;
&lt;br /&gt;
*MAC address, is a 48bit number that univocally identify each device in the net. Every company that produces network devices owns a code (OUI) that represents the address’ first 24bits;&lt;br /&gt;
*IP address, is a 32bit number (IPv4) that identify the device in the local network;&lt;br /&gt;
*Subnet mask is a 32bit number that allows devices to know if another device belongs to the same local network;&lt;br /&gt;
*(usually) gateway is the IP address assigned to a device (router…) that allows to reach devices in different networks.&lt;br /&gt;
&lt;br /&gt;
You need to choose a MAC address not already used in your network… in the examples we usually choose MAC addresses with a not already assigned organization code (es. DD-DD-DD).&lt;br /&gt;
&lt;br /&gt;
IP parameters (address, subnet, gateway) have to be consistent with the ones configured to other devices in your local network: an unique IP address and the same subnet mask and gateway.&lt;br /&gt;
&lt;br /&gt;
Sometimes a DHCP server is available, that automatically configures new devices in the network: in a next example I’m going to show how to use this with Arduino.&lt;br /&gt;
&lt;br /&gt;
Step 3：  Explain the program.&lt;br /&gt;
&lt;br /&gt;
//First you need to include the EtherCard library and define some variables: MAC address, IP address and a buffer the library will use to store incoming and outgoing data;&lt;br /&gt;
&lt;br /&gt;
   include &amp;lt;EtherCard.h&amp;gt;&lt;br /&gt;
   static byte mymac[] = {0x74,0x69,0x69,0x2D,0x30,0x31};&lt;br /&gt;
   static byte myip[] = {192,168,1,10};&lt;br /&gt;
   byte Ethernet::buffer[700];&lt;br /&gt;
&lt;br /&gt;
ether.staticSetup(myip);&lt;br /&gt;
//complete configuration with a static configuration for the IP address. Use the function staticSetup() method to configure the static IP, it has three parameters, that are ip address, gateway and DNS.&lt;br /&gt;
IP is mandatory, others are optional. The following is the defination.&lt;br /&gt;
&lt;br /&gt;
   static bool staticSetup (const uint8_t* my_ip =0, const uint8_t* gw_ip =0, const uint8_t* dns_ip =0);&lt;br /&gt;
&lt;br /&gt;
//in the loop, you need only 2 instructions:&lt;br /&gt;
&lt;br /&gt;
//packetReceive()method receives a new incoming packet from the network;&lt;br /&gt;
&lt;br /&gt;
//packetLoop()  method answers to specific incoming messages, including the “ping” ones (ICMP echo request)&lt;br /&gt;
&lt;br /&gt;
   ether.packetLoop(ether.packetReceive());&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 4：  Download the program and compile it.&lt;br /&gt;
&lt;br /&gt;
Step 5：  ping！&lt;br /&gt;
&lt;br /&gt;
Check a device if has online, the &amp;quot;ping&amp;quot; command is a simple method. Ping the destination device's IP.&lt;br /&gt;
&lt;br /&gt;
[[File:cmdPing.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
&lt;br /&gt;
The upper picture indicates that the device has obeen online.&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>YC</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_ENC_Network_(1)&amp;diff=3210</id>
		<title>Microduino ENC Network (1)</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_ENC_Network_(1)&amp;diff=3210"/>
				<updated>2014-07-06T06:11:56Z</updated>
		
		<summary type="html">&lt;p&gt;YC：A misspelled word - represents was spelled rappresents&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Language | Microduino ENC网络（一）}}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
This tutorial will show you how to ping the Microduino.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
*'''[[Microduino-ENC28J60]]'''&lt;br /&gt;
*'''[[Microduino-RJ45]]'''&lt;br /&gt;
*Other equipment&lt;br /&gt;
**USB cable&lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
*Microduino-ENC28J60&lt;br /&gt;
*Microduino-RJ45&lt;br /&gt;
*Microduino-Core&lt;br /&gt;
*Microduino-FT232R&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! rowspan=&amp;quot;1&amp;quot; | ENC28J60 module || Microduino Pin || Function&lt;br /&gt;
|-&lt;br /&gt;
| SCK|| D13 || SPI bus clock&lt;br /&gt;
|-&lt;br /&gt;
| SI || D12 || Data input pin&lt;br /&gt;
|-&lt;br /&gt;
| SO  || D11 || Data output pin&lt;br /&gt;
|-&lt;br /&gt;
| CS || D8 || SPI chip select (Defined in program)&lt;br /&gt;
|-&lt;br /&gt;
| INT || D2 || interrupt (INT0)&lt;br /&gt;
|-&lt;br /&gt;
| RST || RST || reset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Stack all modules and then connect the ethernet cable, as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:MicroduinoENCShow.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
Download the program:&lt;br /&gt;
https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_ENC/ENCnetworkone&lt;br /&gt;
&lt;br /&gt;
==Debug==&lt;br /&gt;
&lt;br /&gt;
Step 1：Download the EtherCard library and copy to your libraries fold of IDE, then restart IDE.&lt;br /&gt;
https://github.com/jcw/ethercard&lt;br /&gt;
&lt;br /&gt;
Step 2：Before connect to network, you need learn some network parameter.&lt;br /&gt;
&lt;br /&gt;
'''Network parameter：'''&lt;br /&gt;
Before connecting Ethernet shield to the net, you need some parameters:&lt;br /&gt;
&lt;br /&gt;
*MAC address, is a 48bit number that univocally identify each device in the net. Every company that produces network devices owns a code (OUI) that represents the address’ first 24bits;&lt;br /&gt;
*IP address, is a 32bit number (IPv4) that identify the device in the local network;&lt;br /&gt;
*Subnet mask is a 32bit number that allows devices to know if another device belongs to the same local network;&lt;br /&gt;
*(usually) gateway is the IP address assigned to a device (router…) that allows to reach devices in different networks.&lt;br /&gt;
&lt;br /&gt;
You need to choose a MAC address not alredy used in your network… in the examples we usually choose MAC addresses with a not already assigned organization code (es. DD-DD-DD).&lt;br /&gt;
&lt;br /&gt;
IP parameters (address, subnet, gateway) have to be consistent with the ones configured to other devices in your local network: an unique IP address and the same subnet mask and gateway.&lt;br /&gt;
&lt;br /&gt;
Sometimes a DHCP server is available, that automatically configures new devices in the network: in a next example I’m going to show how to use this with Arduino.&lt;br /&gt;
&lt;br /&gt;
Step 3：Explain the program.&lt;br /&gt;
&lt;br /&gt;
//First you need to include the EtherCard library and define some variables: MAC address, IP address and a buffer the library will use to store incoming and outgoing data;&lt;br /&gt;
&lt;br /&gt;
   include &amp;lt;EtherCard.h&amp;gt;&lt;br /&gt;
   static byte mymac[] = {0x74,0x69,0x69,0x2D,0x30,0x31};&lt;br /&gt;
   static byte myip[] = {192,168,1,10};&lt;br /&gt;
   byte Ethernet::buffer[700];&lt;br /&gt;
&lt;br /&gt;
ether.staticSetup(myip);&lt;br /&gt;
//complete configuration with a static configuration for the IP address. Use the function staticSetup() method to configure the static IP, it has three parameters, that are ip address, gateway and DNS.&lt;br /&gt;
IP is mandatory, others are optional. The following is the defination.&lt;br /&gt;
&lt;br /&gt;
   static bool staticSetup (const uint8_t* my_ip =0, const uint8_t* gw_ip =0, const uint8_t* dns_ip =0);&lt;br /&gt;
&lt;br /&gt;
//in the loop, you need only 2 instructions:&lt;br /&gt;
&lt;br /&gt;
//packetReceive()method receives a new incoming packet from the network;&lt;br /&gt;
&lt;br /&gt;
//packetLoop()  method answers to specific incoming messages, including the “ping” ones (ICMP echo request)&lt;br /&gt;
&lt;br /&gt;
   ether.packetLoop(ether.packetReceive());&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 4：Download the program and compile it.&lt;br /&gt;
&lt;br /&gt;
Step 5：ping！&lt;br /&gt;
&lt;br /&gt;
Check a device if has online, the &amp;quot;ping&amp;quot; command is a simple method. Ping the destination device's IP.&lt;br /&gt;
&lt;br /&gt;
[[File:cmdPing.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
&lt;br /&gt;
The upper picture indicates that the device has obeen online.&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>YC</name></author>	</entry>

	</feed>