Getting Started
21
3.4 Sample Programs
To help familiarize you with the RCM3100 modules, Dynamic C includes several sample
programs. 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.
NOTE: The sample programs assume that you have at least an elementary grasp of ANSI
C. If you do not, see the introductory pages of the Dynamic C Premier User’s Manual
for a suggested reading list.
Of the many sample programs included with Dynamic C, several are specific to the
RCM3100. These programs will be found in the
Samples/RCM3100
folder.
We suggest that you examine the following five of these sample programs in order to get a
tour of some of the capabilities of the RCM3100 modules.
•
CONTROLLED.c
—This sample program demonstrates the controlling port outputs
from
STDIO
by toggling LEDs on the Prototyping Board.
•
FLASHLED1.c
—This assembly program uses costatements to flash LEDs DS1 and
DS2 on the Prototyping Board at different intervals.
•
FLASHLED2.c
—This program uses cofunction and costatements to flash LEDs DS1
and DS2 on the Prototyping Board at different intervals.
•
IR_DEMO.c
—This program demonstrates sending packets (Modbus ASCII) back and
forth over an IR link. This demo requires two RCM3000/RCM3100 Prototyping
Boards with an RCM3100 module on each Prototyping Board. Set up the Prototyping
Boards so that their IR transceivers are facing each other. Load the program into one
RCM3100, then operate this RCM3100 in Run mode without a programming cable
attached. Program the other RCM3100 and then observe the results in the
STDIO
win-
dow on your PC with the
PROG
connecteor on the programming cable still connected.
•
TOGGLESWITCH.c
—This program uses costatements to detect switches using the
press-and-release method of debouncing. Corresponding LEDs DS1 and DS2 on the
Prototyping Board turn on or off.
The
Samples/RCM3100/Serial
folder provides samples to illustrate serial communi-
cation with the RCM3100.
Each of these programs is fully commented within the source code. Refer to these com-
ments for the details of how each program works.
To run a program, open it with the
File
menu (if the sample program is not already open),
compile it using the
Compile
menu, and then run it by selecting
Run
in the
Run
menu.
Once you have loaded and executed these programs and have an understanding of how
Dynamic C and the RCM3100 modules interact, you can move on and try the other sam-
ple programs, or begin building your own.
Содержание RCM3100 Series
Страница 1: ...RabbitCore RCM3100 C Programmable Module Getting Started Manual 019 0114 020601 A...
Страница 4: ...RabbitCore RCM3100 Notice to Users 23 Index 25 Schematics 27...
Страница 10: ...6 RabbitCore RCM3100...
Страница 26: ...22 RabbitCore RCM3100...
Страница 28: ...24 RabbitCore RCM3100...
Страница 30: ...26 RabbitCore RCM3100...
Страница 32: ......