20-101-1258 Rabbit Semiconductor, 20-101-1258 Datasheet

COMPUTER SINGLE-BOARD BL4S160

20-101-1258

Manufacturer Part Number
20-101-1258
Description
COMPUTER SINGLE-BOARD BL4S160
Manufacturer
Rabbit Semiconductor
Datasheet

Specifications of 20-101-1258

Module/board Type
Single Board Computer Module
Product
Modules
Processor Type
Rabbit 4000
Sram
1 MB
Flash
2 MB
Timers
8 bit, 10 bit
Number Of I/os
20
Backup Battery
3 V Lithium Coin Type
Operating Voltage
9 V to 36 V
Board Size
96 mm x 146 mm x 16 mm
Description/function
Computer Module
For Use With/related Products
BL4S160
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
316-1171
BL4S100
C-Programmable Single-Board Computer with Networking
User’s Manual
019–0172_C

Related parts for 20-101-1258

20-101-1258 Summary of contents

Page 1

... BL4S100 C-Programmable Single-Board Computer with Networking User’s Manual 019–0172_C ...

Page 2

... 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. Rabbit, RabbitCore, and Dynamic C are registered trademarks of Digi International Inc. ...

Page 3

... A/D Converter Calibration..........................................................................................................29 3.5 USB Programming Cable ...................................................................................................................30 3.5.1 Changing Between Program Mode and Run Mode ....................................................................30 3.6 Other Hardware...................................................................................................................................31 3.6.1 Clock Doubler .............................................................................................................................31 3.6.2 Spectrum Spreader ......................................................................................................................31 3.7 Memory...............................................................................................................................................32 3.7.1 SRAM .........................................................................................................................................32 3.7.2 Flash Memory .............................................................................................................................32 3.7.3 VBAT RAM Memory .................................................................................................................32 BL4S100 User’s Manual T C ABLE OF ONTENTS ...

Page 4

... A.1.2 Headers.....................................................................................................................................115 A.2 Jumper Configurations.....................................................................................................................116 A.3 Use of Rabbit Microprocessor Parallel Ports...................................................................................118 Appendix B. Power Supply 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 C.1 Connecting Demonstration Board....................................................................................................123 C ...

Page 5

... F.1 XBee Module Firmware Downloads ................................................................................................134 F.1.1 Dynamic C v. 10.44 and Later ..................................................................................................134 ® F.2 Digi XBee USB Configuration ......................................................................................................135 F.2.1 Additional Reference Information ............................................................................................136 ® F.2.2 Update Digi XBee USB Firmware .........................................................................................138 Index Schematics BL4S100 User’s Manual 130 134 139 142 3 ...

Page 6

... SRAM (battery-backed), 512KB/1MB fast SRAM, and 1MB/2MB flash memory options. • 20 digital I/O: 12 protected digital inputs, and 8 sinking digital outputs. • Advanced input capabilities including event counting, event capture, and quadrature decoders that may be set up on all the digital input pins. ...

Page 7

... NOTE: BL4S100 Series single-board computers cannot be programmed via the RabbitLink. Appendix A provides detailed specifications. Visit the Web site for up-to-date information about additional add-ons and features as they become available. The Web site also has the latest revision of this user’s manual. BL4S100 User’s Manual Table 1. BL4S100 Models BL4S100 BL4S110 ® ...

Page 8

... 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 DC (includes Canada/Japan/U.S., Australia/N.Z., U.K., and European style plugs). ...

Page 9

... Software The BL4S100 is programmed using version 10.44 or later of Rabbit’s Dynamic C. patible version is included on the Tool Kit CD-ROM. 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 ...

Page 10

... These limits apply over the range of 30–230 MHz. The limits are 7 dB higher for frequen- cies above 230 MHz. Although the test range goes to 1 GHz, the emissions from Rabbit- based systems at frequencies above 300 MHz are generally well below background noise levels ...

Page 11

... 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 the customer’s responsibility to provide a CE-compliant power supply for the end-product application. ...

Page 12

... Chapter 2 explains how to connect the programming cable and power supply to the BL4S100. BL4S100 User’s Manual ETTING TARTED 10 ...

Page 13

... Figure 2. Programming Cable Connections Your PC should recognize the new USB hardware, and the LEDs in the shrink-wrapped area of the USB programming cable will flash — if you get an error message, you will have to install USB drivers. Drivers for Windows XP are available in the Dynamic C Drivers\Rabbit USB Programming Cable\WinXP_2K to install the USB drivers ...

Page 14

... 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 ...

Page 15

