User’s Manual
61
•
SLEEPMODE2.C
—This sample program shows how to place the RCM4510W module in the
“sleep” mode where most power is removed from the RCM4510W module. Power is restored
once a message is received or after a specified time interval. This sample program demon-
strates waking after a specified time interval.
Sleeping only works on end devices, so the
XBEE_ROLE
macro is set to
NODE_TYPE_ENDDEV
in this sample program. Because the XBee RF module turns the Rabbit processor off and on, a
serial terminal emulator is required once the program has been compiled.
1. Compile and run the sample program on the RCM4510W module.
2. Once the sample program is running, choose “Close Connection” from the in Dynamic C
Run
menu, and
unplug the AC adapter supply power to the Prototyping Board.
3. Connect the
DIAG
connector instead of the
PROG
connector on the programming cable to the RCM4510
programming header.
4. Open the serial port in your serial terminal emulator such as TeraTerm or Hyperterminal to connect to the
serial port at 57600 baud.
5. Plug the AC adapter back in to apply power to the Prototyping Board once again.
Once the XBee RF module on the RCM4510W completes its initialization (it joins the net-
work), you will be prompted to enter three values that control the XBee RF module's sleep
mode — enter the values followed by the
Enter
key each time. Once you have entered these
values via the serial terminal emulator, press any key to initiate the sleep mode. There will be a
delay of a few seconds before the RCM4510W module powers off. When the RCM4510W
module powers back up, it will begin running this program again from the beginning.
NOTE:
This sample program does not demonstrate the saving state. State information may be
saved in battery-backed RAM before the RCM4510W module is placed in the sleep mode.
•
XBEE_GPIO_SERVER.C
—This sample program shows how to set up and use endpoints and
clusters. It is meant to be run with the Windows GUI client (installed in Dynamic C’s
Utili-
ties
directory) and a Digi USB XBee coordinator or with the GPIO client sample program
(
SAMPLES/XBEE/XBEE_GPIO_CLIENT.C
) running on an RCM4510W RabbitCore module or
on a single-board computer with a separate XBee RF module.
Compile and run this sample program with the RCM4510W RabbitCore module installed on the
Prototyping Board. Run the Windows GUI client (
XBEE_GPIO_GUI.exe
in the Dynamic C
Utilities\XBee GPIO GUI
folder) on your PC. Configure the GUI client to connect to the
Digi USB XBee coordinator and scan for devices. Make sure the RCM4510W and the Digi
USB XBee coordinator are configured with the same PAN ID or extended PAN ID.
If you run the
XBEE_GPIO_CLIENT.C
sample program on another board with an XBee RF
module, set the PAN IDs to match between the client and the server sample programs.
Now select the GPIO server and use the GUI interface on the PC, or the command-line client
on another XBee-equipped board to view the server's inputs and change its outputs. For exam-
ple, you can toggle the LEDs on the Prototyping Board on/off.