BL4S100 C-Programmable Single-Board Computer with Networking User’s Manual 019–0172_C
BL4S100 User’s Manual Part Number 019-0172_C • Printed in U.S.A. ©2008-2010 Digi International Inc. • All rights reserved. Digi International reserves the right to make changes and improvements to its products without providing notice. Trademarks Rabbit, RabbitCore, and Dynamic C are registered trademarks of Digi International Inc. RabbitNet is a trademark of Digi International Inc. The latest revision of this manual is available on the Rabbit Web site, www.rabbit.com, for free, unregistered download.
TABLE OF CONTENTS Chapter 1. Introduction 4 1.1 BL4S100 Description ...........................................................................................................................4 1.2 BL4S100 Features.................................................................................................................................4 1.3 Development and Evaluation Tools......................................................................................................6 1.3.1 Tool Kit ..........
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 ..................................
D.1 Digital I/O Pin Associations ............................................................................................................127 D.2 Interpreting Error Codes ..................................................................................................................128 Appendix E. Plastic Enclosure 130 E.1 Assembly Instructions ......................................................................................................................131 E.2 Dimensions ....................
1. INTRODUCTION The BL4S100 series of high-performance, C-programmable singleboard computers offers built-in RS-232, digital I/O and analog inputs combined with Ethernet and ZigBee network connectivity in a compact form factor. The BL4S100 single-board computers are ideal for both discrete manufacturing and process-control applications. A Rabbit® 4000 microprocessor provides fast data processing. 1.
• Battery-backed real-time clock. • Watchdog supervisor. Four BL4S100 models are available. Their standard features are summarized in Table 1. Table 1. BL4S100 Models Feature BL4S100 BL4S110 512KB 1MB Data SRAM 512KB Serial Flash Memory (program) 1MB 2MB A/D Converter 12 bits Ethernet Interface ZigBee Interface BL4S160 Rabbit® 4000 running at 40.00 MHz Microprocessor Program Execution SRAM BL4S150 10Base-T ZigBee PRO (802.15.4) — ZigBee PRO (802.15.
1.3 Development and Evaluation Tools 1.3.1 Tool Kit A Tool Kit contains the hardware essentials you will need to use your own BL4S100 singleboard computer. These items are supplied in the Tool Kit. • Getting Started instructions. • Dynamic C CD-ROM, with complete product documentation on disk. • USB programming cable, used to connect your PC USB port to the BL4S100. • Universal AC adapter, 12 V DC, 1 A (includes Canada/Japan/U.S., Australia/N.Z., U.K., and European style plugs).
1.3.2 Software The BL4S100 is programmed using version 10.44 or later of Rabbit’s Dynamic C. A compatible version is included on the Tool Kit CD-ROM. This version of Dynamic C includes the popular µC/OS-II real-time operating system, point-to-point protocol (PPP), FAT file system, RabbitWeb, and other select libraries. Rabbit also offers for purchase the Rabbit Embedded Security Pack featuring the Secure Sockets Layer (SSL) and a specific Advanced Encryption Standard (AES) library.
1.4 CE Compliance Equipment is generally divided into two classes. CLASS A CLASS B Digital equipment meant for light industrial use Digital equipment meant for home use Less restrictive emissions requirement: less than 40 dB µV/m at 10 m (40 dB relative to 1 µV/m) or 300 µV/m More restrictive emissions requirement: 30 dB µV/m at 10 m or 100 µV/m These limits apply over the range of 30–230 MHz. The limits are 7 dB higher for frequencies above 230 MHz.
1.4.1 Design Guidelines Note the following requirements for incorporating the BL4S100 series of single-board computers into your application to comply with CE requirements. General • The power supply provided with the Tool Kit is for development purposes only. It is the customer’s responsibility to provide a CE-compliant power supply for the end-product application.
2. GETTING STARTED Chapter 2 explains how to connect the programming cable and power supply to the BL4S100.
2.1 BL4S100 Connections Step 1 — Connect Programming Cable The programming cable connects the BL4S100 to the PC running Dynamic C to download programs and to monitor the BL4S100 module during debugging. Connect the 10-pin PROG connector of the programming cable to header J8 on the BL4S100. Ensure that the colored edge lines up with pin 1 as shown. (Do not use the DIAG connector, which is used for monitoring only.
Step 2 — Connect Power Supply Once all the other connections have been made, you can connect power to the BL4S100. First, prepare the AC adapter for the country where it will be used by selecting the plug. The Tool Kit presently includes Canada/Japan/U.S., Australia/N.Z., U.K., and European style plugs.
2.2 Installing Dynamic C If you have not yet installed Dynamic C version 10.44 (or a later version), do so now by inserting the Dynamic C CD from the BL4S100 Tool Kit in your PC’s CD-ROM drive. If autorun is enabled, the CD installation will begin automatically. If autorun is disabled or the installation does not start, use the Windows Start | Run menu or Windows Disk Explorer to launch setup.exe from the root folder of the CD-ROM. The installation program will guide you through the installation process.
2.3 Starting Dynamic C Once the BL4S100 is connected to your PC and to a power source, start Dynamic C by double-clicking on the Dynamic C icon on your desktop or in your Start menu. Select Store Program in Flash on the “Compiler” tab in the Dynamic C Options > Project Options menu. Then click on the “Communications” tab and verify that Use USB to Serial Converter is selected to support the USB programming cable. Click OK. You may have to select the COM port assigned to the USB programming cable on your PC.
2.4.2 Run a ZigBee Sample Program (BL4S100/BL4S150 only) This section explains how to run a sample program in which the BL4S100/BL4S150 is used in its default setup as a router and the Digi® XBee USB is used as the ZigBee coordinator. 1. Connect the Digi® XBee USB acting as a ZigBee coordinator to an available USB port on your PC or workstation. Your PC should recognize the new USB hardware. 2. Find the file AT_INTERACTIVE.C, which is in the Dynamic C SAMPLES\XBee folder.
2.5 Where Do I Go From Here? NOTE: If you purchased your BL4S100 through a distributor or Rabbit partner, contact the distributor or partner first for technical support. If there are any problems at this point: • Use the Dynamic C Help menu to get further assistance with Dynamic C. • Check the Rabbit Technical Bulletin Board and forums at www.rabbit.com/support/bb/ and at www.rabbit.com/forums/. • Use the Technical Support e-mail form at www.rabbit.com/support/.
3. SUBSYSTEMS Chapter 3 describes the principal subsystems for the BL4S100. • Digital I/O • Serial Communication • A/D Converter Inputs • Memory Figure 4 shows these Rabbit-based subsystems designed into the BL4S100. BL4S100 Real-Time Clock Fast SRAM (program) Data SRAM Serial Flash Main Clock RABBIT ® 4000 Ethernet Programming Port RS-232 RABBIT RIO ® ZigBee PRO (802.15.4) optional Digital Inputs Digital Outputs A/D Converter Figure 4.
3.1 BL4S100 Pinouts The BL4S100 pinouts are shown in Figure 5. RS-232 GND +K IN0 IN1 IN2 IN3 OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 GND +K1 +K2 +5 V J3 J4 GND +5 V TXF/RTS RXF/CTS TXD/1-W RXD Digital Outputs Digital Inputs RNET Series 2 XBee J5 Ethernet GND Digital Inputs 2 n.c. IN11 IN10 IN9 IN8 IN7 IN6 IN5 IN4 GND Analog Inputs J17 4 2 3 1 n.c. J16 +RAW J15 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND J14 Power Supply Figure 5. BL4S100 Pinouts 3.1.
3.2 Digital I/O 3.2.1 Digital Inputs The BL4S100 has 12 digital inputs, IN0–IN11, each of which is protected over a range of –36 V to +36 V. The inputs are factory-configured to be pulled up to +5 V, but they can also be pulled up to +K or pulled down to 0 V by changing a jumper as shown in Figure 6. CAUTION: Do not simultaneously jumper more than one setting when configuring the pull-up or pull-down options. J13 +K +5 V +3.3 V 27 kW IN0IN11 100 kW Rabbit® RIO Figure 6.
NOTE: If the inputs are pulled up to +K, the voltage range over which the digital inputs are protected changes to +K – 36 V to +36 V. Normal Switching Levels +40 V Digital Input Voltage The actual switching threshold is approximately 1.40 V. Anything below this value is a logic 0, and anything above 1.90 V is a logic 1. The digital inputs are each fully protected over a range of -36 V to +36 V, and can handle short spikes of ±40 V. Spikes Spikes +36 V +3.3 V 40 V Spikes Figure 7.
Keep the following guidelines in mind when selecting special uses for the digital input pins. • Interrupts, event counters, and input capture are available on any digital input pin. • Each Quadrature Decoder channel requires at least two digital input pins associated with the same counter/timer block; three digital input pins associated with the same counter/timer block are needed if you need indexing. Quadrature Decoder channels are configured using the setDecoder() function call.
3.2.2 Digital Outputs The BL4S100 has eight digital outputs, OUT0–OUT7, which can each sink up to 200 mA. Figure 8 shows a wiring diagram for using the sinking digital outputs. SINKING OUTPUT +K1 or +K2 OUT0OUT7 470 W Rabbit® RIO Figure 8. BL4S100 Digital Outputs OUT0–OUT3 are powered by +K1, and OUT4–OUT7 are powered by +K2. +K1 and +K2 can each be up to 36 V. They don't have to be the same. All the sinking current, which could be up to 1.6 A, is returned through the GND pin.
Blocks of digital output pins are associated with counters/timers on the Rabbit RIO chip. Table 4 provides complete details for these associations. Table 4.
3.2.2.1 PWM/PPM Outputs Setup A PWM output is described as noninverted when it starts high, remains high for a duty cycle that is a fraction of the period, then goes low for the remainder of the period. Similarly, an inverted PWM output starts low, remains low for a duty cycle that is a fraction of the period, then goes high for the remainder of the period.
3.3 Serial Communication The BL4S100 has two RS-232 serial ports, which can be configured as one RS-232 serial channel (with RTS/CTS) or as two RS-232 (3-wire) channels using the serMode() software function call. Table 5 summarizes the options. Table 5. Serial Communication Configurations Serial Port Mode D F 0 RS-232, 3-wire RS-232, 3-wire 1 RS-232, 5-wire CTS/RTS The BL4S100 also has one CMOS serial channel that serves as the programming port.
external bootstrap mode. The BL4S100 can be reset from the programming port via the /RESET_IN line. The Rabbit microprocessor status pin is also presented to the programming port. The status pin is an output that can be used to send a general digital signal. NOTE: Refer to the Rabbit 4000 Microprocessor User’s Manual for more information related to the bootstrap mode. 3.3.3 Ethernet Port Figure 10 shows the pinout for the Ethernet port (J4).
3.4 A/D Converter Inputs The single A/D converter chip used in the BL4S100 has a resolution of 12 bits (11 bits for the value and one bit for the polarity). The A/D converter chip has a programmable-gain amplifier. Each external input has circuitry that provides scaling and filtering. All 8 external inputs are scaled and filtered to provide the user with an input impedance of 1 M and a variety of single-ended unipolar, and differential bipolar ranges as shown in Table 6.
Table 6. A/D Converter Input Voltage Ranges Amplifier Voltage Range Gain Single-Ended Unipolar Differential Bipolar 1 0–20 V ± 20 V 2 0–10 V ± 10 V 4 0–5 V ±5V 5 0–4 V ±4V 8* 0–2.5 V ± 2.5 V 10 0–2 V ±2V 16 0–1.25 V ± 1.25 V 20 0–1 V ±1V * 4–20 mA operation is available with an amplifier gain of 8 In the differential mode, each individual channel is limited to half the total voltage—for example, the range for a gain code of 1 is ±20 V, but each channel is limited to 0–20 V.
3.4.1 A/D Converter Calibration When you start to develop your application, run USERBLOCK_READ_WRITE.C in the SAMPLES\UserBlock folder to save the factory calibration constants in case you inadvertently write over them while running the sample programs. To get the best results from the A/D converter, it is necessary to calibrate each mode (single-ended, differential, and current) for each of its gains.
3.5 USB Programming Cable The USB programming cable is used to connect the serial programming port of the BL4S100 to a PC USB port. The programming cable converts the voltage levels used by the PC USB port to the CMOS voltage levels used by the Rabbit microprocessor. When the PROG connector on the programming cable is connected to the programming header on the BL4S100, programs can be downloaded and debugged over the serial interface.
3.6 Other Hardware 3.6.1 Clock Doubler The BL4S100 takes advantage of the Rabbit microprocessor’s internal clock doubler. A built-in clock doubler allows half-frequency crystals to be used to reduce radiated emissions. The clock doubler may be disabled if the higher clock speeds are not required. Disabling the clock doubler will reduce power consumption and further reduce radiated emissions. The clock doubler is disabled with a simple configuration macro as shown below. 1.
3.7 Memory 3.7.1 SRAM All BL4S100 boards have 512KB of battery-backed data SRAM, and 512KB–1MB of fast program execution SRAM. 3.7.2 Flash Memory BL4S100 boards have 1MB—2MB of serial flash memory. Writing to arbitrary flash memory addresses at run time is also discouraged. Instead, define a “user block” area to store persistent data. The functions writeUserBlock() and readUserBlock() are provided for this. 3.7.
4. SOFTWARE Dynamic C is an integrated development system for writing embedded software. It runs on an IBM-compatible PC and is designed for use with single-board computers and other devices based on the Rabbit microprocessor. Chapter 4 provides the libraries, function calls, and sample programs related to the BL4S100. 4.1 Running Dynamic C Since the BL4S100 has a serial flash memory, all software development must be done in the static SRAM.
Dynamic C has a number of standard features: • Full-feature source and/or assembly-level debugger, no in-circuit emulator required. • Royalty-free TCP/IP stack with source code and most common protocols. • Hundreds of functions in source-code libraries and sample programs: Exceptionally fast support for floating-point arithmetic and transcendental functions. RS-232 and RS-485 serial communication. Analog and digital I/O drivers. I2C, SPI, GPS, file system. LCD display and keypad drivers.
4.1.1 Upgrading Dynamic C 4.1.1.1 Patches and Updates Dynamic C patches that focus on bug fixes and updates are available from time to time. Check the Web site at www.rabbit.com/support/ for the latest patches, workarounds, and updates. The default installation of a patch or update is to install the file in a directory (folder) different from that of the original Dynamic C installation.
4.2 Sample Programs Sample programs are provided in the Dynamic C Samples folder. The sample program PONG.C demonstrates the output to the STDIO window. The various directories in the Samples folder contain specific sample programs that illustrate the use of the corresponding Dynamic C libraries. The SAMPLES\BL4S1xx folder provides sample programs specific to the BL4S100. Each sample program has comments that describe the purpose and function of the program.
4.2.1 Digital I/O The following sample programs are found in the SAMPLES\BL4S1xx\DIO subdirectory. Figure 14 shows the signal connections for the sample programs that illustrate the use of the digital inputs.
Figure 15 shows the signal connections for the sample programs that illustrate the use of the digital outputs.
• INTERRUPTS.C—Demonstrates the use of the Rabbit RIO interrupt service capabilities. Set up the Demonstration Board as shown in Figure 14 with IN0 connected to SW1. The sample program sets up two interrupt sources, an external interrupt tied to pushbutton switch SW1, and a rollover interrupt tied to a timer that is producing a PWM output. The Dynamic C STDIO window will show a count of rollovers that have occurred since the PWM signal was started.
Once the connections have been made, compile and run this sample program. Change the offset and duty cycle for a given PPM channel via the Dynamic C STDIO window and watch the change to the begin and end counts measured on the input capture inputs. The PPM frequency can be changed in the #define PPM_FREQ line. Rabbit recommends that you run and understand both the INTERRUPTS.C and the PULSE_ CAPTURE.C sample programs before looking at PULSE_CAPTURE_IRQ.C since PULSE_ CAPTURE_IRQ.
• QUADRATURE_DECODER.C—Demonstrates the use of quadrature decoders on the BL4S100. See Figure 16 for hookup instructions of the digital I/O pins on headers J3 and J4 with the Demonstration Board.
• PPM_QUADRATURE_DECODER.C—Demonstrates the use of two PWM and two PPM output channels connected back to four digital inputs to simulate two Quadrature Decoders feeding signals into the BL4S100. The PWM and PPM outputs are adjusted through a menu system to simulate the movement of a Quadrature Decoder. The results of the Quadrature Decoder inputs are displayed continuously to show the effects of the PWM and PPM outputs.
4.2.2 Serial Communication The following sample programs are found in the SAMPLES\BL4S1xx\RS232 subdirectory. • PARITY.C—This sample program repeatedly sends byte values 0–127 from Serial Port D to Serial Port F. The program will cycle through parity types on Serial Port D. Serial Port F will always be checking parity, so parity errors should occur during most sequences. The results are displayed in the Dynamic C STDIO window.
Stop bits: 1 Flow control: None Once you compile and run this program, configure the serial port using the following menu options in the Dynamic C STDIO window. Menu q - Quit s - Send "Sample Text" r - Reset Counters n - Set No Parity e - Set Even Parity o - Set Odd Parity Type in the Hyperterminal window to send characters to the sample program.
4.2.3 A/D Converter Inputs The following sample programs are found in the SAMPLES\BL4S1xx\ADC subdirectory. You will need a separate power supply and a multimeter to use with these sample programs. NOTE: The calibration sample programs will overwrite the calibration constants set at the factory. Before you run these sample programs, run USERBLOCK_READ_ WRITE.
• ADC_RD_CALDATA.C—Demonstrates how to display the two calibration coefficients, gain and offset, in the Dynamic C STDIO window for each channel and mode of operation. • ADC_RD_DIFF.C—Demonstrates how to read and display voltage and equivalent values for a differential A/D converter channel using calibration coefficients previously stored in the user block. The user selects to display either the raw data or the voltage equivalent.
4.3 BL4S100 Libraries Two library directories provide libraries of function calls that are used to develop applications for the BL4S100. • BL4S1xx—libraries associated with features specific to the BL4S100. The functions in the BL4S1xx.LIB library are described in Section 4.4, “BL4S100 Function Calls.” • TCPIP—libraries specific to using TCP/IP functions on the BL4S100. Further information about TCP/IP is provided in Chapter 5, “Using the Ethernet TCP/IP Features.
4.4 BL4S100 Function Calls 4.4.1 Board Initialization brdInit void brdInit (void); FUNCTION DESCRIPTION Call this function at the beginning of your program. This function initializes Parallel Ports A–E, the Rabbit RIO chip, and the A/D converter. The ports are initialized according to Table A-3 in Appendix A.
4.4.2 Digital I/O setDigIn int setDigIn(int channel); FUNCTION DESCRIPTION Sets an input channel to be a general digital input. PARAMETERS channel digital input channel, 0–11 (pins IN0–IN11) RETURN VALUE 0 — success. -EINVAL — invalid parameter value. SEE ALSO brdInit, digIn, digInBank digIn int digIn(int channel); FUNCTION DESCRIPTION Reads the state of a digital input channel. PARAMETERS channel digital input channel, 0–11 (pins IN0–IN11) RETURN VALUE The logic state of the specified channel.
digInBank int digInBank(int bank); FUNCTION DESCRIPTION Reads the state of the 12 digital input channels in banks of up to 8 input channels. PARAMETER bank digital input bank pins: 0 — IN0–IN7 1 — IN8–IN11 RETURN VALUE Data read from the bank of digital inputs. Data Bits LSB MSB Bank 0 Bank 1 D0 IN0 IN8 D1 IN1 IN9 D2 IN2 IN10 D3 IN3 IN11 D4 IN4 D5 IN5 D6 IN6 D7 IN7 not used -EINVAL — invalid parameter value.
setExtInterrupt int setExtInterrupt(int channel, char edge, int handle); FUNCTION DESCRIPTION Sets the specified channel to be an interrupt. The interrupt can be configured as a rising edge, falling edge, or either edge.
setDecoder int setDecoder(int channel_a, int channel_b, int channel_index, char index_polarity); FUNCTION DESCRIPTION Sets up Quadrature Decoder functionality on the specified channels. The Quadrature Decoder may optionally use an index channel.
setCounter int setCounter(int channel, int mode, int edge, word options); FUNCTION DESCRIPTION Sets up the channel as a counter input, with selectable modes and edge settings. The counter will increment or decrement on each selected edge event. Use getCounter() to read the current count and use resetCounter() to force a reset of the counter.
setCounter (continued) RETURN VALUE 0 — success. -EINVAL — invalid parameter value or pin use. -EPERM — pin type does not permit this function. -EACCESS— resource needed by this function is not available. -EFAULT — internal data fault detected. positive number — Mode Conflict — the positive number is a bitmap that corresponds to the pins on a particular block of a RIO chip that have not been configured to support this function call.
setCapture int setCapture(int channel, int mode, int edge, word options); FUNCTION DESCRIPTION Sets up the channel as an event capture input, with selectable modes and edge settings. The counter will run from a gated main or prescaled clock signal based on the run criteria of the selected mode, and begin/end events can be set to capture the count at the time of these events.
setCapture (continued) options options based on mode: BL_CNT_TIL_END — begin input and edge can be selected all others modes — end input and edge can be selected. For all modes, the prescale clock and save limit flags can be used (OR in).
getCounter int getCounter(int channel, word *count); FUNCTION DESCRIPTION Reads the current count of the counter register within the counter block hosting the given channel. PARAMETERS channel digital input channel that uses the desired counter block, 0–11 (pins IN0–IN11) count pointer to word variable to place count register reading RETURN VALUE 0 — success. -EINVAL — invalid parameter value.
getEnd int getEnd(int channel, word *end); FUNCTION DESCRIPTION Reads the current value of the end register within the counter block hosting the given channel. PARAMETERS channel digital input channel that uses the desired counter block, 0–11 (pins IN0–IN11) begin pointer to word variable to place end register reading RETURN VALUE 0 — success. -EINVAL — invalid parameter value. -EPERM — pin type does not permit this function.
setLimit int setLimit(int channel, word limit); FUNCTION DESCRIPTION Sets the value of the limit register within the counter block hosting the given channel. This new value will take effect on the next counter overflow or by resetting the counter via the resetCounter() function call. PARAMETERS channel digital input channel that uses the desired counter block, 0–11 (pins IN0–IN11) limit new value for the limit register RETURN VALUE 0 — success. -EINVAL — invalid parameter value.
setSyncIn int setSyncIn(int channel, int source, int edge); FUNCTION DESCRIPTION Sets the synch for the block the digital input channel is associated with. Note that when more than one block is synchronized to the same synch signal (global or external), each block has its own independent edge-detection circuit. These circuits will synch to the edge within plus or minus one count of the block’s current clock source (main or prescale).
globalSync int globalSync(void); FUNCTION DESCRIPTION Sends a single pulse to the global synch inputs of all RIO chips. Note that when more than one block is synchronized to the same synch signal (global or external), each block has its own independent edge-detection circuit. These circuits will synch to the edge within plus or minus one count of the block’s current clock source (main or prescale). This means synchronized blocks may have a small offset when compared to each other.
setDigOut int setDigOut(int channel, int state); FUNCTION DESCRIPTION Configures the output channel as a simple digital output. The output state of the channel is also initialized to logic 0 or logic 1 based on the state parameter. The digOut function should be used to control the output state after configuration as it is more efficient. This function is non-reentrant.
digOut void digOut(int channel, int state); FUNCTION DESCRIPTION Sets the state of a digital output channel to a logic 0 or a logic 1. This function will only allow control of pins that are configured by the setDigOut() function call. PARAMETERS channel digital output channel, 0–7 (OUT0–OUT7) state set output to one of the following states: 0 — connects the load to GND 1 — puts the output in a high-impedance state. RETURN VALUE 0 — success. -EINVAL — invalid parameter value.
digOutBank int digOutBank(char bank, char data); FUNCTION DESCRIPTION Sets the state (logic 0 or logic 1) of a bank of 8 digital output pins to the states contained in the data parameter. This function only updates the channels that are configured to be sinking digital outputs by the setDigOut() function call.
setPWM int setPWM(int channel, float frequency, float duty, int invert, int bind); FUNCTION DESCRIPTION Sets up a PWM output on the selected digital output channel with the specified frequency and duty cycle. The PWM output can be inverted. The PWM channel duty cycle can be bound to a PWM/PPM on another channel on the same RIO block so that they share an edge.
setPWM (continued) RETURN VALUE 0 — success. -EINVAL — invalid parameter value. -EPERM — pin type does not permit this function. -EACCES — resource needed by this function is not available. -EFAULT — internal data fault detected. positive number — Mode Conflict — the positive number is a bitmap that corresponds to the pins on a particular block of a RIO chip that have not been configured to support this function call.
setPPM int setPPM(int channel, float frequency, float offset, float duty, char invert, int bind_offset, int bind_duty); FUNCTION DESCRIPTION Sets up a PPM output on the selected digital output channel with the specified frequency and duty cycle. The PPM output of the PPM can be inverted. The offset and duty of the PPM can be bound to a PWM/PPM on another channel on the same RIO block so that they share an edge.
setPPM (continued) RETURN VALUE 0 — success. -EINVAL — invalid parameter value. -EPERM — pin type does not permit this function. -EACCES — resource needed by this function is not available. -EFAULT — internal data fault detected. positive number — Mode Conflict — the positive number is a bitmap that corresponds to the pins on a particular block of a RIO chip that have not been configured to support this function call.
setFreq int setFreq(int channel, float frequency); FUNCTION DESCRIPTION Sets the frequency of all the PWM or PPM outputs on the same block as the channel. Will preserve the duty cycle and offset percentages for all of the channels on the same block. Repeated calls to this function by itself may cause the duty cycle and offset values to drift. If this drift is of concern, call setOffset() and setDuty() to reset the duty cycle and offset to the desired value.
setDuty int setDuty(int channel, float duty); FUNCTION DESCRIPTION Sets the duty cycle of the PWM or PPM output on a digital output channel. Will affect any PWM/PPM that has been bound to this channel’s PWM/PPM. PARAMETERS channel digital output channel that is getting its duty cycle set, 0–7 (OUT0–OUT7) duty duty cycle of the PWM/PPM output (should be from 0 to 100%) RETURN VALUE 0 — success. -EINVAL — invalid parameter value. -EPERM — channel function does not permit this operation.
setOffset int setOffset(int channel, float offset); FUNCTION DESCRIPTION Sets the offset of a PPM output on a digital output channel. This function call will not affect the position of the trailing edge of the PPM output and so will change the duty cycle percentage of the PPM output. If the offset is set past the current position of the trailing edge of the PPM output (set by the duty cycle), the PPM output will start at the offset and will wrap around to the position of what was the trailing edge.
pulseDisable int pulseDisable(int channel, int state); FUNCTION DESCRIPTION Disables a PWM/PPM output and sets the output to state. The pin can be restored to the same PWM/PPM operation as before by calling pulseEnable(). PARAMETERS channel digital output channel that is getting its PWM/PPM disabled, 0–7 (OUT0–OUT7) state state that the digital output will be set to (0 or 1) RETURN VALUE 0 — success. -EINVAL — invalid parameter value. -EPERM — channel function does not permit this operation.
setSyncOut int setSyncOut(int channel, int source, int edge); FUNCTION DESCRIPTION Sets the synch for the block the digital output channel is associated with. Note that when more than one block is synchronized to the same synch signal (global or external), each block has its own independent edge-detection circuit. These circuits will synch to the edge within plus or minus one count of the block’s current clock source (main or prescale).
getMatch int getMatch(int channel, int source); FUNCTION DESCRIPTION Returns the block match register use for the given channel. May optionally be filtered to specific sources by the source parameter. PARAMETERS channel digital output channel about which to get match information, 0–7 (OUT0–OUT7) source source filter: BL_TRAIL_ONLY will filter only the Trail match register BL_LEAD_ONLY will filter only the Lead match register Note that counters will only use the Trail match register.
4.4.3 Rabbit RIO Interrupt Handlers addISRIn int addISRIn(int channel, int ier, void (*handler)()); FUNCTION DESCRIPTION Adds an interrupt handler for the interrupts specified in the ier parameter for the given RIO block hosting the given configurable I/O pin. The interrupt service routine (ISR) is always disabled when created. Call enableISR() to enable the interrupt service routine. The ISR handler function is responsible for clearing the interrupt(s) within the hosting RIO block when called.
addISROut int addISROut(int channel, int ier, void (*handler)()); FUNCTION DESCRIPTION Adds an interrupt handler for the interrupts specified in the ier parameter for the given RIO block hosting the given digital output pin. The interrupt service routine (ISR) is always disabled when created. Call enableISR() to enable the ISR. The ISR handler given is responsible for clearing the interrupt(s) within the hosting RIO block.
setIER int setIER(int isr_handle, int ier); FUNCTION DESCRIPTION Sets the Interrupt Enable Register (IER) mask for an interrupt handler. Note that the interrupt handler must be currently disabled to set the IER value. Disabling the ISR can be done by calling enableISR() with a zero for the enable parameter.
enableISR int enableISR(int isr_handle, int enable) FUNCTION DESCRIPTION Enables or disables an interrupt handler. PARAMETERS isr_handle index to the desired ISR enable non-zero enables the ISR, zero disables the ISR RETURN VALUE 0 — success. -EINVAL— invalid parameter given. SEE ALSO addISRIn, addISROut, setIER, tickISR tickISR void tickISR(void) FUNCTION DESCRIPTION Polls the RIO chip(s) for ISR events if interrupts are not being used.
4.4.4 Serial Communication Library files included with Dynamic C provide a full range of serial communications support. The RS232.LIB library provides a set of circular-buffer-based serial functions. The PACKET.LIB library provides packet-based serial functions where packets can be delimited by the 9th bit, by transmission gaps, or with user-defined special characters.
4.4.5 A/D Converter Inputs anaInConfig void anaInConfig(int channel, int opmode); FUNCTION DESCRIPTION Configures an A/D converter input channel for a given mode of operation. This function must be called before accessing the A/D converter chip. The channel pairs for the differential mode are listed below.
anaInCalib int anaInCalib(int channel, int opmode, int gaincode, int value1, float volts1, int value2, float volts2); FUNCTION DESCRIPTION Calibrates the response of a given A/D converter channel as a linear function using the two conversion points provided. Gain and offset constants are calculated and placed into the user block in the flash memory. NOTE: The 10 and 90% points of the maximum voltage range are recommended when calibrating a channel.
anaInCalib (continued) the gain code of 0 to 7 (use the gain code macro mAMP_GAINCODE for 4–20 mA operation) gaincode Voltage Range Gain Code Macro Single-Ended Unipolar Differential Bipolar 0 GAIN_X1 0–20 V ±20 V 1 GAIN_X2 0–10 V ±10 V 2 GAIN_X4 0–5 V ±5 V 3 GAIN_X5 0–4 V ±4 V 4 GAIN_X8 0–2.5 V ±2.5 V 5 GAIN_X10 0–2 V ±2 V 6 GAIN_X16 0–1.25 V ±1.
anaIn int anaIn(int channel, int gaincode); FUNCTION DESCRIPTION Reads the state of an A/D converter input channel.
anaIn (continued) RETURN VALUE A value corresponding to the voltage on the analog input channel: 0–2047 for 11-bit A/D conversions, or a value of BL_ERRCODESTART or less to indicate an error condition: A/D converter operation errors (will not create run-time error): BL_TIMEOUT BL_OVERFLOW BL_WRONG_MODE System errors (can create run-time error unless disabled): -ERR_ANA_CALIB — fault detected in reading calibration factor -ERR_ANA_INVAL — invalid parameter value.
anaInVolts float anaInVolts(int channel, int gaincode); FUNCTION DESCRIPTION Reads the state of a single-ended A/D converter input channel and uses the previously set calibration constants to convert it to volts. The voltage ranges given in the table below are nominal ranges that will be returned. However, values outside these ranges can often be seen before the return of a BL_OVERFLOW error.
anaInVolts (continued) RETURN VALUE A voltage on the analog input channel, or a value of BL_ERRCODESTART or less to indicate an error condition: A/D converter operation errors (will not create run-time error): BL_NOT_CAL — A/D converter is not calibrated for this channel/gain. BL_OVERFLOW — A/D converter overflow. BL_TIMEOUT — A/D converter timeout. BL_WRONG_MODE — A/D converter is in wrong mode (run anaInConfig()).
anaInDiff float anaInDiff(int channel, int gaincode); FUNCTION DESCRIPTION Reads the state of a differential A/D converter input channel and uses the previously set calibration constants to convert it to volts. Voltage ranges given in the table below are the nominal ranges that will be returned. However, values outside these ranges can often be seen before the return of a BL_OVERFLOW error.
anaInDiff (continued) RETURN VALUE A voltage on the analog input channel, or a value of BL_ERRCODESTART or less to indicate an error condition: A/D converter operation errors (will not create run-time error): BL_NOT_CAL — A/D converter is not calibrated for this channel/gain. BL_OVERFLOW — A/D converter overflow. BL_TIMEOUT — A/D converter timeout. BL_WRONG_MODE — A/D converter is in wrong mode (run anaInConfig()).
anaInmAmps float anaInmAmps(int channel); FUNCTION DESCRIPTION Reads the state of a single-ended A/D converter input channel and uses the previously set calibration constants to convert it to a floating-point current value in milli amps. The nominal range is 0 mA to 20 mA, although it is possible to receive values outside this range before a BL_OVERFLOW error is returned.
anaInRdCalib anaInRdCalib(int channel, int opmode, int gaincode, calib_t *pcal_data) FUNCTION DESCRIPTION Reads the calibration constants, gain and offset, from the user block on the flask.
anaInRdCalib (continued) RETURN VALUE 0 — success. -1 — invalid address or range.
anaInDriver int anaInDriver(char cmd); FUNCTION DESCRIPTION Low-level driver to read the ADS7870 A/D converter chip. Reads the voltage of an analog input channel by serial clocking an 8-bit command to the ADS7870 by its Direct Mode method. anaInConfig() uses the Register Mode method. This function call assumes that Mode2 (least significant byte first) and the A/D converter oscillator have been enabled. See anaInConfig() for additional setup information.
anaInDriver (continued) channel_code Differential Input Lines channel_code Single-Ended Input Lines mA Input Lines 0 +AIN0 -AIN1 8 +AIN0 +AIN0 1 +AIN2 -AIN3 9 +AIN1 +AIN1 2 +AIN4 -AIN5 10 +AIN2 +AIN2 3 +AIN6 -AIN7 11 +AIN3 +AIN3 4 Reserved 12 +AIN4 Reserved 5 Reserved 13 +AIN5 Reserved 6 Reserved 14 +AIN6 Reserved 7 Reserved 15 +AIN7 Reserved RETURN VALUE A value corresponding to the voltage on the analog input channel, which will be either in the range [-2048,
4.4.6 SRAM Use The BL4S100 has a battery-backed data SRAM and a program-execution SRAM. Dynamic C provides the protected keyword to identify variables that are to be placed into the battery-backed SRAM. The compiler generates code that maintains two copies of each protected variable in the battery-backed SRAM. The compiler also generates a flag to indicate which copy of the protected variable is valid at the current time. This flag is also stored in the battery-backed SRAM.
5. USING THE ETHERNET TCP/IP FEATURES Chapter 5 discusses using the Ethernet TCP/IP features on the BL4S100 boards. 5.1 TCP/IP Connections Before proceeding you will need to have the following items. • If you don’t have Ethernet access, you will need at least a 10Base-T Ethernet card (available from your favorite computer supplier) installed in a PC. • Two RJ-45 straight-through CAT 5/6 Ethernet cables and a hub, or an RJ-45 crossover CAT 5/6 Ethernet cable.
BL4S100 Board BL4S100 Board CAT 5/6 Ethernet cables User’s PC Crossover CAT 5/6 Ethernet cable Hub Direct Connection (network of 2 computers) To additional network elements Direct Connection Using a Hub Figure 17. Ethernet Connections The PC running Dynamic C through the serial programming port on the BL4S100 does not need to be the PC with the Ethernet card. 3. Apply Power Plug in the AC adapter. The BL4S100 is now ready to be used.
5.2 TCP/IP Sample Programs We have provided a number of sample programs demonstrating various uses of TCP/IP for networking embedded systems. These programs require that you connect your PC and the BL4S100 together on the same network. This network can be a local private network (preferred for initial experimentation and debugging), or a connection via the Internet. 5.2.1 How to Set IP Addresses in the Sample Programs With the introduction of Dynamic C 7.
5.2.2 How to Set Up your Computer for Direct Connect Follow these instructions to set up your PC or notebook. Check with your administrator if you are unable to change the settings as described here since you may need administrator privileges. The instructions are specifically for Windows 2000, but the interface is similar for other versions of Windows. TIP: If you are using a PC that is already on a network, you will disconnect the PC from that network to run these sample programs.
5.2.3 Run the PINGME.C Demo Connect the crossover cable from your computer’s Ethernet port to the BL4S100’s RJ-45 Ethernet connector. Open this sample program from the SAMPLES\TCPIP\ICMP folder, compile the program, and start it running under Dynamic C. When the program starts running, the green LNK light on the BL4S100 should be on to indicate an Ethernet connection is made.
5.2.4 Running More Demo Programs With a Direct Connection The following sample programs are found in the SAMPLES\BL4S1xx\TCPIP folder. Figure 18 shows the signal connections for the sample programs that illustrate the use of TCP/IP.
• RWEB_IO_SAMPLE.C—Demonstrates using RabbitWeb to display the status of multiple I/O lines (analog and digital) in a Web browser, and allows the user to change the digital outputs by clicking the buttons on the page. The sample program uses an IFRAME (invisible frame) to refresh the I/O readings every two seconds. Since the Web browser does not have to re-render the entire page, updates are quick and flicker free. Once the sample program is compiled and running, open your PC Web browser.
5.3 Where Do I Go From Here? NOTE: If you purchased your BL4S100 through a distributor or Rabbit partner, contact the distributor or partner first for technical support. If there are any problems at this point: • Use the Dynamic C Help menu to get further assistance with Dynamic C. • Check the Rabbit Technical Bulletin Board and forums at www.rabbit.com/support/bb/ and at www.rabbit.com/forums/. • Use the Technical Support e-mail form at www.rabbit.com/support/questionSubmit.shtml.
6. USING THE ZIGBEE FEATURES Chapter 6 discusses using the ZigBee features on the BL4S100 and the BL4S150 models. This networking feature is not available on other BL4S100 models. 6.1 Introduction to the ZigBee Protocol The ZigBee PRO specification was ratified in April, 2007, and covers high-level communication protocols for small, low-power digital modems based on the IEEE 802.15.4 standard for wireless personal area networks (WPANs).
The XBee RF module used by the BL4S100 and the BL4S150 presently supports using them in a mesh network. BL4S100 and the BL4S150 boards are preconfigured with ZB router firmware; coordinator and end-device firmware are included in the Dynamic C installation along with a sample program to allow you to download the firmware. The firmware used with the XBee RF modules on the BL4S100 and the BL4S150 is based on the API command set. Figure 19.
6.2.1 Setting Up the Digi XBee USB Coordinator 1. Connect the Digi® XBee USB acting as a ZigBee coordinator to an available USB port on your PC or workstation. Your PC should recognize the new USB hardware. 2. Connect the Demonstration Board to the BL4S100 as shown below.
5. Confirm the following hardware setup is displayed on the “PC Settings” tab. • 115200 baud • Hardware flow control • 8 data bits • No parity • 1 stop bit Now select the COM port the Digi® XBee USB is connected to, and click the “Open Com Port” button. The message “Radio Found” is displayed to indicate that you selected the correct COM port. The ZigBee parameters (firmware version, operating channel, PAN ID) for the Digi® XBee USB will be displayed in the “Radio Parameters” box.
7. Select a device with your mouse pointer and click on the selected device to select that device. This device will now be displayed in the “Selected Device” area. 8. You are now ready to interface with the BL4S100/BL4S150 via the ZigBee protocol. Try pinging the selected device by clicking the “Send Ping” button. 6.2.2 Setting up Sample Programs The sample programs are set up so that the BL4S100/Bl4S150 you are using is a ZigBee router, coordinator, or end device.
Channel mask — defaults to 0x1FFE, i.e., all 16 possible channels via the macro in the Dynamic C LIB\Rabbit4000\XBee\XBee_Firmware\XBEE_API.LIB library. If you want to limit the channels used, all devices on your network should use the same channel mask. #define DEFAULT_CHANNELS XBEE_DEFAULT_CHANNELS Extended PAN ID — the 64-bit network ID. Defaults to DEFAULT_PANID if set in the Dynamic C LIB\Rabbit4000\XBee\XBEE_API.
The XBee sample programs in the Dynamic C SAMPLES\BL4S1xx\XBee folder illustrate the use of the XBee function calls. • SLEEP.C—This sample program demonstrates having the XBee RF module wake the Rabbit up upon receipt of a packet. It also demonstrates conditional use of TCP/IP networking in low-power modes. The sample program illustrates how to respond to TCP/IP ping packets and also demonstrates pinging a remote host. It prints a message in the Dynamic C STDIO window when the ping response arrives here.
Once the sample program is compiled and running, open your PC Web browser. As long as you have not modified the TCPCONFIG 1 macro in the sample program, enter the following server address in your Web browser to bring up the Web page served by the sample program. http://10.10.6.100 The Web browser will display the network and the individual boards on the network. You can use the Web browser to control the boards.
6.3 Dynamic C Function Calls Function calls for use with the XBee RF modules are in the Dynamic C LIB\Rabbit4000\ XBee\XBEE_API.LIB library. These ZigBee specific function calls are described in An Introduction to ZigBee, which is included in the online documentation set. 6.4 Where Do I Go From Here? NOTE: If you purchased your BL4S100/BL4S150 through a distributor or through a Rabbit partner, contact the distributor or partner first for technical support.
APPENDIX A. SPECIFICATIONS Appendix A provides the specifications for the BL4S100.
A.1 Electrical and Mechanical Specifications Figure A-1 shows the mechanical dimensions for the BL4S100. 0.125 dia × 4 (3.2) RX TX/1W CTS RTS +5 V +K1 OUT2 OUT1 OUT0 IN3 GND OUT7 OUT6 OUT5 OUT4 OUT3 IN2 IN1 IN0 +K GND RP5 RP6 2 J15 1 J6 R33 U12 3.
Table A-1 lists the electrical, mechanical, and environmental specifications for the BL4S100. Table A-1. BL4S100 Specifications Feature BL4S100 BL4S110 Ethernet Interface Serial Flash Memory (program) Program Execution SRAM Data SRAM Backup Battery Digital Inputs Digital Outputs Analog Inputs Serial Ports BL4S160 Rabbit 4000® at 40.00 MHz Microprocessor ZigBee Interface BL4S150 10Base-T ZigBee PRO (802.15.4) ZigBee PRO (802.15.
Table A-1. BL4S100 Specifications (continued) Feature BL4S100 BL4S110 BL4S150 Humidity 5–95%, noncondensing Board Size 3.75" × 5.75" × 0.64" (96 mm × 146 mm × 16 mm) BL4S160 ZigBee RF Module RF Module Digi XBee® Series 2 Compliance ZigBee PRO (802.15.4) A.1.1 Exclusion Zone It is recommended that you allow for an “exclusion zone” of 0.25" (6 mm) around the BL4S100 in all directions when the BL4S100 is incorporated into an assembly that includes other components.
A.2 Jumper Configurations Figure A-3 shows the header locations used to configure the various BL4S100 options via jumpers. J6 Series 2 XBee JP1 Battery J10 J11 J13 Figure A-3. Location of BL4S100 Configurable Positions Table A-2 lists the configuration options. Table A-2.
Table A-2.
A.3 Use of Rabbit Microprocessor Parallel Ports Table A-3 lists the Rabbit microprocessor parallel ports and their use in the BL4S100 boards. Table A-3.
Table A-3.
APPENDIX B. POWER SUPPLY Appendix B describes the power circuitry provided on the BL4S100. B.1 Power Supplies Power is supplied to the BL4S100 boards via the Micro-Fit® connector at J17. The BL4S100 is protected against reverse polarity by a diode at D27 as shown in Figure B-1. SWITCHING POWER REGULATOR RAW POWER IN J17 1 3 D27 B240 1 U17 C93 47 µF LINEAR POWER REGULATOR +3.
B.2 Batteries and External Battery Connections The SRAM and the real-time clock on the BL4S100 modules have battery backup. Power to the SRAM and the real-time clock (VRAM) is provided by two different sources, depending on whether the main part of the BL4S100 is powered or not. When the BL4S100 is powered normally, and the +3.3 V supply is within operating limits, the SRAM and the real-time clock are powered from the +3.3 V supply. If power to the board is lost or falls below 2.
APPENDIX C. DEMONSTRATION BOARD Appendix C explains how to use the Demonstration Board with the BL4S100 sample programs.
C.1 Connecting Demonstration Board Before running sample programs based on the Demonstration Board, you will have to connect the Demonstration Board from the BL4S100 Tool Kit to the BL4S100 board. Proceed as follows. 1. Use wires to connect screw-terminal header J3 on the Demonstration Board to header J4 on the BL4S100. The connections are shown in Figure C-1, with the green wire to GND and the blue wire to +V. 2.
C.2 Demonstration Board Features The Demonstration Board can be used to illustrate I/O activity via LEDs and pushbutton switches. C.2.1 Pinout J3 GND LED1 LED2 LED3 LED4 +V J1 POWER +V_ALT SW4 SW3 SW2 SW1 GND INPUTS OUTPUTS Figure C-2 shows the pinouts for the input signals on screw-terminal header J1 and the outputs on screw-terminal header J3. Figure C-2. Demonstration Board Pinout C.2.
The four LED output indicators can be configured as sinking outputs or as sourcing outputs via jumpers on headers JP1–JP4 as shown in Figure C-4. +K Sinking/ Sourcing Hookups (in sinking mode) (in sourcing mode) Figure C-4. LED Output Indicators Sinking or Sourcing Configuration NOTE: Disconnect power before changing any jumper settings. The power supply voltage input at +V on screw-terminal header J3 is available as +V_ALT on screw-terminal header J1.
APPENDIX D. RABBIT RIO RESOURCE ALLOCATION Appendix D provides the pin and block associations on the Rabbit RIO chip with their corresponding I/O on the BL4S100 boards. The main shared resource within the RIO chips are the counter/timer blocks — the RIO chip has eight counter/timer blocks. A given block is defined by the block number. The tables in this appendix provide a quick reference of which block is used by each input and/or output pin on the BL4S100 board.
D.1 Digital I/O Pin Associations Table D-1.
D.2 Interpreting Error Codes Some BL4S100 function calls may return a Mode Conflict error code. This error code is a 4-bit value that identifies other pins using the same counter/timer block on a RIO chip that require this block to be in a mode that conflicts with the functionality that has already been requested — the additional functionality requested cannot be supported.
Table D-2 shows all counter/timer modes of the RIO block and which functions can use the given modes. The use of synch signals is allowed with all the functions, but does affect the timer/counter so it may have an adverse affect on functions marked with * or #. Table D-2.
APPENDIX E. PLASTIC ENCLOSURE The plastic enclosure provides a secure way to protect your BL4S100. The enclosure itself may be mounted on any flat surface. The complete plastic enclosure consists of a base and a cover. The base alone is a convenient surface on which to mount the BL4S100, and also provides a means to mount the BL4S100 on any flat surface. The base and cover are sold together.
E.1 Assembly Instructions 1. Attach the BL4S100 board to the plastic enclosure base. Position the BL4S100 board over the plastic enclosure base as shown below in Figure E-1. Attach the BL4S100 to the base using the four 4-40 × ¼ screws supplied with the enclosure base.
3. Attach the enclosure cover to the base. Position the cover over the plastic enclosure base as shown below in Figure E-2. Attach the cover to the base using the four 4-40 × ½ screws supplied.
E.2 Dimensions Figure E-3 shows the dimensions for the plastic enclosure. 0.736 (18.5) 7.140 (181) 0.754 2.0 (5 05 1) 4.0 (1 10 02 ) (19.5) 6.016 (153) Figure E-3. Plastic Enclosure Dimensions When fully assembled, the total height of the plastic enclosure will be 1.5" (38 mm). NOTE: All measurements are in inches followed by millimeters enclosed in parentheses. All dimensions have a manufacturing tolerance of ±0.01" (0.25 mm).
APPENDIX F. ADDITIONAL CONFIGURATION INSTRUCTIONS Appendix F provides information on how to find the latest firmware for the XBee RF module and the Digi® XBee USB used as the ZigBee coordinator, and how to install the firmware. F.1 XBee Module Firmware Downloads By default, the BL4S100/BL4S150 is shipped from the factory with firmware to operate as a router in a mesh network. You will need to run the MODEMFWLOAD.
Make the following modifications to the MODEMFWLOAD.C sample program.before you run it according to whether you will be using the BL4S100/BL4S150 as a coordinator, a router, or an end device. • Select the XBee role macro according to whether the BL4S100/BL4S150 is being used as a coordinator, a router or an end-device. #define XBEE_ROLE NODE_TYPE_COORD #define XBEE_ROLE NODE_TYPE_ROUTER #define XBEE_ROLE NODE_TYPE_ENDDEV • Some Rabbit boards use the ZNet 2.5 protocol.
Continue the following steps with the Digi® XBee USB connected to your PC’s USB port. Since the ZigBee Utility XBEE_GPIO_GUI.exe will conflict with X-CTU, first close the ZigBee Utility if it is running. 1. Start X-CTU from the desktop icon and set the “PC Settings” tab to 115200 baud, HARDWARE flow control, 8 data bits, parity NONE, 1 stop bit. 2. On the “PC Settings” tab, check the “Enable API” box under “Host Setup.” 3.
PRO™ RF modules are presently not compatible with the XBee Series 2 module used with the BL4S100/BL4S150, but the general documentation about ZigBee and the use of AT commands for the XBee™ and the XBee PRO™ RF modules is relevant.
F.2.2 Update Digi® XBee USB Firmware The firmware version used by the Digi® XBee USB must correspond to the firmware version installed on the BL4S100/BL4S150. If you have updated the BL4S100/BL4S150 firmware (or you have a need to re-install the firmware on the Digi® XBee USB), the corresponding firmware for the Digi® XBee USB is in the Dynamic C Utilities\X-CTU\ MODEMFW folder. • Remember to record the extended PAN ID, NI, and other parameters you are using. • Firmware of the type XB24-ZB_21….
INDEX A A/D converter ....................... 27 buffered inputs .................. 27 calibration ......................... 29 calibration constants ......... 28 function calls anaIn() ........................... 83 anaInCalib() .................. 81 anaInConfig() ................ 80 anaInDiff() .................... 87 anaInDriver() ................. 92 anaInmAmps() .............. 89 anaInRdCalib() .............. 90 anaInVolts() ..................
firmware download Digi® XBee USB ........... 138 firmware updates ......... 138 XBee module .................. 134 coordinator vs. end device/ router ........................ 135 firmware updates . 134, 138 flash memory addresses user blocks ........................ 32 BL4S100 BL4S110 BL4S150 BL4S160 ............................. 5 ............................. 5 ............................. 5 ............................. 5 O options ....................................
108, 134, 136 AT_RUNONCE.C ...... 108 MODEMFWLOAD.C 134, 135 SLEEP.C ..................... 109 XBEE_GPIO_SERVER.C 105, 109 XBEE_WEB_GATEWAY.C ..................... 109 ZigBee ............................... 46 ZigBee setup ................... 104 serial communication ............ 25 function calls serMode() ...................... 79 programming port ............. 25 RS-232 description ........... 25 serial ports Ethernet port ..................... 26 setup ......................................
SCHEMATICS 090-0265 BL4S100 Schematic www.rabbit.com/documentation/schemat/090-0265.pdf 090-0252 USB Programming Cable Schematic www.rabbit.com/documentation/schemat/090-0252.pdf 090-0272 Rabbit Demonstration Board www.rabbit.com/documentation/schemat/090-0272.pdf You may use the URL information provided above to access the latest schematics directly.