How to use WIZnet Chip set such as W5100, W5200, W5300, and W5500 with Basic source code

by MCS electronics



Overview

This post introduces how to use WIZnet chip solution such like as W3100A, W5100, W5200, W5300, and W5500 with BASIC source code on BASCOM-AVR & BASCOM-8051.
BASCOM-AVR & BASCOM-8051 are BASIC complier & IDE development tools. These can implement with BASIC source code on WIZnet chip solutions.

CONFIG TCPIP

  • Syntax W3100A

    CONFIG TCPIP = int , MAC = mac , IP = ip, SUBMASK = mask, GATEWAY = gateway, LOCALPORT= port, TX= tx, RX= rx , NOINIT= 0|1 [, TWI=address] [, Clock = speed] [, baseaddress = address] [,TimeOut=tmOut] [,CHIP=W3100A] 
    
  • Syntax W5100

    CONFIG TCPIP = int , MAC = mac , IP = ip, SUBMASK = mask, GATEWAY = gateway, LOCALPORT= port, TX= tx, RX= rx , NOINIT= 0|1 [, baseaddress = address] [,TimeOut=tmOut] [,CHIP=5100] [,SPI=spi] [,INT=imsg] [,CS=cs] [,NOUDP=noudp] 
    
  • Syntax W5200

    CONFIG TCPIP = int , MAC = mac , IP = ip, SUBMASK = mask, GATEWAY = gateway, LOCALPORT= port, NOINIT= 0|1 [,TimeOut=tmOut] [,CHIP=W5200] [,SPI=spi] [,INT=imsg] [,CS=cs] [,NOUDP=noudp] [TXn= tx] [, RXn= rx] 
    
  • Syntax W5300

    CONFIG TCPIP = int , MAC = mac , IP = ip, SUBMASK = mask, GATEWAY = gateway, LOCALPORT= port, NOINIT= 0|1 [, baseaddress = address] [,TimeOut=tmOut] [,CHIP=W5300] [,INT=imsg] [,NOUDP=noudp] [align=align] [TXn= tx] [, RXn= rx] [SOCKMEM=sockmem] 
    
  • Syntax W5500

    CONFIG TCPIP = NOINT , MAC = mac , IP = ip, SUBMASK = mask, GATEWAY = gateway, LOCALPORT= port, NOINIT= 0|1 [,TimeOut=tmOut] [,CHIP=W5500] [,SPI=spi] [,INT=imsg] [,CS=cs] [,NOUDP=noudp] [TXn= tx] [, RXn= rx] 
    

Learn More

Goto Original

저작자 표시 동일 조건 변경 허락
신고
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

Cathodic Dis-bonding Tester - webbased

by Ben



Overview

This is a Cathodic Dis-bonding Tester. This device, during a month during test, tests the quality of paint. Two probes. Through the display and three keys the parameters can be filled in, voltage to put on the probes. But it is also web based and can be configured through the Intra/Internet.

WIZ810MJ for WEB monitoring through Intra/Internet

WIZ810MJ is used for WEB-based Monitoring functions.
The result of two probe measure wiht the “Cathodic dis-bonding Tester” shows on the WEB pages.

  • WIZ810MJ

  • Webbased IO-tester

Learn More

Goto Original


저작자 표시 동일 조건 변경 허락
신고
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

NET7026 : ARM7TMDI with W5300 Module

by MCT



Features

  • 59mm x 60mm, multilayer PCB
  • ARM7TDMI (ADuC7026, analog devices)
  • 41.78 MHz clock using PLL set
  • 62KB Flash 8KB RAM (ISP)
  • 1 MByte Serial Flash
  • 1MByte less RAM
  • UART, SPI, I2C
  • W5300 plus RJ45 Ethernet controller
  • 10 x 12 bit A/D converter (1Megasample)
  • 4 x 12 bit D/A converter (10us)
  • Comparator, voltage reference, temperature sensor, PLA
  • Max 13 free parallel I/o lines
  • 2 x timer 16 bit, 6 x PWM
  • Wake-up timer 16 bit
  • RTC DS1629
  • Watchdog
  • 10pol. connector for RS232 level converter IF232LP
  • Supply voltage 3, 3V
  • Power consumption typical 270mA
  • Weight only 23 g
  • Temperature range -40 ° C to + 85 ° C
  • Markings UL, CE, RoHS

Technial Data

Layout1
Layout2
Schematic

Learn More

Goto Original


저작자 표시 동일 조건 변경 허락
신고
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

W5300 evaluation board - HS-EVB-W5300/C8051F340 & HS-EVB-W5300/Mega64

by AXC


Evaluation Board “Board +HS-NM5300 module +CPU sub Board” structure, all Board and HS-NM5300 module for evaluation boards are the same, different CPU daughter Board, composed of different assessment boards.


1. HS-EVB-W5300/C8051F340

Main features:

  • CPU C8051F340 microcontroller, the user can very easily on porting software to any C8051Fxxx SCM; * Monolithic integrated circuit with direct bus and W5300 interfaces;
  • The C2 interface for single-chip software debugging;
  • CPU and W5100 3.3V voltage supply;
  • Provide a standard serial interface RS-232C.

2. HS-EVB-W5300/Mega64

Main features:

  • CPU with ATMega64 single-chip, users can easily transplant software on any AVR Microcontroller;
  • Monolithic integrated circuit with direct bus and W5300 interfaces;
  • JTAG interface provided for Mega64 software debugging, provided ISP interface is used for program downloads;
  • CPU and W5300 3.3V voltage supply;
  • Provide a standard serial interface RS-232C.

Learn more

Goto Original


저작자 표시 동일 조건 변경 허락
신고
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

Mini Module WIZnet W5300 - MMwiznet5300

by Propox



Overview

It was created with the idea of facilitating the communication of microprocessor systems through the Internet/Ethernet networks.
The heart of the module is the RISC Atmega128 microcontroller with 128kB of program memory and 64kB of (external) RAM memory, co-operating with the Ethernet controller, WizNET W5300.
The minimodule has an 512kB DataFlash serial memory for storage of WWW pages and of any files e.g. with measurement data. The memory is connected to a fast SPI bus with 8 Mb/s transmission speed.

Features

  • Fast RISC microcontroller ATmega128 with up to 16 MIPS throughput
  • Ethernet controller10/100Mb/s W5300 with hardware TCP/IP stack
  • 128kB of in circuit programmable FLASH program memory
  • 64KB of RAM memory
  • 4kB of EEPROM memory
  • Serial DataFlash memory 4Mbits (512kBytes)
  • Reliable reset circuit
  • Crystal resonator 14.7456 or 16 MHz
  • 4 LED diodes indicating: power, LAN activity, DataFlash activity
  • Fully SMD made on 4-layer PCB
  • 1 x 20 terminals with 0.1” (2.54mm) pitch fitting every prototype board
  • Available free operating system with TCP/IP stack supporting many protocols
  • Available evaluation board and sample applications
  • Small dimensions: 56mm x 30.5mm

Applications

The MMwiznet5300 minimodule can be used as a design base for electronic circuits co-operating from the
Ethernet/Internet network, covering the following areas of interest:

  • Industrial remote controlling and monitoring systems
  • Telemetry
  • Intelligent buildings
  • Alarm systems
  • Weather stations and environment monitoring
  • Medical electronicsHeating and air-conditioning systems
  • Telecommunication
  • Road traffic monitoring
  • Remote data logging
  • Home automation

The MMwiznet5300 minimodule can be also used in didactic workshops of information and electronic schools, illustrating the aspects of co-operation of electronic circuits from the Ethernet/Internet network, as well as be used to construct thesis circuits.

Learn More

Manual
Goto Original
The related

저작자 표시 동일 조건 변경 허락
신고
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

New Ethernet Master Extension V1.1

by TinkerForge



TinkerFoger made the new Two Ethernet Master Extension Modules with WIZnet W5200 Ethernet control chip. One is with POE. Two is without POE.

Description

With this Ethernet Extension you can control Bricks and Bricklets and integrate them into a LAN. 10BaseT/100BaseTX Ethernet is supported and the module is 1000BaseTX compatible. The Extension is available in two variants: The PoE variant features a integrated PoE power supply. It allows to power the connected modules over industry standard IEEE 802.3af, such that a PoE injector as well as PoE switches can be used to power stacks. Additionally a variant without PoE is available.

Features

  • Communicate directly with Bricks/Bricklets without Brickd
  • Supports 10/100 Mbit/s Ethernet (1000 Mbit/s compatible)
  • Integrated PoE Power Supply (PD Class 0 for IEEE 802.3af)
  • Can power a Stack via Ethernet Cable

Ethernet Configuration

The Ethernet Extension can be configured in two different modes: DHCP or static IP. If you use a static IP you have to enter IP, Subnet Mask and Gateway.

The MAC address of the Ethernet Extension is not fixed in hardware, it will be allocated by Tinkerforge. If it is lost in the EEPROM it can be found on the sticker of the Ethernet Extension.

After configuring the Ethernet Extension you have to press the button “Save Ethernet Configuration” and restart the Master Brick


Learn more

Goto Original
Goto Old Version V1.0


저작자 표시 동일 조건 변경 허락
신고
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

Zone Beacon

위즈네트/ETC 2015.11.11 09:43

Zone Beacon

By Zone Beacon


Zone Beacon은 Centralite사의 시리얼 기반 홈제어 제품에 WIZnet의 Serial-2-Ethernet 제품인 WIZ110SR를 연결하여 원격에서도 가전기기를 제어할 수 있도록 구성된 제품이다.


Setup

  • Part 1: Getting your devices connected.
  • Part 2: Getting the Gateway ready communicate with Zone Beacon.
  • Part 3: Setting up your first Zone from start to finish in Zone Beacon.

Demo

데모는 http://zonebeacon.com/demo.php 확인할 수 있다.

Learn More

Goto original site
Download App

 

저작자 표시 동일 조건 변경 허락
신고
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

mbed WIZwiki-W7500 platform with Smart IoT Cloud Server Thinger.io


This project is based on mbed WIZwiki-W7500 platform launced by WIZnet. WIZwiki-W7500 can connect to the smart IoT cloud server called thinger.io.

Overview

This project started from my finding an easy & optimized smart IoT cloud services for easy to work with WIZwiki-W7500 platform. I found a cloud server called as thinger.io. But, thinger.io cloud server supports just only the device APIs based on Arduino IDE. But I need a device APIs based on mbed. Fortunately, thinger.io supports the Ardunio Ethernet device APIs, and I can port these APIs to mbed ethernet device API for WIZwiki-W7500.

In porting, The developer of thinger.io give me so much help & support.

Thru this post, I thank him server soooo much.

I tested my thinger.io device API for mbed with YuRobot Easy module shiled v1 have many sensors and LEDs.

WIZwiki-W7500

This IoT platform made by WIZnet and lauched on mbed as silicon parter.

There are many example on mbed. For more detail, Refer to Wiki site or mbed.

This is compatible with Arduino PIN map.

Thinger.io

Thinger.io is a platform that allows connecting things to the Internet.

And what’s new?

  • Hardware agnostic: Connect anything! from basic Arduinos with very limited resources, to more complex embedded systems running linux like Raspberry Pi.

  • It is Open Source, so you can take the code an build your own cloud if you want. It provides thing API discovery right out of the box, so you can code your things and interact easily from the web. Turning a led on from the Internet just take one line of code in the device, seriously!. It has been designed with developers in mind, so any developer will love to work with this platform.

