DeviceMate Development Kit Getting Started

> ## 3. Software Installation & Overview

> To develop and debug DeviceMate programs (and for all Z-World and Rabbit Semiconductor hardware), you must install and use Dynamic C. This chapter takes you through the installation of Dynamic C, and then provides a tour of its major features with respect to the RCM2200 and the RCM2300 modules.

> ### 3.1 System Requirements

> To install and run Dynamic C, your system must be running one of the following operating systems:

> - Windows 95
> - Windows 98
> - Windows NT
> - Windows Me
> - Windows 2000
> - Windows XP

> #### 3.1.1 Hardware Requirements

> The PC on which you install Dynamic C should have the following hardware:

> - A Pentium or later microprocessor
> - At least 125 MB of free hard drive space
> - At least one free RS-232 COM port for communication with the target systems
> - A 10Base-T Ethernet network interface port
>   (optional if you will not be connecting directly to the RCM2200's Ethernet port)
> - A CD-ROM drive (for software installation)

> ### 3.2 Installing Dynamic C

> Insert the installation disk or CD in the appropriate disk drive on your PC. The installation should begin automatically. If it doesn't, issue the Windows "Run..." command and type the following command.

>     disk:\SETUP

> The installation program will begin and will guide you through the installation process.

> ### 3.3 Starting Dynamic C

> Once the RCM2200 and the RCM2300 modules are set up and connected as described in Chapter 2 and Dynamic C has been installed, start Dynamic C by double-clicking on the Dynamic C icon. Dynamic C should start, then look for the target system on the COM port you specified during installation (by default, COM1). Once detected, Dynamic C should go through a sequence of steps to cold-boot the module and compile the BIOS.

> If you receive the message beginning "BIOS successfully compiled and loaded..." you are ready to continue with the sample programs.

> #### 3.3.1 Communication Error Messages

> If you receive the message "No Rabbit Processor Detected," the programming cable may be connected to a different COM port, a connection may be faulty, or the target system may not be powered up. First, check to see that the power LED on the Demonstration Board is lit. If the power LED is lit, check both ends of the programming cable to ensure that it is firmly plugged into the PC and the RCM2200's programming port. Ensure that both modules are firmly and correctly installed on the Demonstration Board.

> If there are no faults with the hardware, select a different COM port within Dynamic C. From the Options menu, select Communications. The dialog shown should appear.

> Select another COM port from the list, then click OK. Press <Ctrl-Y> to force Dynamic C to recompile the BIOS. If Dynamic C still reports it is unable to locate the target system, repeat the above steps until you locate the active COM port.

> If Dynamic C appears to compile the BIOS successfully, but you then receive a communication error message, it is possible that your PC cannot handle the 115,200 bps baud rate. Try changing the baud rate to 57,600 bps as follows.

> - Locate the Serial Options dialog in the Dynamic C Options > Communications menu. Change the baud rate to 57,600 bps.

> ### 3.4 Sample Programs

> You are now ready to test your set-up by running some sample programs. Loading, executing and studying these programs will give you a solid hands-on overview of the modules' 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 and TCP/IP. If you do not, see the Dynamic C Premier User's Manual, An Introduction to TCP/IP, and the Dynamic C TCP/IP User's Manual.

> #### 3.4.1 RCM2200 Hardware Platform

> Find the sample program PONG.C, which is in the Dynamic C SAMPLES folder. To run the program, open it with the File menu (if it is not still open), compile it using F5 or the Compile menu, and then run it by pressing F9 or by selecting Run in the Run menu. The STDIO window will open and will display a small square bouncing around in a box.

> #### 3.4.2 RCM2300 Target Device

> Before running any sample programs on the RCM2300, you will have to move the PROG connector on the programming cable from header J1 on the RCM 2200 to header J1 on the RCM2300 (see Figure 7). Remember to press F4 before removing the programming cable to avoid getting a target communication error message.

> NOTE | If you plan to do extensive programming and wish to access both the DeviceMate hardware platform and the target device, consider getting a second programming cable. Plug this second programming cable into another available RS-232 COM port on your PC, and start a second session of Dynamic C.

> Figure 7. Programming Cable Connections to RCM2200 and RCM2300
> (optional second programming cable serial COM 2 connection shown)

> Find the sample program PONG.C, which you just ran on the RCM2200. To run the program, open it with the File menu (if it is not still open), compile it using F5 or the Compile menu, and then run it by pressing F9 or by selecting Run in the Run menu. The STDIO window will open and will display a small square bouncing around in a box.

> Several sample programs in the -SAMPLES/RCM2300 folder illustrate the operation of the I/O on the RCM2300 modules.

> - FLASHLED.C--RCM2300 repeatedly flashes LED DS3 on the Demonstration Board.
> - FLASHLEDS.C--RCM2300 repeatedly flashes LEDs DS2 and DS3 on the Demonstration Board.
> - TOGGLELED.C--RCM2300 flashes LED DS2 on the Demonstration Board and toggles LED DS3 on/off in response to pressing S3.

> Each of these programs is fully commented within the source code. Refer to these comments for the details of how each program works.

> #### 3.4.3 Prepare DeviceMate Hardware Platform

> Now that you have verified that both the RCM2200 hardware platform and the RCM2300 target device are mounted correctly and working, you can move on and try the DeviceMate sample programs in Chapter 4. If you only have one programming cable, reconnect it to header J1, the programming port on the RCM2200 hardware platform.

Z-World http://www.zworld.com Voice: (530) 753-3737 FAX: (530) 753-5141 sales@zworld.com