BL4S100 User’s Manual 2
Chapter 4. Software 33
4.1 Running Dynamic C ...........................................................................................................................33
4.1.1 Upgrading Dynamic C ................................................................................................................35
4.1.2 Add-On Modules.........................................................................................................................35
4.2 Sample Programs ................................................................................................................................36
4.2.1 Digital I/O ...................................................................................................................................37
4.2.2 Serial Communication.................................................................................................................43
4.2.3 A/D Converter Inputs..................................................................................................................45
4.2.4 Real-Time Clock .........................................................................................................................46
4.2.5 TCP/IP Sample Programs ...........................................................................................................46
4.2.6 ZigBee Sample Programs............................................................................................................46
4.3 BL4S100 Libraries..............................................................................................................................47
4.4 BL4S100 Function Calls.....................................................................................................................48
4.4.1 Board Initialization .....................................................................................................................48
4.4.2 Digital I/O ...................................................................................................................................49
4.4.3 Rabbit RIO Interrupt Handlers....................................................................................................75
4.4.4 Serial Communication.................................................................................................................79
4.4.5 A/D Converter Inputs..................................................................................................................80
4.4.6 SRAM Use ..................................................................................................................................94
Chapter 5. Using the Ethernet TCP/IP Features 95
5.1 TCP/IP Connections ...........................................................................................................................95
5.2 TCP/IP Sample Programs ...................................................................................................................97
5.2.1 How to Set IP Addresses in the Sample Programs .....................................................................97
5.2.2 How to Set Up your Computer for Direct Connect ....................................................................98
5.2.3 Run the
PINGME.C Demo ............................................................................................................99
5.2.4 Running More Demo Programs With a Direct Connection......................................................100
5.3 Where Do I Go From Here? .............................................................................................................102
Chapter 6. Using the ZigBee Features 103
6.1 Introduction to the ZigBee Protocol .................................................................................................103
6.2 ZigBee Sample Programs .................................................................................................................104
6.2.1 Setting Up the Digi XBee USB Coordinator ............................................................................105
6.2.2 Setting up Sample Programs .....................................................................................................107
6.3 Dynamic C Function Calls................................................................................................................111
6.4 Where Do I Go From Here? .............................................................................................................111
Appendix A. Specifications 112
A.1 Electrical and Mechanical Specifications ........................................................................................113
A.1.1 Exclusion Zone.........................................................................................................................115
A.1.2 Headers.....................................................................................................................................115
A.2 Jumper Configurations.....................................................................................................................116
A.3 Use of Rabbit Microprocessor Parallel Ports...................................................................................118
Appendix B. Power Supply 120
B.1 Power Supplies.................................................................................................................................120
B.2 Batteries and External Battery Connections ....................................................................................121
B.2.1 Replacing the Backup Battery..................................................................................................121
Appendix C. Demonstration Board 122
C.1 Connecting Demonstration Board....................................................................................................123
C.2 Demonstration Board Features.........................................................................................................124
C.2.1 Pinout........................................................................................................................................124
C.2.2 Configuration............................................................................................................................124
Appendix D. Rabbit RIO Resource Allocation 126