44
RabbitCore RCM2100
4.11.2 Sample Program: ETHCORE1.C
The RCM2100 modules with Ethernet ports can act as micro Web page servers, with
dynamic interaction between the controller and the web pages. This sample program dem-
onstrates how a Web page can be used to both monitor and control an RCM2100 module.
Compile & Run Program
Open the sample program
ETHCORE1.C
. Press
F9
to compile and run the program.
TIP:
This program will be more interesting to observe if LEDs DS4 and DS5 are installed
on the Prototyping Board.
When the program starts, LEDs DS2, DS3 and DS5 will be lit, and DS4 will be dark.
Open a Web browser and enter the IP address you defined for the RCM2100 module in the
program in the address window. A page like that shown in Figure 8 should appear.
Figure 8. Browser screen for Sample Program
ETHCORE1.C
Clicking on each of the button images in the browser window will toggle the state of the
associated LED image, and will toggle the state of the corresponding LED on the Proto-
typing Board. Since the Web page is generated by the RCM2100 (using Dynamic HTML),
the LED image and the corresponding LED’s real state will always be in step.
Program Description
This program begins to show the range of applications for an Ethernet-enabled embedded
system controller, so let’s look closely at its operation.
As with
PINGLED.C
, several network addresses must be defined before this application
can work. The
TCPCONFIG 1
macro in the sample program provides default settings for
MY_IP_ADDRESS
, which is the address of the RCM2100 module,
MY_NETMASK
, and
MY_GATEWAY
(which needs to be defined if you wish to reach the system from outside the
local network). These TCP/IP settings can be changed as needed in the
TCP_CONFIG.LIB
library.
Содержание 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: ......