... Installing Dynamic C If you have not yet installed Dynamic C version 10.44 (or a later version 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 or Windows Disk Explorer to launch The installation program will guide you through the installation process ...

Page 16

... PC and will display a small square bouncing around in a box. This program shows that the CPU is working. The sample program described in Section 5.2.3, “Run the PINGME.C Demo,” tests the TCP/IP portion of the board. 2.4.1 Troubleshooting If you receive the message ...

Page 17

... MENU Appendix F provides additional configuration information if you experience conflicts while doing development simultaneously with more than one ZigBee coordinator you wish to upload new firmware. BL4S100 User’s Manual (BL4S100/BL4S150 only) ® XBee USB is used as the ZigBee coordinator. , which is in the Dynamic C ...

Page 18

... Chapter 3, “Subsystems,” provides a description of the BL4S100’s features, Chapter 4, “Software,” describes the Dynamic C software libraries and introduces some sample programs, and Chapter 5, “Using the Ethernet TCP/IP Features,” explains the TCP/IP fea- tures. BL4S100 User’s Manual www ...

Page 19

... 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. Figure 4. BL4S100 Subsystems BL4S100 User’s Manual 3. S UBSYSTEMS 17 ...

Page 20

... Standard BL4S100 models are equipped with an RJ-45 Ethernet jack, four 1 × 9 screw- terminal headers and one 1 × 6 screw-terminal header for the I/O and RS-232 signals. The polarized 2 × 2 Micro-Fit ® connector at J17 is for the power supply connection. BL4S100 User’s Manual Figure 5. BL4S100 Pinouts 18 ...

Page 21

... Digital Inputs The BL4S100 has 12 digital inputs, IN0–IN11, each of which is protected over a range of – +36 V. The inputs are factory-configured to be pulled but they can also be pulled pulled down 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. Figure 6. BL4S100 Digital Inputs IN0– ...

Page 22

... V. NOTE: If the inputs are pulled up to +K, the voltage range over which the digital inputs are protected changes to +K – +36 V. CAUTION: Do not allow the voltage on a digital input pin to exceed ± avoid damaging the input. Individual digital input channels may be also used for counters, synching, interrupts, input capture quadrature decoder inputs ...

Page 23

... 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 ...

Page 24

... 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. Figure 8. BL4S100 Digital Outputs OUT0–OUT3 are powered by +K1, and OUT4–OUT7 are powered by +K2. +K1 and +K2 can each ...

Page 25

... Keep the following guidelines in mind when selecting special uses for the digital output pins. • When using digital output pins for PWM/PPM outputs, the output pins can only share the same RIO block if they are using the same period or frequency. The and the PWM ...

Page 26

... PPM out- puts are aligned as long as the all the PPM outputs are on the same block of a particu- lar Rabbit RIO chip PWM and PPM outputs on the BL4S100 are configured using the function calls. setPPM() BL4S100 User’s Manual and setPWM() 24 ...

Page 27

... RS-232 circuit so that a +3.3 V output becomes approximately -10 V and out- put as +10 V. The RS-232 transceiver also provides the proper line loading for reliable communication. RS-232 can be used effectively at the BL4S100’s maximum baud rate for distances 3.3.2 Programming Port The BL4S100 has a 10-pin programming header. The programming port uses the Rabbit 4000 Serial Port A for communication, and is used for the following operations. • ...

Page 28

... Ethernet Port Figure 10 shows the pinout for the Ethernet port (J4). Note that there are two standards for numbering the pins on this connector—the convention used here, and numbering in reverse to that shown. Regardless of the numbering convention followed, the pin positions relative to the spring tab position (located at the bottom of the RJ-45 jack in Figure 10) are always absolute, and the RJ-45 connector will work properly with off-the-shelf Ethernet cables ...

Page 29

... The A/D converter chip can only accept positive voltages. By pairing the analog inputs, differential bipolar measurements are possible, and can be configured for each channel pair with the parameter in the opmode voltage ranges are listed in Table 6. BL4S100 User’s Manual software function call. The available ...

Page 30

... In the differential mode, each individual channel is limited to half the total voltage—for example, the range for a gain code ±20 V, but each channel is limited to 0–20 V. Note that while the differential bipolar mode can return a negative value, this negative value can only indicate negative with respect to the two differential voltages since the A/D converter cannot handle a voltage below -0.2 V. When using channels AIN0– ...

Page 31

... Mode Single-Ended, unipolar Differential, bipolar 4–20 mA These sample programs are found in the Section 4.2.3 for more information on these sample programs and how to use them. BL4S100 User’s Manual USERBLOCK_READ_WRITE.C Other factors affecting the calibration must Read ADC_RD_SE_UNIPOLAR.C ADC_CAL_SE_UNIPOLAR.C ADC_RD_DIFF.C ADC_CAL_DIFF.C ADC_RD_MA ...

Page 32

... Rabbit 4000 powers up in the clocked serial bootstrap mode to load the program from the serial flash when the BL4S100 is operating in the Run Mode. Figure 13. BL4S100 Program Mode and Run Mode Setup A program “runs” in either mode, but can only be downloaded and debugged when the BL4S100 is in the Program Mode. Refer to the Rabbit 4000 Microprocessor User’ ...

Page 33

... The spectrum spreader will be set according to the macro OK to save value whenever a program is compiled using this project file. NOTE: Refer to the Rabbit 4000 Microprocessor User’s Manual for more information on the spectrum-spreading settings and the maximum clock speed. BL4S100 User’s Manual Options > ...

Page 34

... 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 and are provided for this ...

Page 35

... Dynamic C development environment. Debugging occurs while the application runs on the target. Alternatively, users can compile a program to an image file for later loading. Dynamic C runs on PCs under Windows NT and later— see Rabbit’s Technical Note TN257, Running Dynamic C additional information if you are using a Dynamic C under Windows Vista ...

Page 36

... Standard debugging features:  Breakpoints—Set breakpoints that can disable interrupts.  Single-stepping—Step into or over functions at a source or machine code level, µC/OS-II aware.  Code disassembly—The disassembly window displays addresses, opcodes, mnemonics, and machine cycle times. Switch between debugging at machine-code level and source-code level by simply opening or closing the disassembly window.  ...

Page 37

... In addition to the Web-based technical support included at no extra charge, a one-year telephone-based technical support subscription is also available for purchase. Visit our Web site at www.rabbit.com BL4S100 User’s Manual for the latest patches, workarounds, and for further information and complete documentation. 35 ...

Page 38

... The BL4S100 must be in Program mode (see Section 3.5, F9 “USB Programming Cable,”) and must be connected using the programming cable as described in Section 2.1, “BL4S100 Connections.” See Appendix C for information on the power-supply connections to the Demonstration Board. Complete information on Dynamic C is provided in the Dynamic C User’s Manual. ...

Page 39

... Figure 14 shows the signal connections for the sample programs that illustrate the use of the digital inputs. Figure 14. Digital Inputs Signal Connections —Demonstrates the use of the digital inputs. Using the Demonstration Board, • DIGIN.C you can see an input channel toggle from HIGH to LOW in the Dynamic C window when you press a pushbutton on the Demonstration Board. — ...

Page 40

... Figure 15 shows the signal connections for the sample programs that illustrate the use of the digital outputs. Figure 15. Digital Outputs Signal Connections —Demonstrates the use of the sinking digital outputs. Using the Demonstra- • DIGOUT.C tion Board, you can see an LED toggle on/off via a sinking output that you selected via ...

Page 41

... PPM channels on the digital output pins • PPM.C on headers J3 and J4. The PPM signals are set for a frequency of 200 Hz, with the duty cycle adjustable from 0 to 100% and an offset adjustable from 0 to 100% by the user. These pins can be connected to an oscilloscope to view the waveform being generated. ...

Page 42

... PWM channels on digital output pins • PWM.C OUT0–OUT7. The PWM signals are set for a frequency of 200 Hz with the duty cycle adjustable from 0 to 100% by the user. These pins can be connected to an oscilloscope to view the waveform being generated. The overall frequency can be adjusted in the line ...

Page 43

... SW2 on the Demonstration Board to increment the quadrature counter. The counter will continue to increment or decrement as you hold down the corresponding pushbutton. Press button SW3 on the Demonstration Board to reset the quadrature counter. BL4S100 User’s Manual —Demonstrates the use of quadrature decoders on the 41 ...

Page 44

... Quadrature Decoder via the Dynamic C STDIO window and watch the register counts on the low- speed channel and the register rollovers on the high-speed channel. BL4S100 User’s Manual —Demonstrates the use of two PWM and two PPM 42 ...

Page 45

... Serial Communication The following sample programs are found in the —This sample program repeatedly sends byte values 0–127 from Serial Port D • PARITY.C 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 ...

Page 46

... Each character sent will also increment either the successful or the error counter, depending on the parity of both the BL4S100 and the terminal emulation program. —This sample program demonstrates basic initialization for a sim- • COMPUTER3WIRE.C ple three-wire RS-232 connection. Characters typed in either the Dynamic C window serial terminal emulation program are echoed in both displays ...

Page 47

... The current that is being monitored is displayed continuously. Before you compile and run this sample program, jumper pins 1–2 and 5–6 on headers J10 and J11. Then connect a current meter in series with the power supply connected to one of pins AIN0–AIN3 and AGND, then compile and run the sample program, and follow the instructions in the Dynamic C • ...

Page 48

... A/D converter channel using calibration coefficients previously stored in the user block. Before you compile and run this sample program, jumper pins 1–2 and 5–6 on headers J10 and J11. Then connect a current meter in series with the power supply connected to one of pins AIN0–AIN3 and AGND, then compile and run the sample program, and follow the instructions in the Dynamic C the power supply ...

Page 49

... BL4S1xx.LIB —libraries specific to using TCP/IP functions on the BL4S100. Further informa- • TCPIP tion about TCP/IP is provided in Chapter 5, “Using the Ethernet TCP/IP Features.” —libraries specific to using ZigBee functions on the BL4S100. Further infor- • ZigBee mation about ZigBee is provided in Chapter 6, “Using the ZigBee Features.” ...

Page 50

... Board Initialization 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. BL4S100 User’s Manual brdInit ...

Page 51

... RETURN VALUE The logic state of the specified channel. 0 — logic low 1 — logic high — channel value is out of range. -EINVAL :— channel functionality does not permit this operation. -EPERM SEE ALSO brdInit, setDigIn, digInBank BL4S100 User’s Manual setDigIn digIn ...

Page 52

... PARAMETER digital input bank pins: bank RETURN VALUE Data read from the bank of digital inputs. Data Bits LSB MSB — invalid parameter value. -EINVAL SEE ALSO brdInit, digIn, setDigIn BL4S100 User’s Manual digInBank 0 — IN0–IN7 1 — IN8–IN11 Bank 0 ...

Page 53

... 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. Appendix D provides the details of the pin and block associations to allow you to identify the channels that need to be reconfigured to support this function call ...

Page 54

... RETURN VALUE 0 — success. — invalid parameter value. -EINVAL — resource needed by this function is not available. -EACCESS SEE ALSO brdInit, getCounter, resetCounter BL4S100 User’s Manual setDecoder 0 — index on low level non-zero — ...

Page 55

... 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 to read the current count and use PARAMETERS channel to use for the up count input, 0–11 (pins IN0–IN11) channel macro to set the mode of the counter: mode ...

Page 56

... 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. Appendix D provides the details of the pin and block associations to allow you to identify the channels that need to be reconfigured to support this function call ...

Page 57

... channel to read the captured count values and use , then it specifies the end event input., — continuous count mode — start count on begin event, continue to — count until end event detected — count while begin signal is active , then it specifies the end event: — ...

Page 58

... 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. Appendix D provides the details of the pin and block associations to allow you to identify the channels that need to be reconfigured to support this function call ...

Page 59

... IN0–IN11) pointer to word variable to place begin register reading begin RETURN VALUE 0 — success. — invalid parameter value. -EINVAL — pin type does not permit this function. -EPERM SEE ALSO brdInit, setCapture, resetCounter, getEnd BL4S100 User’s Manual getCounter getBegin ...

