
102
PowerCore FLEX
6.5 Run the PINGME.C Sample Program
Connect the crossover cable from your computer’s Ethernet port to the PowerCore module’s
RJ-45 Ethernet connector. Open this sample program from the SAMPLES\TCPIP\ICMP
folder, compile the program, and start it running under Dynamic C. The crossover cable is
connected from your computer’s Ethernet adapter to the PowerCore module’s RJ-45
Ethernet connector. When the program starts running, the green DS2 LED on the Power-
Core module should be on to indicate an Ethernet connection is made. (Note: If the green
LED does not light, you may not be using a crossover cable, or if you are using a hub per-
haps the power is off on the hub.)
The next step is to ping the board from your PC. This can be done by bringing up the MS-
DOS window and running the pingme program:
ping 10.10.6.101
or by Start > Run
and typing the entry
ping 10.10.6.101
Notice that the yellow DS1 LED flashes on the PowerCore module while the ping is tak-
ing place, and indicates the transfer of data. The ping routine will ping the board four
times and write a summary message on the screen describing the operation.
6.6 Running Additional Sample Programs
Many generic TCP/IP sample programs are available in the Dynamic C SAMPLES\TCPIP
folder. The following sample programs specific to the PowerCore FLEX modules are in
the Dynamic C SAMPLES\PowerCoreFLEX\TCPIP\ folder.
SMTP.c
—This program demonstrates using the SMTP library to send an e-mail when
either switch S2 or S3 on the Prototyping Board is pressed. If you are using a direct
connection, you will need an SMTP server on your host machine.
SSI.c
—This program demonstrates using a Web page to control LEDs DS5 and DS6
(LED0 and LED1) from the PowerCore Prototyping Board. Two “device LEDs” are
created along with two buttons to toggle them. Users can use their Web browser to
change the status of the LEDs to match the status on the Prototyping Board.
As long as you have not modified the TCPCONFIG 1 macro in the sample program,
enter the following server address in your Web browser to bring up the Web page
served by the sample program.
http://10.10.6.100.
Otherwise use the TCP/IP settings you entered in the TCP_CONFIG.LIB library.