RabbitCore RCM3000
User's Manual
PREV INDEX NEXT


3. Running Sample Programs

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

3.1 Introduction

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

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

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

  1. Your RCM3000 module must be plugged in to the Prototyping Board as described in Chapter 2, "Hardware Setup."

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

  3. The RCM3000 module must be connected to your PC through the serial programming cable.

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

Refer to Chapter 2, "Hardware Setup," if you need further information on these steps.

To run a sample program, open it with the File menu, then press function key F9 to compile and run the program.

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 SAMPLES\RCM3000 folder. Each sample program has comments that describe the purpose and function of the program. Follow the instructions at the beginning of the sample program.

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.

3.2.1 Serial Communication

The following sample programs can be found in the SAMPLES\RCM3000\SERIAL folder.

Two sample programs, SIMPLE485MASTER.C and SIMPLE485SLAVE.C, are available to illustrate RS-485 master/slave communication. To run these sample programs, you will need a second Rabbit-based system with RS-485, and you will also have to add an RS-485 transceiver such as the SP483E and bias resistors to the RCM30/31/32XX Prototyping Board.

The diagram shows the connections. You will have to connect PC0 and PC1 (Serial Port D) on the RCM30/31/32XX Prototyping Board to the RS-485 transceiver, and you will connect PD4 to the RS-485 transceiver to enable or disable the RS-485 transmitter.

The RS-485 connections between the slave and master devices are as follows.

· RS485+ to RS485+
· RS485– to RS485–
· GND to GND

3.2.2 Other Sample Programs

Section 6.11 describes the TCP/IP sample programs, and Appendix C.8 provides sample programs for the optional LCD/keypad module that can be installed on the Prototyping Board.


Rabbit Semiconductor
www.rabbit.com
PREV INDEX NEXT