Page 60

... IN0–IN11) RETURN VALUE 0 — success. — invalid parameter value. -EINVAL — pin type does not permit this function. -EPERM SEE ALSO brdInit, getCounter, setDecoder BL4S100 User’s Manual getEnd resetCounter ...

Page 61

... IN0–IN11) new value for the limit register limit RETURN VALUE 0 — success. — invalid parameter value. -EINVAL — pin type does not permit this function. -EPERM SEE ALSO brdInit, setCapture, resetCounter BL4S100 User’s Manual setLimit function call. ...

Page 62

... 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 ...

Page 63

... 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 ...

Page 64

... RETURN VALUE 0 — success. — invalid parameter value. -EINVAL SEE ALSO brdInit, digOut, digOutBank BL4S100 User’s Manual setDigOut state 0 — connects the load to GND 1 — puts the output in a high-impedance state parameter. The digOut 62 ...

Page 65

... RETURN VALUE 0 — success. — invalid parameter value. -EINVAL — pin function was not set digital output -EPERM SEE ALSO brdInit, setDigOut, digOutBank BL4S100 User’s Manual digOut setDigOut() 0 — connects the load to GND 1 — ...

Page 66

... SEE ALSO brdInit, digOut, setDigOut BL4S100 User’s Manual digOutBank function call. setDigOut() 0 — OUT0–OUT7 Data Bits Bank 0 LSB D0 OUT0 D1 OUT1 D2 OUT2 D3 OUT3 D4 OUT4 D5 OUT5 D6 OUT6 MSB D7 OUT7 0 — connects the load to GND 1 — puts the output in a high-impedance state. 64 ...

