Sample Programs - Rabbit RabbitCore RCM3000 User Manual

C-programmable module with ethernet
Hide thumbs Also See for RabbitCore RCM3000:
Table of Contents

Advertisement

3.2 Sample Programs

Of the many sample programs included with Dynamic C, several are specific to the
RCM3000. Sample programs illustrating the general operation of the RCM3000, and
serial communication are provided in the
gram has comments that describe the purpose and function of the program. Follow the
instructions at the beginning of the sample program.
—uses the
CONTROLLED.C
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
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.
—demonstrates the use of costatements to flash LEDs DS1 and DS2 on
FLASHLED1.c
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.
—demonstrates the use of cofunctions and costatements to flash LEDs
FLASHLED2.c
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
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.
—Demonstrates sending Modbus ASCII packets between two Prototyping
IR_DEMO.c
Board assemblies via the IrDA transceivers with the IrDA transceivers facing each other.
Note that this sample program will only work with the RCM30/31/32XX Prototyping
Board.
First, compile and run this program on one Prototyping Board assembly, then remove
the programming cable and press the
the first RabbitCore module is operating in the
ming cable to the second Prototyping Board assembly with the RCM3000 and compile
and run the same sample program. With the programming cable still connected to the
second Prototyping Board assembly, press switch S2 on the second Prototyping Board
to transmit a packet. Once the first Prototyping Board assembly receives a test packet, it
will send back a response packet that will be displayed in the Dynamic C
dow. The test packets and response packets have different codes.
Once you have loaded and executed these sample programs and have an understanding of
how Dynamic C and the RCM3000 modules interact, you can move on and try the other
sample programs, or begin building your own.
12
SAMPLES\RCM3000
STDIO
window to demonstrate digital outputs by toggling
window to select LED DS1 or DS2. Use your PC keyboard to make
—demonstrates the use of costatements to detect switches using the
RESET
folder. Each sample pro-
button on the Prototyping Board so that
Run
mode. Then connect the program-
STDIO
win-
RabbitCore RCM3000

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RabbitCore RCM3000 and is the answer not in the manual?

Questions and answers

Table of Contents