ioShield-K is an Ethernet Shield for GR-KURUMI(Gadget Renesas KURUMI). The ioShield-K allows a GR-KURUMI board to connect to the internet. It is based on the Wiznet W5500 ethernet chip (W5500 Datasheet). The Wiznet W5500 provides a network (IP) stack capable of both TCP and UDP. It supports up to eight simultaneous socket connections. Use the Ethernet library(WIZ_Ethernet_Library) to write sketches which connect to the internet using the shield. The ioShield-K connects to an GR-KURUMI board using long wire-wrap headers which extend through the shield.
Gadget Renesas is a promotion project to offer a series of boards and “easy to start with” cloud-based software environment for people who have no embedded programming experience, for embedded professionals to do rapid prototyping.
GR-KURUMI is the reference board that incorporates the RL78G14 (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.
Very easy, just mount the two board.
ioShield-K is designed to plug in to the corresponding pins of GR-KURUMI B/D(JP1/JP6/JP7) and WIZ550io(J1/J2),
Pin No. | I/O | Pin Name | Description | |
---|---|---|---|---|
J1 | 1 | P | GND | Ground |
2 | P | GND | Ground | |
3 | I | MOSI | SPI Master Out Slave In This pin is used for SPI MOSI signal pin |
|
4 | O | MISO | SPI Master In Slave Out This pin is used for SPI MISO signal pin |
|
5 | I | SCLK | SPI Clock This pin is used for SPI Clock Signal pin |
|
6 | O | SCS | SPI Slave Select This pin is used for SPI Slave Select Signal Pin when using SPI interface |
|
7 | P | 3V3D | Power: 3.3V Power Supply | |
8 | P | 3V3D | Power: 3.3V Power Supply |
Pin No. | I/O | Pin Name | Description | |
---|---|---|---|---|
J2 | 1 | P | 3V3D | Power: 3.3V Power Supply |
2 | I | RDY | READY This pin is asserted to low after power on. Then when nRESET is activated, WIZ550io does auto configuration with embedded MAC and default IP address inside it. After all configuration is finished, WIZ550io raises this pin to HIGH to inform that the configuration of WIZ550io is completed. Host processor can only control WIZ55oio when RDY pin is HIGH. |
|
3 | I | nRESET | Reset: Active low This pin is to initialize WIZ550io. It should be held at least 500us after asserted to LOW, and wait for at least 150ms after changed to HIGH until WIZ550io itself is configured. |
|
4 | I | NC | Not Connected | |
5 | O | nINT | Interrupt: Active low This pin indicates that W5500 inside WIZ550io requires MCU's attention because of event like socket connection, disconnection, data receiving timeout and WOL(Wake on LAN). The interrupt is cleared by writing IR register or Sn_IR. All interrupts are maskable. |
|
6 | P | GND | Ground |
Pin No. | I/O | Pin Name | Description | |
---|---|---|---|---|
JP1/J4 | 1 | O | DTR | Data Terminal Ready |
2 | O | TXO | Transmit Data | |
3 | I | RXI | Receive Data | |
4 | P | 3V3 | Power: 3.3V Power Supply | |
5 | I | CTS | Clear To Send | |
6 | P | GND | Ground |
Pin No. | I/O | Pin Name | Description | |
---|---|---|---|---|
JP7/JP5 | 1 | I/O | D9 | Digital Port9 |
2 | I/O | D8 | Digital Port8 | |
3 | I/O | D7 | Digital Port7 | |
4 | I/O | D6 | Digital Port6 | |
5 | I/O | D5 | Digital Port5 | |
6 | I/O | D4 | Digital Port4 | |
7 | I/O | D3 | Digital Port3 | |
8 | I/O | D2 | Digital Port2 | |
9 | P | GND | Ground | |
10 | I | nRESET | Reset: Active low This pin is to initialize WIZ550io. It should be held at least 500us after asserted to LOW, and wait for at least 150ms after changed to HIGH until WIZ550io itself is configured. |
|
11 | O | TXO | Transmit Data | |
12 | I | RXI | Receive Data |
Pin No. | I/O | Pin Name | Description | |
---|---|---|---|---|
JP6/J6 | 1 | P | RAW | External Power Supply |
2 | P | GND | Ground | |
3 | I/O | nRESET | Reset: Active low This pin is to initialize WIZ550io. It should be held at least 500us after asserted to LOW, and wait for at least 150ms after changed to HIGH until WIZ550io itself is configured. |
|
4 | I/O | 3V3 | Power: 3.3V Power Supply | |
5 | I/O | A3 | Analog Port3 | |
6 | I/O | A2 | Analog Port2 | |
7 | I/O | A1 | Analog Port1 | |
8 | I/O | A0 | Analog Port0 | |
9 | SCLK | SPI Slave Select This pin is used for SPI Slave Select |
||
10 | I | MISO | SPI Master In Slave Out This pin is used for SPI MISO signal pin |
|
11 | O | MOSI | SPI Master Out Slave In This pin is used for SPI MOSI signal pin |
|
12 | I | D10 | Digital Port10 |
Pin No. | I/O | Pin Name | Description | |
---|---|---|---|---|
J7 | 1 | I/O | A4 | Analog Port4 |
2 | I/O | A5 | Analog Port5 | |
3 | I/O | A6 | Analog Port6 | |
4 | I/O | A7 | Analog Port4 |
Connect the shield to your computer or a network hub or router using a standard ethernet cable (CAT5 or CAT6 with RJ45 connectors). Connecting to a computer may require the use of a cross-over cable (although many computers, including all recent Macs can do the cross-over internally).
Gadget Renesas Board User Forum Japanese site provides sketch IDE V1.00 for GR-KURUMI e2stuido. Sketch of GR-KURUMI also use the Web compiler normall, I can sketch any integrated development environment e2studio (It becomes the Windows-only). Ethernet Library for GR-KURUMI is included sketch IDE V1.00. This Ethernet Library is compatible with Arduino Ethernet Library.
Start by downloading the library from
* Wiz_Ethernet_Library
* you can just click.
Download all files and overwrite onto the "RLduino78/libraries/Ethernet" folder in your project in sketch.
Remove "examples" folder in "RLduino78/libraries/Ethernet".
/* * Copyright (c) 2013 by WIZnet <support@wiznet.co.kr> * * This file is free software; you can redistribute it and/or modify * it under the terms of either the GNU General Public License version 2 * or the GNU Lesser General Public License version 2.1, both as * published by the Free Software Foundation. */ #ifndef W5100_H_INCLUDED #define W5100_H_INCLUDED #include <avr/pgmspace.h> #include <SPI.h> typedef uint8_t SOCKET; //#define W5100_ETHERNET_SHIELD // original ethernet shield from Arduino //#define W5200_ETHERNET_SHIELD // Ethernet Shield version 2 from Seeed. #define W5500_ETHERNET_SHIELD // ioShield Series
//#define SPI_MODE_MASK 0x3000 // DAP = bit 13, CKP = bit 12 on SCR #define SPI_MODE_MASK 0x0000 // DAP = bit 13, CKP = bit 12 on SCR
SPI_SIRxx = 0x0007; // clear error flag SPI_SMRxx = 0x0020; // mode config. SPI_SCRxx = 0xF007; // serial mode config. //SPI_SDRxx = SPI_CLOCK_DIV4 << 9; // 8MHz, clock divider config. SPI_SDRxx = SPI_CLOCK_DIV2 << 9; // 16MHz,clock divider config.
WIZnet povides the Ethernet Shield examples for GR_KURUMI.
The examples(template) files of Ethernet example are prepared in “gr_ethernet_examples” folder, as like gr_ChatServer.cpp. Copy template file to your sketch file (gr_sketch.cpp) and change configuration values properly. After that, you can check if it is work well.
For example, if you want to evaluate 'ChatServer', you copy “gr_ChatServer.cpp” to “gr_scketch.cpp”. Then, you should change IP Address first and compile and download it. You can chatting through your terminal of your PC or something.
Lists of Ethernet Shield exmaple
BarometricPressureWebServer
ChatServer
DhcpAddressPrinter
DhcpChatServer
TelnetClient
Twitter_Serial_GW
Twitter_SimplePost
UDPSendReceiveString
UdpNtpClient
WebClient
WebClientRepeating
WebServer
XivelyClient
XivelyClientString
PC
Please, add an IP Address from the Command Line in "command prompt". The below command adds the IP Address 192.168.1.2 (with Subnet Mask 255.255.255.0) to the connection titled “Local Area Network”.
netsh interface ipv4 add address “Local Area Connection” 192.168.1.2 255.255.255.0
Note: For Windows Server 2003/XP and earlier, “ipv4″ should be replaced with just “ip” in the netsh command.
ioShield (ChatServer Sketch)
// The IP address will be dependent on your local network,
// gateway and subnet.
IPAddress ip(192,168,1, 177);
IPAddress gateway(192,168,1, 1);
IPAddress subnet(255, 255, 255, 0);
Tip:Subnet?
A subnet mask hides, or "masks," the network part of a system's IP address and leaves only the host part as the machine identifier. A common subnet mask for a Class C IP address is 255.255.255.0. Each section of the subnet mask can contain a number from 0 to 256, just like an IP address.
The last section of each computer's IP address can be anything from 0 to 255. For example, the IP addresses 192.168.1.2 and 192.168.1.177 would be in the same subnet, while 192.168.2.201 would not. Therefore, a subnet mask of 255.255.255.0 allows for close to 256 unique hosts within the network (since not all 256 IP addresses can be used).
Bard rate : 9600
Data : 8bit
Parity : none
Stop : 1bit
Flow control : none
- Check #1 : Listening on ChatServer
Check the message of "Chat server address:192.168.1.177" on Serial Port terminal.
Chat Client
-Receiving hello message from ChatServer after clicking enter-key at teraterm window
Chat Server
-Receiving "ABCDE" message from ChatClient and print-out the message