Page 67

... 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. PARAMETERS digital output channel being set up for PWM, 0–7 (OUT0–OUT7) channel PWM frequency in Hz (should be from kHz); use -1 to frequency preserve the existing frequency on the RIO block PWM duty cycle (should be from 0 to 100%) ...

Page 68

... 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. Appendix D provides the details of the pin and block associations to allow you to identify the channels that need to be reconfigured to support this function call ...

Page 69

... 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. PARAMETERS digital output channel being set up for PWM, 0–7 (OUT0–OUT7) channel PPM frequency in Hz (should be from kHz); use -1 to frequency preserve the existing frequency on the RIO block PPM offset (should be from 0 to 100%) ...

Page 70

... 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. Appendix D provides the details of the pin and block associations to allow you to identify the channels that need to be reconfigured to support this function call ...

Page 71

... PARAMETERS all digital output channels on the same RIO chip and block as this channel channel (0–7, OUT0–OUT7) will have their frequency set. Duty cycle and offset percentages will be maintained. frequency of the PWM and PPM outputs (should be from frequency 50 kHz) ...

Page 72

... 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 digital output channel that is getting its duty cycle set, channel 0– ...

Page 73

... NOTE: A zero offset will produce the smallest offset possible, which is one count. If you must have a zero offset, use RETURN VALUE 0 — success. — invalid parameter value. -EINVAL — channel function does not permit this operation. -EPERM SEE ALSO brdInit, setPWM, setPPM, setFreq, setDuty, setSyncIn, setSyncOut, pulseEnable, pulseDisable BL4S100 User’s Manual ...

Page 74

