User`s manual

User’s Manual 57
Generally, the other defined values may be left at their default settings. If you are operat-
ing the system behind a firewall or proxy and need to specify a host port for redirection,
you should comment out the line reading:
#define REDIRECTHOST MY_IP_ADDRESS
Then uncomment the next line, which defines a specific redirection host and port:
#define REDIRECTHOST "my host.com:8080"
Be sure to enter the host port where indicated by "my host.com:8080"
.
This application creates dynamic HTML web pages on the fly. For simplicity, all of the
Web page components—shell HTML, image GIFs, etc.—are imported into flash memory
using the #ximport statements. It is also possible to read these files from other locations,
including the onboard flash file system, but this application keeps things simple by load-
ing all the components into working memory.
The program then defines four instances of an LED toggling function, which are basic
CGI functions that swap the values “ledon.gif” and “ledoff.gif” as the contents of the
ledn strings, and then force a reload of the web page to change the associated LED
image. The physical LEDs on the Prototyping Board are turned on or off to match the
ledn strings displayed on the Web page.
6.10.3 Additional Sample Programs
ETHCORE2.C—This program takes anything that comes in on a port and sends it out
Serial Port C. It uses SW2 as a signal that the connection should be closed, and PA0 as
an indication that there is an open connection. You may change SW2 and PA0 to suit
your application needs.
Follow the instructions included with the sample program. Run the Telnet program on
your PC (Start > Run telnet 10.10.6.100). As long as you have not modified the
TCPCONFIG 1 macro in the sample program, the IP address is 10.10.6.100 as shown;
otherwise use the TCP/IP settings you entered in the TCP_CONFIG.LIB library. Each
character you type will be printed in Dynamic C's STDIO window, indicating that the
board is receiving the characters typed via TCP/IP.
LEDCONSOLE.C—Demonstrates the features of ZCONSOLE.LIB command-oriented
console library to control two LEDs on the Prototyping Board.
6.10.4 More Information
Refer to the Dynamic C TCP/IP Users Manual for complete details on the Dynamic C
implementation of TCP/IP protocols.