For more detail, Refer to thinger.io.

<NOTICE> This site povids beta sevice. If you want to test your device on thinger.io, You should get a beta access keys.

YuRobot Easy shiled V1

YoRobot Shield provide many sensor such as light, temperature, humidity, IR and etc.


What I do

Compatible Client Class for Arduino

This class - TCPSocketConnectionArdu - need to minimize modification to Arduino Ethernet Device API of thinger.io.

class TCPSocketConnectionArdu : public TCPSocketConnection {

    public:

    /** TCP socket connection **/
    TCPSocketConnectionArdu() {};
    virtual ~TCPSocketConnectionArdu() { TCPSocketConnection::close(); };

    ssize_t write(uint8_t);

    /** Send data to the remote host.
    \param data The buffer to send to the host.
    \param length The length of the buffer to send.
    \return the number of written bytes on success (>=0) or -1 on failure
     */
    virtual ssize_t write(const void *buf, size_t size);
    virtual int available();
    ssize_t read();    
    virtual ssize_t read(void *buf, size_t size);    
    virtual ssize_t readBytes(uint8_t* buf, size_t size);
    virtual ssize_t peek();
    virtual void flush();
    virtual void stop();

    /** Check if the socket is connected
    \return true if connected, false otherwise.
    */
    virtual uint8_t connected();
    virtual operator bool(); 

    friend class TCPSocketServer;
};

Ethernet & TCP Client API for mbed : ThingerMBedEthernet, ThingerMBedClient

This is ported from ThingerEthernet & ThingerClient.h in Arduino Ethernet Library of thinger.io

  • ThingerClient
#ifndef _DHCP_   // You should be define your network if no DHCP
    #define DEV_IP_ADDRESS "xxx.xxx.xxx.xxx"
    #define DEV_GW_ADDRESS "xxx.xxx.xxx.xxx"
    #define DEV_SN_ADDRESS "255.255.255.0"
#endif    

class ThingerEthernet : public ThingerClient {
public:

    ThingerEthernet(const char* user, const char* device, const char* device_credential) :
            ThingerClient(client_, user, device, device_credential), connected_(false)
    {}
    ~ThingerEthernet(){
    }

protected:
    virtual bool network_connected(){
        return connected_;
    }

    virtual bool connect_network(){
        if(connected_) return true;
        uint8_t mac[6] = { 0x1D, 0xdc, 0x08, 0x00, 0x62, 0x11 };
        unsigned long ethernet_timeout = millis();

#ifdef _DHCP_        
    #ifdef _DEBUG_
        printf("[NETWORK] Getting DHCP IP Address...\r\n");
    #endif
        ((EthernetInterface*)WIZnet_Chip::getInstance()).init(mac);
#else
        ((EthernetInterface*)WIZnet_Chip::getInstance())->init(mac,DEV_IP_ADDRESS,DEV_SN_ADDRESS,DEV_GW_ADDRESS);
#endif
        ((EthernetInterface*)WIZnet_Chip::getInstance())->ethernet_link();
        delay(3000);
    #ifdef _DEBUG_
        #ifdef _DHCP_
            printf("[NETWORK] Waiting for IP...\r\n");
        #endif
    #endif
        connected_ = true;    
        if(((EthernetInterface*)WIZnet_Chip::getInstance())->connect() > 0) connected_ = false;
#ifdef _DEBUG_
        printf("[NETWORK] Got Ip Address: %s\r\n",((EthernetInterface*)WIZnet_Chip::getInstance())->getIPAddress());
#endif
        delay(1000);
        return connected_;
    }

private:
    bool connected_;
    TCPSocketConnectionArdu  client_;
};
  • ThingerClient
//---For MBED---//

#ifndef Client
    #define Client              TCPSocketConnectionArdu
#endif

