42
RabbitCore RCM2100
4.10 Run the
PINGME.C
Sample Program
Connect the crossover cable from your computer’s Ethernet port to the RCM2100 board’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. When the program
starts running, the green
LNK
light on the RCM2100 board should be on to indicate an
Ethernet connection is made. (Note: If the
LNK
light does not light, you may not have a
crossover cable, or if you are using a hub perhaps 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.100
or by
Start > Run
and typing the entry
ping 10.10.6.100
Notice that the red
ACT
light flashes on the RCM2100 board while the ping is taking
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.
4.11 Running More Sample Programs With Direct Connect
The sample programs discussed here are in the Dynamic C
SAMPLES\RCM2100\
folder.
4.11.1 Sample Program: PINGLED.C
One of the RCM2100’s most important features is the availability of the built-in Ethernet
port. This program makes the simplest possible use of the network port by “pinging” a
remote system and using LEDs to report the status of the ping attempt and its return.
Compile & Run Program
Open the
PINGLED.C
sample program. Press
F9
to compile and run the program.
Each time the program sends a ping to the remote address, LED DS2 on the Prototyping
Board will flash. Each time a successful return from a ping attempt is received, LED DS3
will flash.
If the ping return is unsuccessful (i.e., the remote system does not exist or does not
acknowledge the ping within the timeout period), DS3 will not flash.
With short ping times, as will be encountered in most micro-LAN and LAN settings, the
two LEDs should flash almost in parallel as pings are sent and returned.
You can modify the
#define PING_DELAY
statement to change the amount of time
between the outgoing pings.
Содержание RabbitCore RCM2100 Series
Страница 1: ...RabbitCore RCM2100 C Programmable Module with Ethernet Getting Started Manual 019 0093 050505 F ...
Страница 34: ...30 RabbitCore RCM2100 ...
Страница 52: ...48 RabbitCore RCM2100 ...
Страница 54: ...User s Manual 50 ...
Страница 56: ......