Easy networking starting with Wiznet W5500 and GR-KURUMI?

details

m_Img_2999s m_Img_3000s

INTRO.

The Author designed Ethernet shield with W5500 which designed by WIZnet for GR-KURUMI and Arduino Pro Mini as well. And it describes how to use it. GR-KURUMI is the second line of Gadget Renesas reference boards. The board incorporates the RL78/G13, Renesas 16-bit low-power consumption MCU. Compatible with Arduino Pro Mini, this new board can use existing sample codes, ensuring easy use with Arduino language and standard libraries from both hardware and software aspects.

 

GR-KURUMI.

Microcontroller      RL78/G13 (R5F100GJAF B 48 pin QFP)

ROM/RAM              256KB/20KB

Data flash                 8KB

Frequency                32MHz (Internal XO)

Sub Clock                 32.768KHz

Operating Voltage  2.7V to 5.5V

 

GR-KURUMI : http://gadget.renesas.com/en/product/kemuri.html

 

DESIGN.

walnet001

walnet002-2870d

 

TEST CODE.

/ * GR-KURUMI Sketch Template Version: V 1.04 * /
#include <RLduino78.h>
#include <SPI.h>
#include <Ethernet.h>

Char server [] = "www.google.com"; // name address for Google (using DNS)
// if you do not want to use DNS (and reduce your sketch size)
/ / Use the numeric IP instead of the name for the server:
// IPAddress server (74,125,232,128); / / numeric IP for Google (no DNS)
IPAddress ip (192, 168, 100, 177);
Byte mac [] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};

EthernetClient client;

Const int RSTn = 4; // LOW active

/ / The setup routine runs once when you press reset:
Void setup ()
{
  // initialize the digital pin as an output.
  Serial.begin (9600);
  Serial.println ("initialize w 5500 ...");
  PinMode (RSTn, OUTPUT);
  DigitalWrite (RSTn, LOW); // w5500 reset start
  Delay (10);
  DigitalWrite (RSTn, HIGH); // w5500 reset end

  If (Ethernet.begin (mac) == 0)
  {
    Serial.println ("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    // try to congifure using IP address instead of DHCP:
    //Ethernet.begin(ip);
    Ethernet.begin (mac, ip);
  }

  Delay (1000);
  Serial.println ("connecting ...");

  // if you get a connection, report back via serial:
  If (client.connect (server, 80))
  {
    Serial.println ("connected");
    // Make a HTTP request:
    Client.println ("GET / search? Q = arduino HTTP / 1.1");
    Client.println ("Host: www.google.com");
    Client.println ("Connection: close");
    Client.println ();
  } 
  Else
  {
    // if you did not get a connection to the server:
    Serial.println ("connection failed");
  }
}

// the loop routine runs over and over again forever:
Void loop ()
{
  // if there are incoming bytes available 
  // from the server, read them and print them:
  If (client.available ())
  {
    Char c = client.read ();
    Serial.print (c);
  }

  / / If the server's disconnected, stop the client:
  If (! Client.connected ())
  {
    Serial.println ();
    Serial.println ("disconnecting.");
    Client.stop ();

    // do nothing forevermore:
    While (true);
  }
}

 

 

BLOG : http://hamayan.blog.so-net.ne.jp/2013-11-15

 

m_Img_2999s m_Img_3000s

INTRO.

The Author designed Ethernet shield with W5500 which designed by WIZnet for GR-KURUMI and Arduino Pro Mini as well. And it describes how to use it. GR-KURUMI is the second line of Gadget Renesas reference boards. The board incorporates the RL78/G13, Renesas 16-bit low-power consumption MCU. Compatible with Arduino Pro Mini, this new board can use existing sample codes, ensuring easy use with Arduino language and standard libraries from both hardware and software aspects.

 

GR-KURUMI.

Microcontroller      RL78/G13 (R5F100GJAF B 48 pin QFP)

ROM/RAM              256KB/20KB

Data flash                 8KB

Frequency                32MHz (Internal XO)

Sub Clock                 32.768KHz

Operating Voltage  2.7V to 5.5V

 

GR-KURUMI : http://gadget.renesas.com/en/product/kemuri.html

 

DESIGN.

walnet001

walnet002-2870d

 

TEST CODE.

/ * GR-KURUMI Sketch Template Version: V 1.04 * /
#include <RLduino78.h>
#include <SPI.h>
#include <Ethernet.h>

Char server [] = "www.google.com"; // name address for Google (using DNS)
// if you do not want to use DNS (and reduce your sketch size)
/ / Use the numeric IP instead of the name for the server:
// IPAddress server (74,125,232,128); / / numeric IP for Google (no DNS)
IPAddress ip (192, 168, 100, 177);
Byte mac [] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};

EthernetClient client;

Const int RSTn = 4; // LOW active

/ / The setup routine runs once when you press reset:
Void setup ()
{
  // initialize the digital pin as an output.
  Serial.begin (9600);
  Serial.println ("initialize w 5500 ...");
  PinMode (RSTn, OUTPUT);
  DigitalWrite (RSTn, LOW); // w5500 reset start
  Delay (10);
  DigitalWrite (RSTn, HIGH); // w5500 reset end

  If (Ethernet.begin (mac) == 0)
  {
    Serial.println ("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    // try to congifure using IP address instead of DHCP:
    //Ethernet.begin(ip);
    Ethernet.begin (mac, ip);
  }

  Delay (1000);
  Serial.println ("connecting ...");

  // if you get a connection, report back via serial:
  If (client.connect (server, 80))
  {
    Serial.println ("connected");
    // Make a HTTP request:
    Client.println ("GET / search? Q = arduino HTTP / 1.1");
    Client.println ("Host: www.google.com");
    Client.println ("Connection: close");
    Client.println ();
  } 
  Else
  {
    // if you did not get a connection to the server:
    Serial.println ("connection failed");
  }
}

// the loop routine runs over and over again forever:
Void loop ()
{
  // if there are incoming bytes available 
  // from the server, read them and print them:
  If (client.available ())
  {
    Char c = client.read ();
    Serial.print (c);
  }

  / / If the server's disconnected, stop the client:
  If (! Client.connected ())
  {
    Serial.println ();
    Serial.println ("disconnecting.");
    Client.stop ();

    // do nothing forevermore:
    While (true);
  }
}

 

 

BLOG : http://hamayan.blog.so-net.ne.jp/2013-11-15

 

COMMENTS

Please Login to comment
  Subscribe  
Notify of