#ifndef millis
    #define millis()        us_ticker_read()/1000
#endif

#ifndef delay    
    #define delay               wait_ms
#endif    

class ThingerClient : public thinger::thinger {
public:

    ThingerClient(Client& client, const char* user, const char* device, const char* device_credential) : client_(client), username_(user), device_id_(device), device_password_(device_credential),
            temp_data_(NULL), out_size_(0)
    {
    }
    ~ThingerClient()
    {
    }

protected:
    virtual bool read(char* buffer, size_t size)
    {
        size_t total_read = 0;
        while(total_read<size){
            int read = client_.readBytes((uint8_t*)buffer, size-total_read);
            if(read<0) return false;
            total_read += read;
        }
        return total_read == size;
    }

    // TODO Allow removing this Nagle's algorithm implementation if the underlying device already implements it
    virtual bool write(const char* buffer, size_t size, bool flush=false){
        if(size>0){
            temp_data_ = (uint8_t*) realloc(temp_data_, out_size_ + size);
            memcpy(&temp_data_[out_size_], buffer, size);
            out_size_ += size;
        }

        if(flush && out_size_>0){
            #ifdef _DEBUG_
                printf("[THINGER] Writing bytes: %d", out_size_);
            #endif
            size_t written = client_.write(temp_data_, out_size_);
            bool success = written == out_size_;
            free(temp_data_);
            temp_data_ = NULL;
            out_size_ = 0;

            #ifdef _DEBUG_
                printf(" [%s]\r\n",success ? "OK" : "FAIL");
            #endif

            //FIXME Without this small delay or activating the debug (which takes time), the CC3200 does not work well. Why?
            #ifdef __CC3200R1M1RGC__
                delay(1);
            #endif
            return success;
        }
        return true;
    }

    virtual void disconnected(){
        thinger_state_listener(SOCKET_TIMEOUT);
        client_.stop();
        thinger_state_listener(SOCKET_DISCONNECTED);
    }
    virtual bool connect_network(){
        return true;
    }
    virtual bool network_connected(){
        return true;
    }

    enum THINGER_STATE{
        NETWORK_CONNECTING,
        NETWORK_CONNECTED,
        NETWORK_CONNECT_ERROR,
        SOCKET_CONNECTING,
        SOCKET_CONNECTED,
        SOCKET_CONNECTION_ERROR,
        SOCKET_DISCONNECTED,
        SOCKET_TIMEOUT,
        THINGER_AUTHENTICATING,
        THINGER_AUTHENTICATED,
        THINGER_AUTH_FAILED
    };

