background image

Copyright © Parallax Inc.

 

 

WIZnet W5200 for QuickStart (#40002) 

v1.0 3/13/2013  Page 8 of 10 

Setting Static Network Address Settings. 

Sometimes it is useful to be able to set the W5200’s network address settings manually.  You may want 

to do this if you want to assign your Quic W5200 board an IP address that doesn’t change, or 

you want to force it to communicate with non-default address settings.  These are some of the common 

settings you can change – the methods are located in the W5200.spin driver object file: 
 

PUB SetGateway(octet3, octet2, octet1, octet0) 
PUB SetSubnetMask(octet3, octet2, octet1, octet0) 

PUB SetMac(octet5, octet4, octet3, octet2, octet1, octet0) 
PUB SetIp(octet3, octet2, octet1, octet0) 

 

And an example of these methods in use: 

 

OBJ 
  wiz   :"W5200" 

   
PUB YourProgram 
 

  wiz.SetGateway(192, 168, 1, 1)           'Tell the W5200 the router's address 
  wiz.SetSubnetMask(255, 255, 255, 0)      'Statically set the subnet to communicate on 
  wiz.SetMac($50, $38, $58, $33, $32, $41) 'Statically set the W5200's hardware ID  

                                    ' (should be unique on the network)              

  wiz.SetIp(192, 168, 1, 130)              'Statically set the W5200's IP address 

 

Quick Start Web Server Application 

This example web server program for the Quic W5200 board can serve files requested by a web 

browser or other application that follows the HTTP protocol.  This particular web server implementation 
automatically searches for a specific string and will replace it with a value stored in memory as the page 

is being sent to the requester.  To see this demonstration web server in action, follow these steps: 

 

1.

 

Using a file browser (Windows Explorer), navigate to your unzipped demonstration program 

directory. 

2.

 

Enter the “Simple_server” sub-directory. 

3.

 

With your MicroSD card reader, copy the file index.htm to the SD card.  Make sure you put 

index.htm in the SD card’s root directory (do not put it in a folder). 

4.

 

Safely remove the MicroSD card from your computer. 

5.

 

Insert the MicroSD card into the W5200 board’s MicroSD card slot.  Do this with your QuickStart 

+ W5200 board unpowered. 

6.

 

Attach your Quic W5200 board to your computer via the QuickStart board’s USB 
connector. 

7.

 

Open the simple_server.spin file with the Propeller Tool. 

8.

 

Compile and download the simple_server.spin program to the Propeller by pressing the F11 key 

on your keyboard. 

 

Once simple_server.spin has been downloaded to your Quic W5200 board, the web server will 
start.  In order to view the web page served by your Quic W5200 board, you need to know the 

IP address that your router assigned to your Quic W5200 board.  If you do not already know 

what this IP address is, refer to the “Requesting a Dynamically Assigned IP Address for the W5200” 

section on page 7. 

 

9.

 

Open your favorite web browser and enter the IP address of your Quic W5200 into the 
browser’s address bar. 

10.

 

Your browser should display the webpage dynamically rendered from the Quic W5200 

board. 

Содержание WIZnet W5200

Страница 1: ...firmware that allows the WIZnet W5200 board QuickStart to respond to or generate any type of network traffic Features Prewritten drivers to support common network protocols such as TCP and UDP connections HTTP DHCP DNS resolution POP SMTP NetBIOS and SNTP Prewritten demonstration programs including a simple web server WIZnet W5200 TCP IP 10BaseTX 100BaseTX Ethernet controller Micro SD card support...

Страница 2: ... CAT5 or greater Ethernet cable microSD card reader USB cable male USB A to mini B Parallax 805 00006 or 7 5 Volt DC power supply with 2 1 mm barrel jack Parallax 750 00009 Phillips 0 screwdriver and pliers for assembly Board Features WIZnet W5200 RJ 45 Ethernet Jack 2 1 mm Center positive Barrel Jack microSD Card Slot with Card RTC Super Cap Battery Backup Reset Button 40 Pin QuickStart Header RT...

Страница 3: ... them in place on the bottom each with a nylon M3 nut 2 Carefully insert the WIZnet W5200 for QuickStart add on board into the QuickStart header so that the add on board covers the QuickStart board 3 Secure the WIZnet W5200 board to the QuickStart board by screwing the included nylon M3 screws into the standoffs through the WIZnet W5200 board s mounting holes That s it Nylon M3 Standoffs Nylon M3 ...

Страница 4: ...thernet jack on the left 2 Attach the other end of the Ethernet cable to your home router Ethernet switch or other Ethernet device as noted in the Typical Home Network Configuration section 3 Next power the system with one of the options below That s it Power Supply Options The QuickStart WIZnet W5200 may be powered by any of these three options it is safe to connect any combination of these at th...

Страница 5: ...hey are used by the W5200 board Propeller IO Pin QuickStart Header Pin Pin Function Description P0 1 Available P1 2 Available P2 3 Available P3 4 Available P4 5 Available P5 6 Available P6 7 Available P7 8 Available P8 9 SD_Dout W5200 SD Card SPI Dout Signal P9 10 SD_Clk W5200 SD Card SPI Clock Signal P10 11 SD_Din W5200 SD Card SPI Din Signal P11 12 SD_CS W5200 SD Card SPI Chip Select Signal P12 ...

Страница 6: ...ng power from Ethernet In order for PoE to work your physical network needs to have power injected into the transmission medium as per the standard s specification The majority of networks do not natively support this feature as it requires the use of special hardware The header of 10 pins at the bottom of the WIZnet W5200 board pictured above is for use with the Silvertel Ag9050 To enable PoE sim...

Страница 7: ...e DhcpObjectDemo spin to see an example of this helper object in action and to print network address information assigned to your QuickStart W5200 board These are the settings that my router assigned to my QuickStart W5200 board Your router will dynamically assign an available IP address to your QuickStart W5200 board when a request is made based on the MAC Media Access Control address entered int...

Страница 8: ...r a specific string and will replace it with a value stored in memory as the page is being sent to the requester To see this demonstration web server in action follow these steps 1 Using a file browser Windows Explorer navigate to your unzipped demonstration program directory 2 Enter the Simple_server sub directory 3 With your MicroSD card reader copy the file index htm to the SD card Make sure yo...

Страница 9: ...t Page title head body p Testing simple_server spin p h1 This is test PROPVAR00 h1 body html Spin Code for simple_server spin loaded onto the QuickStart W5200 Board CON _xinfreq 5_000_000 _clkmode xtal1 pll16x OBJ webserver W5200 Parse and Replace Webserver requires 3 cogs PUB Go counter Start the web server webserver Start Your custom web server code goes below Reset the counter counter 0 repeat ...

Страница 10: ...mes are 8 characters or less with a 3 character or less file extension Within the index htm HTML web page file there is a special HTML tag that simple_server spin looks for when the page is rendered to the browser This specific string should have the form PROPVARxx where the xx is replaced by numeric values between 00 and 99 This gives you the ability to place 100 numbers into the web server s mem...

Отзывы: