RabbitCore RCM4500W
User's Manual
PREV INDEX NEXT


3. Running Sample Programs

To develop and debug programs for the RCM4510W (and for all other Rabbit hardware), you must install and use Dynamic C. This chapter provides a tour of its major features with respect to the RCM4510W.

3.1 Introduction

To help familiarize you with the RCM4510W modules, Dynamic C includes several sample programs. Loading, executing, and studying these programs will give you a solid hands-on overview of the RCM4510W's capabilities, as well as a quick start with Dynamic C as an application development tool.

This chapter provides sample programs that illustrate the digital I/O and serial capabilities of the RCM4510W RabbitCore module. Section 6.2 discusses the sample programs that illustrate the ZigBee features.

NOTE The sample programs assume that you have at least an elementary grasp of the C language. If you do not, see the introductory pages of the Dynamic C User's Manual for a suggested reading list.

In order to run the sample programs discussed in this chapter and elsewhere in this manual,

  1. Your module must be plugged in to the Prototyping Board as described in Chapter 2, "Getting Started."

  2. Dynamic C must be installed and running on your PC.

  3. The programming cable must connect the programming header on the module to your PC.

  4. Power must be applied to the module through the Prototyping Board.

Refer to Chapter 2, "Getting Started," if you need further information on these steps.

To run a sample program, open it with the File menu, then compile and run it by pressing F9.

Each sample program has comments that describe the purpose and function of the program. Follow the instructions at the beginning of the sample program.

More complete information on Dynamic C is provided in the Dynamic C User's Manual.

3.2 Sample Programs

Of the many sample programs included with Dynamic C, several are specific to the RCM4510W modules. These programs will be found in the -SAMPLES\RCM4500W folder.


Press "2" or "3" on your keyboard to select LED DS2 or DS3 on the Prototyping Board. Then follow the prompt in the Dynamic C STDIO window to turn the LED ON or OFF. A logic low will light up the LED you selected.

Once you have loaded and executed these five programs and have an understanding of how Dynamic C and the RCM4510W modules interact, you can move on and try the other sample programs.

3.2.1 Serial Communication

The following sample programs are found in the SAMPLES\RCM4500W\SERIAL folder.

3.2.2 Real-Time Clock

If you plan to use the real-time clock functionality in your application, you will need to set the real-time clock. Use the SETRTCKB.C sample program from the Dynamic C SAMPLES\RTCLOCK folder, and follow the onscreen prompts. The RTC_TEST.C sample program in the Dynamic C SAMPLES\RTCLOCK folder provides additional examples of how to read and set the real-time clock.

3.2.3 ZigBee Sample Programs

Section 6.2 describes the sample programs associated with the XBee RF module.


Rabbit—A Digi International Brand
www.rabbit.com
PREV INDEX NEXT