User’s Manual
13
2.3 Run a Sample Program
If you already have Dynamic C installed, you are now ready to test your programming connec-
tions by running a sample program. Start Dynamic C by double-clicking on the Dynamic C icon
on your desktop or in your
Start
menu.
You may have to select the COM port assigned to the USB programming cable on your PC. In
Dynamic C, select
Options > Project Options
, then select this COM port on the “Communica-
tions” tab. Then check “Use USB to Serial Converter” in “Serial Options.” Click
OK
to save the
settings.
Find the file
PONG.C
, which is in the Dynamic C
SAMPLES
folder. To run the program, open it
with the
File
menu, then compile and run it by pressing
F9
. The
STDIO
window will open on your
PC and will display a small square bouncing around in a box.
2.3.1 Troubleshooting
If you receive the message
Could Not Open Serial Port
, check that the COM port assigned
to the USB programming cable was identified and set up in Dynamic C as described in the pre-
ceding section.
If you receive the message
No Rabbit Processor Detected
, the programming cable may be
connected to the wrong 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 Prototyping Board is lit. If the LED is
lit, check both ends of the programming cable to ensure that it is firmly plugged into the PC and
the programming header on the RCM4510W with the marked (colored) edge of the programming
cable towards pin 1 of the programming header. Ensure that the module is firmly and correctly
installed in its connectors on the Prototyping Board.
If Dynamic C appears to compile the BIOS successfully, but you then receive a communication
error message when you compile and load a sample program, it is possible that your PC cannot
handle the higher program-loading baud rate. Try changing the maximum download rate to a
slower baud rate as follows.
•
Locate the
Serial Options
dialog on the “Communications” tab in the Dynamic C
Options >
Project Options
menu. Select a slower Max download baud rate.
If a program compiles and loads, but then loses target communication before you can begin
debugging, it is possible that your PC cannot handle the default debugging baud rate. Try lower-
ing the debugging baud rate as follows.
•
Locate the
Serial Options
dialog on the “Communications” tab in the Dynamic C
Options >
Project Options
menu. Choose a lower debug baud rate.
Press
<Ctrl-Y>
to force Dynamic C to recompile the BIOS. You should receive a
Bios com-
piled successfully
message once this step is completed successfully.
2.3.2 Run a ZigBee Sample Program
This section explains how to run a sample program in which the RCM4510W is used in its default
setup as a router and the Digi
®
XBee USB is used as the ZigBee coordinator.