    virtual void thinger_state_listener(THINGER_STATE state){
        #ifdef _DEBUG_
        switch(state){
            case NETWORK_CONNECTING:
                printf("[NETWORK] Starting connection...\r\n");
                break;
            case NETWORK_CONNECTED:
                printf("[NETWORK] Connected!\r\n");
                break;
            case NETWORK_CONNECT_ERROR:
                printf("[NETWORK] Cannot connect!\r\n");
                break;
            case SOCKET_CONNECTING:
                printf("[_SOCKET] Connecting to %s : %d ...", THINGER_SERVER,THINGER_PORT);   
                break;
            case SOCKET_CONNECTED:
                printf("[_SOCKET] Connected!\r\n");
                break;
            case SOCKET_CONNECTION_ERROR:
                printf("[_SOCKET] Error while connecting!\r\n");
                break;
            case SOCKET_DISCONNECTED:
                printf("[_SOCKET] Is now closed!\r\n");
                break;
            case SOCKET_TIMEOUT:
                printf("[_SOCKET] Timeout!\r\n");
                break;
            case THINGER_AUTHENTICATING:
                printf("[THINGER] Authenticating. User: %s Device: %s\r\n",username_,device_id_);
                break;
            case THINGER_AUTHENTICATED:
                printf("[THINGER] Authenticated!\r\n");
                break;
            case THINGER_AUTH_FAILED:
                printf("[THINGER] Auth Failed! Check username, device id, or device credentials.\r\n");
                break;
        }
        #endif
    }
    bool handle_connection()
    {
        bool network = network_connected();
        if(!network){
            thinger_state_listener(NETWORK_CONNECTING);
            network = connect_network();
            if(!network){
                thinger_state_listener(NETWORK_CONNECT_ERROR);
                return false;
            }
            thinger_state_listener(NETWORK_CONNECTED);
        }
        bool client = client_.connected();
        if(!client){
            client = connect_client();
            if(!client){
                return false;
            }
        }
        return network && client;
    }
    bool connect_client(){
        bool connected = false;
        client_.stop(); // cleanup previous socket
        thinger_state_listener(SOCKET_CONNECTING);
        if (client_.connect(THINGER_SERVER, THINGER_PORT) == 0) {
            delay(3000);
            thinger_state_listener(SOCKET_CONNECTED);
            thinger_state_listener(THINGER_AUTHENTICATING);
            connected = thinger::thinger::connect(username_, device_id_, device_password_);
            if(!connected){
                thinger_state_listener(THINGER_AUTH_FAILED);
                client_.stop();
                thinger_state_listener(SOCKET_DISCONNECTED);
            }
            else{
                thinger_state_listener(THINGER_AUTHENTICATED);
            }
        }
        else{
            thinger_state_listener(SOCKET_CONNECTION_ERROR);
        }
        return connected;
    }

public:
    void handle(){
        if(handle_connection()){
            #ifdef _DEBUG_
            if(client_.available()>0){
                printf("[THINGER] Available bytes: %d", client_.available());
            }
            #endif
            thinger::thinger::handle(millis(), client_.available()>0);
        }else{
            delay(RECONNECTION_TIMEOUT); // get some delay for a connection retry
        }
    }
private:
    Client& client_;
    const char* username_;
    const char* device_id_;
    const char* device_password_;
    uint8_t * temp_data_;
    size_t out_size_;
};

Registration WIZwiki-W7500 to thinger.io

<NOTICE> You should remmber your DEvice credentials becase the credentials can't be shown after add device.
  • You’re ready to work WIZwiki-W7500 with thinger.io Cloud Service.

Add to your main

#include "mbed.h"
#include "EthernetInterface.h"
#include "DHT.h"
#include "TCPSocketConnectionArdu.h"
#include "ThingerMBedEthernet.h"
#include "ThingerMBedClient.h"

/* ThingerIO Define */
#define USERNAME "MidnightCow"
#define DEVICE_ID "WIZwiki_W7500_mbed_01"
#define DEVICE_CREDENTIAL "your access key" // Should be your access key.

/* YUROBOT SHILED1 PIN Define*/
#define myLED1      D13
#define myLED2      D12

#define myRLED      D9
#define myGLED      D10
#define myBLED      D11

#define myBUZZ      D5

#define myTEMPHUMM  D4

#define myLIGHT     A1

//using namespace std;
DigitalOut myled1(myLED1);
DigitalOut myled2(myLED2);

DigitalOut myrled(myRLED);
DigitalOut mygled(myGLED);
DigitalOut mybled(myBLED);

DigitalOut myBuzz(myBUZZ);

AnalogIn   mylight(myLIGHT);

DHT myTempHumm(myTEMPHUMM, DHT11);

void my_led1(pson& in)
{
    myled1 = (in) ? 1 : 0;
}
void my_led2(pson& in)
{
    myled2 = (in) ? 1 : 0;
}

void my_TempHumm(pson& out)
{
    if(myTempHumm.readData() == 0)
    {
        out["Cecelcius"] = myTempHumm.ReadTemperature(CELCIUS);
        out["Humidity"]  = myTempHumm.ReadHumidity();        
    }
    else
    {
        out["Cecelcius"] = 65535;
        out["Humidity"]  = 65535;
    }
}

