RabbitCore RCM3700
User's Manual
PREV INDEX NEXT


3. Running Sample Programs

To develop and debug programs for the RCM3700 (and for all other Rabbit Semiconductor hardware), you must install and use Dynamic C.

3.1 Introduction

To help familiarize you with the RCM3700 modules, Dynamic C includes several sample programs. Loading, executing and studying these programs will give you a solid hands-on overview of the RCM3700'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 the C programming 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 RCM3700 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 (J2) on the RCM3700 to your PC.

  4. Power must be applied to the RCM3700 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. The RCM3700 must be connected to a PC using the programming cable.

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

The default I/O configuration in the sample programs is based on the RabbitCore module detected during compile time:

You may override these default settings to run an RCM3720 RabbitCore module on the RCM3700 Prototyping Board or to run another RCM3700 RabbitCore module on the RCM3720 Prototyping Board by adding the following macro to the sample program you will be running.

Sample programs that are specifically designed for the RCM3700 Prototyping Board already have this macro included.

3.2 Sample Programs

Of the many sample programs included with Dynamic C, several are specific to the RCM3700. Sample programs illustrating the general operation of the RCM3700, serial communication, and the A/D converter on the Prototyping Board are provided in the SAMPLES\RCM3700 and the SAMPLES\RCM3720 folders as shown in the table below. The sample programs use the features available on the two Prototyping Boards.

Feature RCM3700 Prototyping Board RCM3720 Prototyping Board
Sample Program Folder
SAMPLES\RCM3700
SAMPLES\RCM3720
Digital I/O
×
×
IrDA Transceivers
×
Serial Flash
×
×
Serial Communication
×
×
TCP/IP
×
×
A/D Converter
×
LCD/Keypad Module
×
Dynamic C FAT File System, RabbitWeb,
SSL Modules
×
×

Each sample program has comments that describe the purpose and function of the program. Follow the instructions at the beginning of the sample program. Note that the RCM3700 must be installed on the Prototyping Board when using these sample programs.

TCP/IP sample programs are described in Chapter 6, "Using the TCP/IP Features." Sample programs for the optional LCD/keypad module that is used on the RCM3700 Prototyping Board are described in Appendix C.

Additional sample programs are available online at www.rabbit.com/support/downloads/downloads_prod.shtml.


Press "1" or "2" on your keyboard to select LED DS1 or DS2 on the Prototyping Board. Then follow the prompt in the Dynamic C STDIO window to turn the LED on or off.

Once you have loaded and executed these five programs and have an understanding of how Dynamic C and the RCM3700 modules interact, you can move on and try the other sample programs, or begin building your own.

3.2.1 Use of Serial Flash

The following sample programs can be found in the SAMPLES\RCM3700\SerialFlash and the SAMPLES\RCM3720\SerialFlash folders.

3.2.2 Serial Communication

The following sample programs can be found in the SAMPLES\RCM3700\SERIAL and the SAMPLES\RCM3720\SERIAL folders.

NOTE PE5 is set up to enable/disable the RS-232 chip on the RCM3700 Prototyping Board. This pin will also be toggled when you run RS-232 sample programs on an RCM3700 Prototyping Board. If you plan to use this pin for something else while you are running any of the RS-232 sample programs, comment out the following line.


NOTE The following two sample programs illustrating RS-485 serial communication will only work with the RCM3700 Prototyping Board.


3.2.3 A/D Converter Inputs

The following sample programs are found in the SAMPLES\RCM3700\ADC folder.

NOTE The above sample programs will overwrite any existing calibration constants.

Before running the next two sample programs, DNLOADCALIB.C or UPLOADCALIB.C, connect your PC serial COM port to header J2 on the Prototyping Board as follows.

Then connect pins 1–3 and 2–4 on header JP2 on the Prototyping Board.

You will need to run a serial utility such as Tera Term on your PC. You may download Tera Term from hp.vector.co.jp/authors/VA002416/teraterm.html. Once Tera Term is running, configure the serial parameters as follows.

Now press F9 to compile and run this program. Verify that the message "Waiting, Please Send Data file" is being display in Tera Term display window before proceeding. From within Tera Term, select File > Send File > Path and filename, then select the OPEN option within the dialog box. Once the data file has been downloaded, it will indicate whether the calibration data were written successfully.


Rabbit Semiconductor
www.rabbit.com
PREV INDEX NEXT