SE SP-01の“あっ”と驚く活用法:GR-KURUMIで高性能デバイスを制御&デバッグ! – EDN Japan

 

GR-KURUMI

SE SP-01の“あっ”と驚く活用法:GR-KURUMIで高性能デバイスを制御&デバッグ! – EDN Japan.

GR-KURUMI(じーあーる・くるみ)とは

 GR-KURUMIのGRは「Gadget Renesas」(がじぇっとるねさす)が提供する小型のリファレンスボードです。超低消費電力マイコンであるRL78が搭載され、ピンク色の基板に女の子の顔がシルク印刷されていてLEDの髪留めがチャーミングです。GR-KURUMIの基板サイズや、外部拡張端子はArduino Pro Mini(アルドゥイーノ・プロ・ミニ)互換で設計されており、その小型なパッケージングから、ホビー用途から、はてはアートへの組み込みマイコンとして幅広く活躍しています。また、開発環境はWebアプリを使ったクラウド・コンパイル環境(Renesas Web Compiler)を実現しており、極めて低コストでマイコン開発を始めることができるようになっているのも幅広いユーザー層の支持を得ています。

WIZ820io_GR-KURUMI

WIZ820io

WIZ820io provides easy and simple Ethernet connectivity to small platforms like GR-KURUMI (Compatible with Arduino Pro Mini).
WIZnet W5200 ethernet chip is used in WIZ820io.
To use WIZ820io with GR-KURUMI, users need to replace 4 files in the Ethernet library for GR-KURUMI.

WIZ820io

GR-SAKURA – Forum, GR-KURUMI

Hardware

WIZ820io_GR_KURUMIPWDN, nINT signals are not used.

Software

GitHub_Link:WIZ820io_GR_KURUMI

Install W5200 library

Download modified w5100.cpp & w5100.h and files (attached) and overwrite onto the”RLduino78/libraries/Ethernet/utility” folder in your project in e2studio.

  • Uncomment a below line in the modified w5100.h
//#define W5100_ETHERNET_SHIELD
#define W5200_ETHERNET_SHIELD
  • Change MAX_SOCK_NUM as 8 on Ethernet.h in RLduino78/libraries.
//#define MAX_SOCK_NUM 4 //for W5100 Ethernet Shield
#define MAX_SOCK_NUM 8 //for W5200 Ethernet Shield / WIZ820io

SPI Configuration

    • Set SPI Mode as Mode0 and change the SPI.h in ” RLduino78/libraries/SPI” as below,
//#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 for WIZ820ioIZ820iohield
    • Set SPI Clock Divider (@16MHz)and change the in SPI.c in “RLduino78/libraries/SPI ” as below,
#include "pins_arduino.h"
#include "SPI.h"
SPIClass SPI;
void SPIClass::begin() {
...
SPI_SIRxx = 0x0007; // Clear Error Flag , エラ-フラグをクリ
SPI_SMRxx = 0x0020; // Config. SPI Mode , モ-ド設定
SPI_SCRx = 0xF007; // Config. Serial , シリアル通信動作設定
//SPI_SDRxx = SPI_CLOCK_DIV4 << 9; // Config. SPI Clock Diviver (@8MHz), 動作クロックの分周設定
SPI_SDRxx = SPI_CLOCK_DIV2 << 9; // Config. SPI Clock Diviver (@16MHz)動作クロックの分周設定
...
}

Using the W5200 library and evaluate existing Ethernet example.

All other steps are the same as the steps from the Arduino Ethernet Shield. You can find examples in the Arduino IDE, go to Files->Examples->Ethernet, open any example, then copy it 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 choose ‘WebServer’, you should change IP Address first and compile and download it. Then you can access web server page through your web browser of your PC or something.

Revision History

Initial Release : 28 July 2013