/*
void my_rgbled(pson& in)
{
    myrled = (in["Red"])   ?  1 : 0;
    mygled = (in["Green"]) ?  1 : 0;
    mybled = (in["Blue"])  ?  1 : 0;    
}
*/

int main() {
    EthernetInterface eth;
    ThingerEthernet thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
    myled1 = 1;
    myled2 = 1;

    // resource input example (i.e. turning on/off a light, a relay, configuring a parameter, etc)
    thing["myled1"] << my_led1;
    thing["myled2"] << my_led2;
    thing["mySensor"] >> my_TempHumm;
    //thing["myRGB"] << my_rgbled;

    while(1)
    {
        thing.handle();
    }
}

Demo Movie

WIZwiki-W7500 with ThingerIO from MidnightCow on Vimeo.

Conclusion

Thinger.io cloud sevice is very powerful for small IoT Device, becase This service support a small encoded packet called as Protoson.

So, WIZwiki-W7500 platform is suitable for thinger.io.

Thank you and enjoy them.


You can import my thinger.io mbed example here.

https://developer.mbed.org/users/MidnightCow/code/ThingerIO/

저작자 표시 동일 조건 변경 허락
신고
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

Digital Photo Frame(DPF) Updated From a Remote FTP Server


Overview

This program(Remote DPF) is started from that I want to show my children photo to my parents live away from me.

You can upload a children photo on the FTP server anytime and anywhere.
If you have this DPF, You can download from a remote FTP server the updated photo and also always show that.

The downloaded phoho is saved to the micro SD card in DPF, and is displayed on 2.8” TFT LCD.


Component

  • Software
    • IDE : mbed Web-Complier (Free IDE)
    • Terminal : Hercules program (Freeware) or Any program
    • FTP : ALFTP program (Freeware) or Any FTP program

How to Operation

  1. For updating a new BMP file in SD card, Connect the FTP server whenever the specified time is expired.

  2. When updating is done or no new BMP file, DPF sequentially displays a BMP file in the SD card.

Demo

  • Updated new BMP file from FTP Server
  • Movie

Digital Photo Frame controlled remotely by using FTP protocol. from MidnightCow on Vimeo.

Download

https://developer.mbed.org/users/MidnightCow/code/Digital_Photo_Frame_with_FTP_SD_WIZwiki-/

저작자 표시 동일 조건 변경 허락
신고
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

HTTP SD Card File Server on WIZwiki-W7500 platform

WIZwiki-W7500 platform과 ARMembed Web-Compiler를 이용하여, Web-Browser 상에서 SD File 목록을 볼 수 있도록 하는 프로그램을 작성해 보자.

Import Program on ARMmbed developer site

mbed 사이트에는 다양한 Example이 존재한다. 직접 모든 code를 작성할 수 있지만, Open source를 활용하면 손쉽고 빠르게 원하는 프로그램을 구현할 수 있다.

Search a program

mbed 검색에서 우리가 원하는 응용프로그램을 Key Word는 HTTP와 SD로 검색해 보자.
다행히 원하는 프로그램을 다음과 같이 볼 수 있다. 자 Import 하자.

주의  : 프로그램 작성 시 검색이 되었지만, 현재 검색이 되지 않는 관계로 아래 URL을 참조하자.
       https://developer.mbed.org/teams/FRDM-K64F-Code-Share/code/HTTP_SD_Server_K64F/

 

Import program

해당 Program을 성공적으로 Import 했을 경우 다음과 같이 Web-Compiler의 Program Workspace 창에 나타난다.

 

Select a platform

ARMmbed Web-Compiler의 우측 상단의 [mbed LPC1768] icon을 클릭하고, [Add Platform]을 눌러 Platfrom 목록에서 WIZwik-W7500 Platform를 찾아 선택하자.

WIZwiki-W7500 Platform을 선택할 경우 Web-Browser의 우측 창에 다음과 같이 나타난다.
[Add to your mbed Compiler] 버튼이 없을 경우 아래 Example programs 중 하나를 Import하면 WIZwiki-W7500 Platform을 당신의 mbed-Compiler에 추가할 수 있다.

 

How to port mbed-LPC1768 into WIZwiki-W7500

mbed-rtos 는 현재 사용하지 않는 라이브러리이므로 삭제(우 클릭 후 delect 선택)한다. 또한 lwip 기반의 EthernetInterface Library를 WIZnetInterface Library로 변경(삭제 후 추가)한다.

WIZnetInterface Library는 https://developer.mbed.org/teams/WIZnet/에서 Import 할 수 있다. (현재 검색이 잘 안되니, URL 참조).
WIZnetInterface Library를 Example HTTP_SD_Server_K64F 프로그램으로 import 한다.

 

Compile HTTP_SD_Server_K64F example for WIZwiki-W7500

지금까지 잘 따라 왔다면, 다음과 같이 Platform과 Library를 성공적으로 변경했을 것이다. 자 이제 과감하게 컴파일을 해보자.

[Compile] 버튼을 누르자. 다음과 같은 Error가 발생한다.

Can not open source input file "device.h" : No such file or directory "#include "device.h""

이 Error는 mbed Library가 Update 되지 않기 때문에 발생한다. 이를 해결하기 위해서는 [Program Workspace] 창의 “mbed” Library를 더블클릭하고, [Library Details] 창의 “Update” 버튼을 눌러 mbed Library를 Update한다.

다시 컴파일하자. 그럼 SDFileSystem 에서 4개, eth.init()에서 1개 총 5개의 Error가 발생한다.

4 Error : SDFileSystem sd(PTE3, PTE1, PTE2, PTE4, "sd");
1 Error : eth.init();

 

main.c

//SDFileSystem sd(PTE3, PTE1, PTE2, PTE4, "sd"); // K64F
SDFileSystem sd(PB_3, PB_2, PB_1, PB_0, "sd"); // WIZwiki-W7500
  • Ethernet Initialization
    eth.init() 대신 DHCP를 사용할 경우 eth.init(MAC) 를 사용하고, Static IP를 사용할 경우 eth.init((uint8_t*)MAC,IP,MASK,GATEWAY)를 사용한다. 여기서는 static IP를 사용한다.
#define MAC     "\x--\x--\x--\x--\x--\x--"   // Should be Replaced -- with your MAC
#define IP      "192.168.77.100"             // Should belong with your lan.
#define MASK    "255.255.255.0"
#define GATEWAY "192.168.77.1"
//eth.init((uint8_t*)MAC);    // Use DHCP for WIZnetInterface
eth.init((uint8_t*)MAC,IP,MASK,GATEWAY);  //IP,mask,Gateway

 

Upload the binary image on WIZwiki-W7500

WIZwiki-W7500은 CMSIS-DAP를 지원하여, W7500의 Code flash가 USB storage로 인식된다. Web-compiler에서 compile을 성공적으로 마쳤을 경우, Binaray Image를 Download할 수 있게 된다. 이때, Local Directory로 저장한 후 해당 Binary image를 WIZwiki-W7500의 USB storage(MBED)로 copy 하거나, image를 바로 MBED로 저장하면 된다.

 

Demos

해당 Project는 아래 URL이나 WIZwiki-W7500 Example programs에서 Import할 수 있도록 만들어 두었다.
동작 상태를 확인하기 위해 Ticker를 활용하여 LED1 LED2를 On/oFF toggle하는 코드도 추가되었다.

 

Initialization

 

Connect to WIZwiki-W7500 through Web-Browser

  • Terminal

  • Web-Browser

 

Click [img] directory

 

Click [WIZnet_log_IoT.png] file

저작자 표시 동일 조건 변경 허락
신고
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자