... PWM/PPM enabled, channel 0–7 (OUT0–OUT7) RETURN VALUE 0 — success. — invalid parameter value. -EINVAL — channel function does not permit this operation. -EPERM SEE ALSO brdInit, setPWM, setPPM, pulseDisable BL4S100 User’s Manual pulseDisable . The pin can be restored to ...

Page 75

... 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 ...

Page 76

... BL_IER_MATCH0 bit set if using Match Register 1 BL_IER_MATCH1 bit set if using Match Register 2 BL_IER_MATCH2 bit set if using Match Register 3 BL_IER_MATCH3 or — invalid channel value. -EINVAL SEE ALSO brdInit, setPWM, setPPM, setCounter BL4S100 User’s Manual getMatch parameter. source will filter only the Trail match register ...

Page 77

... Call routine. The ISR handler function is responsible for clearing the interrupt(s) within the hosting RIO block when called. PARAMETERS digital input channel to bind to ISR, 0–11 (IN0–IN11) channel bit mask of interrupt(s) this handler services ier pointer to the interrupt service function ...

Page 78

... RIO block hosting the given digital output pin. The interrupt service routine (ISR) is al- ways disabled when created. Call given is responsible for clearing the interrupt(s) within the hosting RIO block. PARAMETERS digital output channel to bind to ISR, 0–7 (OUT0–OUT7) channel bit mask of interrupt(s) this handler services: ier ...

Page 79

... RIO Interrupt Enable and Status registers) RETURN VALUE 0 — success — Invalid parameter given. -EINVAL — Handler is enabled, can't change IER. -EPERM SEE ALSO addISRIn, addISROut, enableISR, tickISR BL4S100 User’s Manual setIER with a zero for the parameter ...

Page 80

... ISR, enable zero disables the ISR RETURN VALUE 0 — success. — invalid parameter given. -EINVAL SEE ALSO addISRIn, addISROut, setIER, tickISR void tickISR(void) FUNCTION DESCRIPTION Polls the RIO chip(s) for ISR events if interrupts are not being used. Any enabled ISR events will be passed to the appropriate ISR handler ...

Page 81

... For more information, see the Dynamic C User’s Manual and Technical Note 213, Rabbit Serial Port Software. ...

Page 82

... NOTE: When a pin in a differential pair is reconfigured as a nondifferential pin, the remaining paired pin is also reconfigured. PARAMETERS analog input channel, 0–7 (AIN0–AIN7) channel selects the mode of operation for the A/D converter channel pair. opmode The values are as follows: RETURN VALUE: 0 — ...

Page 83

