Copyright © Parallax Inc.
WIZnet W5200 for QuickStart (#40002)
v1.0 3/13/2013 Page 9 of 10
11.
Refresh the page in the browser. Notice how the number after “This is a test” is counting up?
Take a look at how the simple_server.spin program relates to the number displayed in the
browser.
HTML Code for file “index.htm”, loaded onto the Micro SD card
<html>
<head>
<title>Parse Test 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 Quic 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
'update the counters
+
'save the uptime counters to the user variable space
webserver.SetUserVariable(0, counter)
'wait for 100 milliseconds
webserver.Pause(100)