Getting Started
19
3.3 Sample Programs
To help familiarize you with the RCM3000 modules, Dynamic C includes several sample
programs in the Dynamic C
SAMPLES\RCM3000
directory. Loading, executing and
studying these programs will give you a solid hands-on overview of the RabbitCore’s
capabilities, as well as a quick start with Dynamic C as an application development tool.
Two folders contain sample programs that illustrate features unique to the RCM3000.
• RCM3000
—Demonstrates the basic operation and the Ethernet functionality of the
RCM3000.
• TCPIP
—Demonstrates more advanced TCP/IP programming for Z-World’s Ethernet-
enabled Rabbit-based boards.
Follow the instructions included with the sample program to connect the RCM3000 and
the other hardware identified in the instructions. The RCM3000 module must be installed
on the Prototyping Board as shown in Figure 3.
To run a sample program, open it with the
File
menu (if it is not still open), compile it
using the
Compile
menu (or press
F5
), and then run it by selecting
Run
in the
Run
menu
(or press
F9
). The RCM3000 must be connected to a PC using the programming cable.
More complete information on Dynamic C is provided in the
Dynamic C User’s Manual
.
•
CONTROLLED.C
—uses the
STDIO
window to demonstrate digital outputs by toggling
LEDs DS1 and DS2 on the Prototyping Board on and off.
Parallel Port G bit 6 = LED DS1
Parallel Port G bit 7 = LED DS2
Once you have compile this program and it is running, you will be prompted via the
Dynamic C
STDIO
window to select LED DS1 or DS2. Use your PC keyboard to make
your selection.
Once you have selected the LED, you will be prompted to select to turn the LED either
ON or OFF. A logic low will light up the LED you selected.
•
FLASHLED1.c
—demonstrates the use of costatements to flash LEDs DS1 and DS2 on
the Prototyping Board at different rates. Once you have compile this program and it is
running, LEDs DS1 and DS2 will flash on/off at different rates.
•
FLASHLED2.c
—demonstrates the use of cofunctions and costatements to flash LEDs
DS1 and DS2 on the Prototyping Board at different rates. Once you have compile this
program and it is running, LEDs DS1 and DS2 will flash on/off at different rates.
•
TOGGLESWITCH.c
—demonstrates the use of costatements to detect switches using the
press-and-release method of debouncing. LEDs DS1 and DS2 on the Prototyping
Board are turned on and off when you press switches S2 and S3.
Содержание RabbitCore RCM3000
Страница 1: ...RabbitCore RCM3000 C Programmable Module with Ethernet Getting Started Manual 019 0109 050131 E...
Страница 20: ...16 RabbitCore RCM3000...
Страница 40: ...36 RabbitCore RCM3000...
Страница 42: ...38 RabbitCore RCM3000...
Страница 44: ...40 RabbitCore RCM3000...
Страница 46: ......