... 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. PARAMETERS analog input channel number ( corresponding to AIN0–AIN7 channel Single-Ended channel 0 ...

Page 84

... A/D converter value value2 the voltage corresponding to the second A/D converter value volts2 RETURN VALUE 0 — success. — invalid parameter. -EINVAL — error writing calibration constants. -ERR_ANA_CALIB SEE ALSO brdInit, anaInConfig, anaIn, anaInmAmps, anaInDiff, anaInVolts BL4S100 User’s Manual Voltage Range Macro Single-Ended Unipolar 0– ...

Page 85

... FUNCTION DESCRIPTION Reads the state of an A/D converter input channel. PARAMETERS analog input channel number ( corresponding to AIN0–AIN7 channel Single-Ended channel the gain code (use a gain code of 4 for 4–20 mA operation) gaincode Gain Code Macro 0 GAIN_X1 1 GAIN_X2 2 GAIN_X4 3 GAIN_X5 4 GAIN_X8 5 GAIN_X10 ...

Page 86

... BL_ERRCODESTART 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): — fault detected in reading calibration factor -ERR_ANA_CALIB — invalid parameter value. -ERR_ANA_INVAL SEE ALSO brdInit, anaInConfig, anaInCalib, anaInmAmps, anaInDiff, anaInVolts BL4S100 User’ ...

Page 87

... If the gain code for a given channel has changed from the previous cycle, the user block will be read to get the calibration constants for the new gain value. PARAMETERS analog input channel number ( corresponding to AIN0–AIN7 channel the gain code the table below applies for single-ended ...

Page 88

... RETURN VALUE A voltage on the analog input channel value of dicate an error condition: A/D converter operation errors (will not create run-time error): — A/D converter is not calibrated for this channel/gain. BL_NOT_CAL — A/D converter overflow. BL_OVERFLOW — A/D converter timeout. BL_TIMEOUT — ...

Page 89

... BL_OVERFLOW Differential Inputs channel 0 +AIN0 -AIN1 2 +AIN2 -AIN3 4 +AIN4 -AIN5 6 +AIN6 -AIN7 Differential Actual Gain Voltage Range ×1 ± ×2 ± ×4 ± ×5 ± ×8 ± 2.5 V ×10 ± ×16 ± 1.25 V ×20 ± Actual Voltage Range 0–20 V 0– ...

Page 90

... RETURN VALUE A voltage on the analog input channel value of indicate an error condition: A/D converter operation errors (will not create run-time error): — A/D converter is not calibrated for this channel/gain. BL_NOT_CAL — A/D converter overflow. BL_OVERFLOW — A/D converter timeout. BL_TIMEOUT — ...

Page 91

... FUNCTION DESCRIPTION Reads the state of a single-ended A/D converter input channel and uses the previously set calibration constants to convert floating-point current value in milli amps. The nominal range mA, although it is possible to receive values outside this range before a BL_OVERFLOW PARAMETER A/D converter input channel (0– ...

Page 92

... FUNCTION DESCRIPTION Reads the calibration constants, gain and offset, from the user block on the flask. PARAMETER analog input channel number ( corresponding to AIN0–AIN7 channel Single-Ended channel select the mode of operation for the A/D converter channel calibra- opmode tion data being read ...

Page 93

... RETURN VALUE 0 — success. -1 — invalid address or range. -2 — no valid user block found (block version 3 or later) -3 — flash read error — invalid parameter -EINVAL SEE ALSO anaInCalib, _anaInAddr BL4S100 User’s Manual 91 ...

Page 94

... The cmd MSB is set high for direct-mode access. The format is as follows: Use the following calculation and tables to determine BL4S100 User’s Manual anaInDriver uses the Register Mode method. This function call parameter contains a gain code and channel code, and the ...

Page 95

... Reserved 7 Reserved RETURN VALUE A value corresponding to the voltage on the analog input channel, which will be either in the range [-2048,2047 error code of — conversion incomplete, busy bit timeout BL_TIMEOUT — overflow or out of range BL_OVERFLOW System errors (can create run-time error unless disabled): — invalid parameter value ...

Page 96

... This flag is also stored in the battery-backed SRAM. When a protected variable is updated, the “inactive” copy is modified, and is made “active” only when the update is 100% complete. This assures the integrity of the data in case a reset or a power failure occurs during the update process ...

Page 97

... 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 RJ-45 crossover CAT 5/6 Ethernet cable ...

Page 98

... When working with the BL4S100, the green and the board is properly connected either to an Ethernet hub active Ethernet card. The orange light flashes each time a packet is received. ACT BL4S100 User’s Manual Board CAT 5/6 Ethernet cables Hub Direct Connection Using a Hub ...

Page 99

... If you would like to change the default values, for example, to use an IP 10.10.6.1 address of for the BL4S100 board, and 10.1.1.2 the values in the section that directly follows the “General Configuration” comment in the library. You will find this library in the TCP_CONFIG.LIB 3. You can create a CUSTOM_CONFIG ...

Page 100

... TCP/IP Xircom Credit Card Network Adapter Depending on which version of Windows your PC is running, you may have to select the “Local Area Connection” first, and then click on the “Properties” button to bring up the Ethernet interface dialog. Then “Configure” your interface card for a “10Base-T Half-Duplex” ...

Page 101

... 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 compile the program, and start it running under Dynamic C. When the program starts run- ning, the green ...

Page 102

... Figure 18 shows the signal connections for the sample programs that illustrate the use of TCP/IP. Figure 18. TCP/IP Sample Programs Demonstration Board Connections —Demonstrates ICMP by pinging a remote host. The sample program will • PINGLED.C flash LED1 and LED2 on the Demonstration Board when a ping is sent and received. ...

Page 103

... Now use a wire to touch +5 V from header J4 on the BL4S100 to the various digital and analog inputs on header J3, J15, and J16 —Uses the SMTP library to send an e-mail when a pushbutton switch on the • SMTP.C Demonstration Board is pressed. —Allows you to communicate with the BL4S100 using the Telnet protocol. ...

Page 104

... If the sample programs ran fine, you are now ready to go on. Additional sample programs are described in the Dynamic C TCP/IP User’s Manual. Refer to the Dynamic C TCP/IP User’s Manual to develop your own applications. An Introduction to TCP/IP provides background information on TCP/IP, and is available on the Web site ...

Page 105

... As a router. Routers pass data from other devices. • end device. End devices contain just enough functionality to talk to their parent node (either the coordinator or a router), and cannot relay data from other devices. ...

Page 106

... XBee USB used as the ZigBee coordinator must be connected to an avail- able USB port on your PC if you are exercising the ZigBee protocol. Refer to Chapter 2, “Getting Started,” if you need further information on these steps. NOTE: The Digi XBee USB device is an optional accessory and is not a part of the stan- dard BL4S200 Tool Kit. See section F.2 Digi® ...

Page 107

... Utility, install a .Net Framework by double-clicking folder. You may add a shortcut to the ZigBee Utility on your Utilities\dotnetfx desktop. BL4S100 User’s Manual sample program in the Dynamic C folder. XBEE_GPIO_GUI.exe folder — if you have problems launching the ZigBee dotnetfx.exe in the Dynamic C in the Dynamic C 105 ...

Page 108

... 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 Com Port” button. The message “Radio Found” is displayed to indicate that you selected the correct COM port ...

Page 109

... 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. ...

Page 110

... You may type in either “ATxx” or just the “xx” part of the command. • Use just the AT command to read any of the values. • Use [AT]xx yyyy (where the integer bits) to set any of the “set or read” values. (Note that this works for NI, the node identifier, where the data will be a Node ID.string in quotes — ...

Page 111

... XBEE_GPIO_SERVER.C and clusters meant to be run with the Windows GUI client (installed in Dynamic C’s directory) and a Digi USB XBee coordinator or with the GPIO client Utilities sample program ( SAMPLES/XBEE/XBEE_GPIO_CLIENT ...

Page 112

... You can use the Web browser to control the boards. Note that the firmware allows you to set digital outputs on all node types, but analog and digital inputs can only be read on end devices. BL4S100 User’s Manual macro in the sample program, enter TCPCONFIG 1 ...

Page 113

... If the sample programs ran fine, you are now ready to go on. An Introduction to ZigBee provides background information on the ZigBee protocol, and is available on the CD and on our Digi’s XBee™ Series 2 OEM RF Modules provides complete information for the XBee RF module used on the BL4S100/BL4S150, provides background information on the ZigBee PRO protocol, and is available at 90000976_a.pdf. BL4S100 User’ ...

Page 114

... A PPENDIX Appendix A provides the specifications for the BL4S100. BL4S100 User’s Manual A. S PECIFICATIONS 112 ...

Page 115

... A.1 Electrical and Mechanical Specifications Figure A-1 shows the mechanical dimensions for the BL4S100. Figure A-1. BL4S100 Dimensions NOTE: All measurements are in inches followed by millimeters enclosed in parentheses. All dimensions have a manufacturing tolerance of ±0.01" (0.25 mm). BL4S100 User’s Manual 113 ...

Page 116

... Panasonic CR2032 or equivalent 3 V lithium coin type, 235 mA·h standard, socket-mounted 12: protected to ±36 V DC, switching threshold 1.4 V/1.9 V typical 8: sink up to 200 mA each max. Eight 11-bit res. channels, software-selectable ranges unipolar/differential bipolar 2. DC; 4 channels can be hardware-configured for 4–20 mA; ...

Page 117

... RF Module Compliance 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. This “exclusion zone” that you keep free of other components and boards will allow for sufficient air flow, and will help to minimize any electrical or EMI interference between adjacent boards. An “ ...

Page 118

... Serial Communication J6 Configuration Options (not stuffed) BL4S100 User’s Manual Pins Connected None J1 is configured for RS-232 1– configured for RabbitNet 2–3 J1 configured for 1-Wire serial J1 is configured for RS-232 or None RabbitNet 1– configured for alternate 1-Wire 4–6 serial pinout J1 is configured for Digi 1-Wire serial 2– ...

Page 119

... Pins Connected None Voltage Option 1–2 AIN2 4–20 mA option 5–6 AIN3 4–20 mA option None Voltage Option 1–2 AIN0 4–20 mA option 5–6 AIN1 4–20 mA option 1–2 Inputs pulled 4–6 Inputs pulled down to GND 5–6 Inputs pulled Factory Default × × × 117 ...

Page 120

... PE2 Output PE3 Input BL4S100 User’s Manual Signal Rabbit RIO D0–D7 PB0/SCLKB PB1/SCLKA Rabbit RIO PI Rabbit RIO CH0–CHA2 Rabbit RIO /CS Rabbit RIO G//B TXD Serial Port D RXD TXC (A/D converter) Serial Port C RXC (A/D converter) TXB (serial flash) Serial Port B ...

Page 121

... PE4 Output PE5 Output PE6 Output PE7 Output BUFEN Output CLK Output BL4S100 User’s Manual Signal Serial Flash /CS Ethernet LINK XBee /RTS Ethernet ACT /CS (A/D converter) CLK to Rabbit RIO Initial State Inactive high Inactive high (LED off) Low Inactive high (LED off) ...

Page 122

... This is done to minimize digital noise in the analog circuits and to eliminate the possibility of ground loops. External connections to analog ground are made on a screw- terminal header at J15. BL4S100 User’s Manual OWER UPPLY ® ...

Page 123

... The battery is user-replaceable, and is fitted in a battery holder. To replace the battery, lift up on the spring clip and slide out the old battery. Use only a Panasonic CR2032 or equiv- alent replacement battery, and insert it into the battery holder with the + side facing up. ...

Page 124

... PPENDIX Appendix C explains how to use the Demonstration Board with the BL4S100 sample programs. BL4S100 User’s Manual EMONSTRATION B OARD 122 ...

Page 125

... Make sure that your BL4S100 is connected to your PC via the programming cable and that the power supply is connected to the BL4S100 and plugged in as described in Chapter 2, “Getting Started.” Figure C-1. Power Supply Connections Between BL4S10 and Demonstration Board CAUTION: If you are using your own power supply with the Demonstration Board, note that the maximum power supply input voltage the Demonstration Board can handle ...

Page 126

... 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.2 Configuration The pushbutton switches may be configured active high or active low via jumper settings on header JP15. Figure C-3. Pushbutton Switch Configuration BL4S100 User’s Manual W W 124 ...

Page 127

... The four LED output indicators can be configured as sinking outputs or as sourcing out- puts via jumpers on headers JP1–JP4 as shown in Figure C-4. Figure C-4. LED Output Indicators Sinking or Sourcing Configuration NOTE: Disconnect power before changing any jumper settings. The power supply voltage input screw-terminal header J3 is available as +V_ALT on screw-terminal header J1 ...

Page 128

... 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. BL4S100 User’ ...

Page 129

... D.1 Digital I/O Pin Associations Table D-1. Digital I/O Pin Associations I/O Pin IN0 IN1 IN2 IN3 IN4 IN5 IN6 IN7 OUT0 OUT1 IN8 IN9 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 IN10 IN11 BL4S100 User’s Manual Block Pin 127 ...

Page 130

... In this case 0011, which indicates that pin 1 and pin 2 of the block used by IN2 have the conflicts — they are using the coun- ter/timer in a way that conflicts with setting IN2 as a counter input. Looking at Table D-1, you find IN2 is using block 0 on RIO chip 0, and pin 0 and pin 1 of this block are used by IN0 and IN1 ...

Page 131

... I/O cannot share the block with any other * or # marked function without possible conflicts. # — I/O can generally share the timer, but will be affected by settings of the limit value (value at which the timer rolls over) or resetting of the counter, either directly or through synch signals. ...

Page 132

... 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. Appendix E describes how to mount the BL4S100 inside the plastic enclosure, and provides details on mounting the assembly. BL4S100 User’s Manual LASTIC NCLOSURE ...

Page 133

... Attach the BL4S100 to the base using the four 4-40 × ¼ screws supplied with the enclo- sure base. Figure E-1. Attach BL4S100 to Plastic Enclosure Base 2. Mount plastic enclosure (optional). Use two #10 screws to attach the plastic enclosure at the two outer side mounting holes to the surface on which it will be mounted. BL4S100 User’s Manual 131 ...

Page 134

... 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. Figure E-2. Attach Enclosure Top BL4S100 User’s Manual 132 ...

Page 135

... Figure E-3 shows the dimensions for the plastic enclosure. 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). BL4S100 User’s Manual 133 ...

Page 136

... Rabbit has tested the firmware associated with a particular version of Dynamic C for correct operation, and only this version is included on the Dynamic C CD-ROM — do not use any other firmware versions with that version of Dynamic C. Once you have successfully loaded the firmware, compile and run another sample program to make sure the MODEMFWLOAD ...

Page 137

... ZigBee coordinator. Section 6.2.2 explains how to set up the BL4S100/BL4S150 configuration patterns for the sample programs via macros in the Dynamic C library folder. Channel mask — defaults to 0x1FFE, i.e., all 16 possible channels via the macro in the Dynamic C LIB\Rabbit4000\XBee\XBEE_API.LIB #define DEFAULT_CHANNELS ZB_DEFAULT_CHANNELS For example, to limit the channels to three channels, the macro would read as follows. ...

Page 138

... Now set the networking parameters in your project defines or in the sample program to match the parameters in the Dynamic C library. Networking ( Operating Channel — this is the operating channel you could see when you ran the AT_INTERACTIVE.C ing the command ATCH <Enter>. This channel information cannot be changed from the X-CTU utility. ...

Page 139

... 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. BL4S100 User’s Manual 137 ...

Page 140

... On the “PC Settings” tab, check the “Enable API” box under “Host Setup.” the “PC Settings” tab, select the “USB Serial Port” and click “Test/Query.” You should see a response showing the Modem Type (XB 24-B) and the firmware version. ...

Page 141

... I NDEX interrupts setup .................. 21 pullup/pulldown configuration 19 Quadrature Decoder setup 21 switching threshold ........... 20 digital outputs ....................... 22 counter/timer associations 23 PWM/PPM setup ........ 23, 24 sinking or sourcing ........... 22 dimensions BL4S100 main board ...... 113 plastic enclosure .............. 133 Dynamic C .................. 7, 33, 34 add-on modules ........... 13, 35 installation ...

Page 142

... BL4S100 to enclo- sure base ................... 131 attaching top ................ 132 power management ............. 120 power supply ....................... 120 battery backup ................. 121 connections ....................... 11 switching voltage regulator ... 120 Program Mode ...................... 30 programming programming cable ............. 6 programming port ............. 25 programming cable ...

Page 143

... Ethernet hub ...................... 95 steps .................................. 95 BL4S100 User’s Manual Tool Kit ................................... 6 AC adapter .......................... 6 DC power supply ................ 6 Demonstration Board .......... 6 Dynamic C software ........... 6 programming cable ............. 6 software ............................... 6 User’s Manual ..................... 6 U user block function calls readUserBlock() ............ 32 writeUserBlock() ........... 32 save/retrieve calibration con- stants ................. 16, 29 VBAT RAM memory ........... 32 X XBee module additional resources ...

Page 144

... 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. BL4S100 User’s Manual S CHEMATICS 142 ...

Related keywords