Specifications
20 RabbitCore RCM3200
3.3 Sample Programs
To help familiarize you with the RCM3200 modules, Dynamic C includes several sample
programs in the Dynamic C SAMPLES\RCM3200 directory. Loading, executing and
studying these programs will give you a solid hands-on overview of the RCM3200’s
capabilities, as well as a quick start with Dynamic C as an application development tool.
The SAMPLES\TCPIP directory has sample programs that demonstrate 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 RCM3200 and
the other hardware identified in the instructions. The RCM3200 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), then compile
and run it by selecting Run in the Run menu (or press F9). The RCM3200 must be con-
nected to a PC using the programming cable.
If you are using an RCM3200 or RCM3220, remember to allow the compiler to run the
application in the program execution SRAM by selecting Code and BIOS in Flash, Run
in RAM
from the Dynamic C Options > Project Options > Compiler menu.
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 compiled and run this program, 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 compiled and run this program,
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 compiled and
run this program, 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.