background image

BL4S100

C-Programmable Single-Board Computer with Networking

User’s Manual

019–0172_D

Summary of Contents for BL4S100

Page 1: ...BL4S100 C Programmable Single Board Computer with Networking User s Manual 019 0172_D ...

Page 2: ...eserves 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 Digi International Inc website www digi com for free unregistered download ...

Page 3: ...a Sample Program 14 2 4 1 Troubleshooting 14 2 4 2 Run a ZigBee Sample Program BL4S100 BL4S150 only 15 2 5 Where Do I Go From Here 16 Chapter 3 Subsystems 17 3 1 BL4S100 Pinouts 18 3 1 1 Connectors 18 3 2 Digital I O 19 3 2 1 Digital Inputs 19 3 2 2 Digital Outputs 22 3 3 Serial Communication 25 3 3 1 RS 232 25 3 3 2 Programming Port 25 3 3 3 Ethernet Port 26 3 4 A D Converter Inputs 27 3 4 1 A D ...

Page 4: ...Connect 98 5 2 3 Run the PINGME C Demo 99 5 2 4 Running More Demo Programs With a Direct Connection 100 5 3 Where Do I Go From Here 102 Chapter 6 Using the ZigBee Features 103 6 1 Introduction to the ZigBee Protocol 103 6 2 ZigBee Sample Programs 104 6 2 1 Setting Up the Digi XBee USB Coordinator 105 6 2 2 Setting up Sample Programs 107 6 3 Dynamic C Function Calls 111 6 4 Where Do I Go From Here ...

Page 5: ...30 E 1 Assembly Instructions 131 E 2 Dimensions 133 Appendix F Additional Configuration Instructions 134 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 139 Schematics 142 ...

Page 6: ... Rabbit 4000 microprocessor serial flash memory static RAM digital inputs digital outputs A D converter inputs RS 232 serial ports and Ethernet and ZigBee network connectivity 1 2 BL4S100 Features Rabbit 4000 microprocessor operating at 40 00 MHz Screw terminal connectors 512KB SRAM battery backed 512KB 1MB fast SRAM and 1MB 2MB flash memory options 20 digital I O 12 protected digital inputs and 8...

Page 7: ... RabbitLink Appendix A provides detailed specifications Table 1 BL4S100 Models Feature BL4S100 BL4S110 BL4S150 BL4S160 Microprocessor Rabbit 4000 running at 40 00 MHz Program Execution SRAM 512KB 1MB Data SRAM 512KB Serial Flash Memory program 1MB 2MB A D Converter 12 bits Ethernet Interface 10Base T ZigBee Interface ZigBee PRO 802 15 4 ZigBee PRO 802 15 4 Visit the website for up to date informat...

Page 8: ...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 Demonstration Board with pushbutton switches and LEDs The Demonstration Board can be hooked up to the BL4S100 to demonstrate the I O and capabilities of the BL4S100 DB9 to bare leads serial cable CAT 5 6 Ethernet crossover cable...

Page 9: ...closure are provided in Appendix E GN D J7 20 11 10 D2 Q1 D3 Q2 D4 Q3 RP1 J4 RP2 D5 Q4 D6 Q5 D7 Q6 D8 Q7 D9 Q8 U2 J3 OUT2 OUT1 OUT0 IN3 IN2 IN1 IN0 K GND 5 V K2 K1 GND OUT7 OUT6 OUT5 OUT4 OUT3 BUTTON DS1 DS2 R1 S2 S1 J5 RX TX 1 W CTS RTS 5 V GND RNET J2 2 4 3 RNET PWR D1 J8 2 R41 R31 R43 R45 R40 R38 R44 R33 U4 C13 R24 R30 R25 R35 J6 C7 C11 2 JP1 C6 C10 J1 8 7 2 1 D10 D11 C2 C3 C4 R4 U1 R6 R23 R5 C...

Page 10: ... compliant have the CE mark Immunity The BL4S100 series of single board computers meets the following EN55024 1998 immunity standards EN61000 4 3 Radiated Immunity EN61000 4 4 EFT EN61000 4 6 Conducted Immunity Additional shielding or filtering may be required for a heavy industrial environment Emissions The BL4S100 series of single board computers meets the following emission standards EN55022 19...

Page 11: ...ing the BL4S100 it is the responsibility of the end user to use proper ESD precautions to prevent ESD damage to the BL4S100 Safety All inputs and outputs to and from the BL4S100 series of single board computers must not be connected to voltages exceeding SELV levels 42 4 V AC peak or 60 V DC The lithium backup battery circuit on the BL4S100 single board computer has been designed to protect the ba...

Page 12: ...BL4S100 User s Manual 10 2 GETTING STARTED Chapter 2 explains how to connect the programming cable and power sup ply to the BL4S100 ...

Page 13: ...R40 R38 R44 R33 U4 C13 R24 R30 R25 R35 J6 C7 C11 2 JP1 C6 C10 J1 8 7 2 1 D10 D11 C2 C3 C4 R4 U1 R6 R23 R5 C5 R26 R34 R13 R14 R15 R16 R17 R18 R19 R20 R21 R22 R12 R7 R8 R9 R10 R11 D12 U7 D15 U8 D14 D13 20 11 10 C58 L1 J9 C69 C74 R69 R72 R73 R74 U18 J10 2 1 J11 2 1 AIN0 AIN1 AIN2 AIN3 R87 R89 R90 R93 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND IN11 IN10 IN9 IN8 IN7 IN6 IN5 IN4 GND RST PWR AGND C65 C...

Page 14: ... the plug assembly in the AC adapter Connect the power supply to header J17 on the BL4S100 as shown in Figure 3 Be sure to match the latch mechanism with the top of the connector to header J17 on the BL4S100 as shown The Micro Fit connector will only fit one way Figure 3 Power Supply Connections Plug in the AC adapter The red LED next to the power connector at J17 should light up The BL4S100 is no...

Page 15: ...talled along with Dynamic C and an icon for the docu mentation menu is placed on the workstation s desktop Double click this icon to reach the menu If the icon is missing create a new desktop icon that points to default htm in the docs folder found in the Dynamic C installation folder The latest versions of all docu ments are always available for free unregistered download from our websites as wel...

Page 16: ...f you receive the message No Rabbit Processor Detected the programming cable may be connected to the wrong COM port a connection may be faulty or the target sys tem may not be powered up First check to see that the red power LED next to header J5 is lit If the LED is lit check both ends of the programming cable to ensure that it is firmly plugged into the PC and the programming header on the BL4S1...

Page 17: ...twork ATID Set or read the current PAN ID If you set the ID you must write it to non volitile memory WR and then reset the network software NR ATOP Read the operating PAN ID ATMY Read the current network address Will be 0xFFFE if we are not associated with a network ATSH Read the upper four bytes of the radio IEEE address ATSL Read the lower four bytes of the radio IEEE address ATNI Set or read th...

Page 18: ...end an email to Technical Support If the sample program ran fine you are now ready to go on to explore other BL4S100 features and develop your own applications When you start to develop an application involving the analog inputs run USERBLOCK_ READ_WRITE C in the SAMPLES UserBlock folder to save the factory calibration con stants before you run any other sample programs in case you inadvertently w...

Page 19: ... A D Converter Inputs Memory Figure 4 shows these Rabbit based subsystems designed into the BL4S100 Figure 4 BL4S100 Subsystems BL4S100 RABBIT 4000 RS 232 Digital Inputs Digital Outputs Programming Port Ethernet A D Converter Fast SRAM program Serial Flash Data SRAM RABBIT RIO ZigBee PRO 802 15 4 optional Real Time Clock Main Clock ...

Page 20: ...or the I O and RS 232 signals The polarized 2 2 Micro Fit connector at J17 is for the power supply connection J4 J3 J5 RNET J15 J16 J14 J17 2 GND K IN0 IN1 IN2 IN3 OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 GND K1 K2 5 V GND 5 V TXF RTS RXF CTS TXD 1 W RXD RS 232 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND IN11 IN10 IN9 IN8 IN7 IN6 IN5 IN4 GND XBee Series 2 Analog Inputs Digital Inputs Digital Outpu...

Page 21: ... jumper as shown in Figure 6 Figure 6 BL4S100 Digital Inputs IN0 IN11 Pulled Up to 5 V Factory Default Table 2 summarizes the jumper settings CAUTION Do not simultaneously jumper more than one setting when configuring the pull up or pull down options Table 2 BL4S100 Digital Input Pull Up Pull Down Jumper Settings Pins Jumpered Pulled Up Pulled Down 1 2 Inputs pulled up to K 2 4 or 4 6 Inputs pulle...

Page 22: ...ict error code 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 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 Figure 7 BL4S100 ...

Page 23: ...gital input pins are configured using the setEx tInterrupt function call The interrupt can be set up to occur on a rising edge a fall ing edge or either edge The counter readings can be obtained via the getBegin or getEnd function calls An input channel may be set up to count events with the count incrementing or decrementing using the rising edge fall ing edge or either edge as triggers to start ...

Page 24: ...wire and keep the distance to the power supply as short as possible All the digital outputs sink actively They can be used as low side drivers or as an H bridge driver When the BL4S100 is first powered up or reset all the outputs are disabled that is at a high impedance state Individual digital output channels may be used for PWM PPM outputs The use of these channels for PWM PPM is described in Se...

Page 25: ...de 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 PWM C and the PPM C sample programs in the DIO subdirectory in SAMPLES BL4S1xx show how to set up and use the PWM PPM outputs Table 4 Counter Timer Ass...

Page 26: ...when triggered by an event and may be set up so that the leading and trailing edges of several PWM outputs are aligned as long as the all the PWM outputs are on the same block of a particular Rabbit RIO chip A PPM ouput is similar to a PWM output except it is shifted by an offset relative to the event that triggered the start of the PPM output A PPM output is either inverted or nonin verted based ...

Page 27: ...ut voltage immunity required to meet the RS 232 serial communication protocol Basically the chip translates the Rabbit microprocessor s CMOS signals to RS 232 signal levels Note that the polarity is reversed in an RS 232 circuit so that a 3 3 V output becomes approximately 10 V and 0 V is out put as 10 V The RS 232 transceiver also provides the proper line loading for reliable communication RS 232...

Page 28: ...e 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 Figure 10 RJ 45 Ethern...

Page 29: ...nded unipolar and differential bipolar ranges as shown in Table 6 Figure 11 shows a pair of A D converter input circuits The resistors form an approx 10 1 attenuator and the capacitors filter noise pulses from the A D converter inputs Figure 11 Buffered A D Converter Inputs The A D converter chip can only accept positive voltages By pairing the analog inputs differential bipolar measurements are p...

Page 30: ...alibration constants are stored in the user block Table 6 A D Converter Input Voltage Ranges Amplifier Gain Voltage Range Single Ended Unipolar Differential Bipolar 1 0 20 V 20 V 2 0 10 V 10 V 4 0 5 V 5 V 5 0 4 V 4 V 8 0 2 5 V 2 5 V 10 0 2 V 2 V 16 0 1 25 V 1 25 V 20 0 1 V 1 V 4 20 mA operation is available with an ampli fier gain of 8 When using channels AIN0 AIN3 for current measurements remembe...

Page 31: ...asurements or differential measurements using a common analog ground then calibrate the A D con verter in the corresponding manner The calibration table in software only holds calibra tion constants based on mode channel and gain Other factors affecting the calibration must be taken into account by calibrating using the same mode and gain setup as in the intended use Sample programs are provided t...

Page 32: ...ming port and the programming cable GND J7 20 11 10 D2 Q1 D3 Q2 D4 Q3 RP1 J4 RP2 D5 Q4 D6 Q5 D7 Q6 D8 Q7 D9 Q8 U2 J3 OUT2 OUT1 OUT0 IN3 IN2 IN1 IN0 K GND 5 V K2 K1 GND OUT7 OUT6 OUT5 OUT4 OUT3 BUTTON DS1 DS2 R1 S2 S1 J5 RX TX 1 W CTS RTS 5 V GND RNET J2 2 4 3 RNET PWR D1 J8 2 R41 R31 R43 R45 R40 R38 R44 R33 U4 C13 R24 R30 R25 R35 J6 C7 C11 2 JP1 C6 C10 J1 8 7 2 1 D10 D11 C2 C3 C4 R4 U1 R6 R23 R5 C...

Page 33: ...s tab from the Dynamic C Options Project Options menu 2 Add the line CLOCK_DOUBLED 0 to always disable the clock doubler The clock doubler is enabled by default and usually no entry is needed If you need to specify that the clock doubler is always enabled add the line CLOCK_DOUBLED 1 to always enable the clock doubler 3 Click OK to save the macro The clock doubler will now remain off or on accordi...

Page 34: ...r block area to store persistent data The functions writeUserBlock and readUserBlock are provided for this 3 7 3 VBAT RAM Memory The tamper detection feature of the Rabbit microprocessor can be used to detect any attempt to enter the bootstrap mode When such an attempt is detected the VBAT RAM memory in the Rabbit microprocessor is erased The serial bootloader on the BL4S100 boards uses the bootst...

Page 35: ...un normally For debugging purposes you may select Store Program in RAM on the Compiler tab so that download speed is as fast as possible Note that programs stored in RAM will be lost when the BL4S100 is reset so this option should be used only for debugging Developing software with Dynamic C is simple Users can write compile and test C and assembly code without leaving the Dynamic C development en...

Page 36: ...tandard 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 Wa...

Page 37: ...ory containing the patch Do not simply copy over an entire file since you may overwrite an update of course you may copy over any programs you have written Once you are sure the new patch or update works entirely to your satisfaction you may retire the existing installation but keep it available to handle legacy applications 4 1 2 Add On Modules Starting with Dynamic C version 10 40 Dynamic C incl...

Page 38: ...it by pressing F9 The BL4S100 must be in Program mode see Section 3 5 USB Programming Cable and must be connected to a PC 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 TCP IP specific functions are descr...

Page 39: ...C11 2 JP1 C6 C10 J1 8 7 2 1 D10 D11 C2 C3 C4 R4 U1 R6 R23 R5 C5 R26 R34 R13 R14 R15 R16 R17 R18 R19 R20 R21 R22 R12 R7 R8 R9 R10 R11 D12 U7 D15 U8 D14 D13 20 11 10 C58 L1 J9 C69 C74 R69 R72 R73 R74 U18 J10 2 1 J11 2 1 AIN0 AIN1 AIN2 AIN3 R87 R89 R90 R93 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND IN11 IN10 IN9 IN8 IN7 IN6 IN5 IN4 GND RST PWR AGND C65 C64 C68 R63 R65 L2 BT1 C86 C87 R86 U20 C96 C91...

Page 40: ...20 R21 R22 R12 R7 R8 R9 R10 R11 D12 U7 D15 U8 D14 D13 20 11 10 C58 L1 J9 C69 C74 R69 R72 R73 R74 U18 J10 2 1 J11 2 1 AIN0 AIN1 AIN2 AIN3 R87 R89 R90 R93 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND IN11 IN10 IN9 IN8 IN7 IN6 IN5 IN4 GND RST PWR AGND C65 C64 C68 R63 R65 L2 BT1 C86 C87 R86 U20 C96 C91 C92 C95 C97 C101 C102 C103 C104 C105 C106 C107 C108 R98 R99 R100 R101 R102 R103 R104 R105 R106 R107 ...

Page 41: ...al output pins OUT0 OUT3 on headers J3 or J4 Remember to connect the oscilloscope ground to GND on header J4 Once you compile and run the sample program change the duty cycle and offsets for a given PPM channel via the Dynamic C STDIO window and watch the change in wave forms on the oscilloscope Signals on OUT0 and OUT1 will all be synchronized with each other as they share the same overall counte...

Page 42: ...rogram will continuously capture single pulses in an interrupt service request for display PWM C Demonstrates the use of the eight PWM channels on digital output pins 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 adj...

Page 43: ... D12 U7 D15 U8 D14 D13 20 11 10 C58 L1 J9 C69 C74 R69 R72 R73 R74 U18 J10 2 1 J11 2 1 AIN0 AIN1 AIN2 AIN3 R87 R89 R90 R93 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND IN11 IN10 IN9 IN8 IN7 IN6 IN5 IN4 GND RST PWR AGND C65 C64 C68 R63 R65 L2 BT1 C86 C87 R86 U20 C96 C91 C92 C95 C97 C101 C102 C103 C104 C105 C106 C107 C108 R98 R99 R100 R101 R102 R103 R104 R105 R106 R107 R108 R109 R110 R111 R112 R113 A...

Page 44: ...fects of the PWM and PPM outputs The high speed Quadrature Decoder counts the number of rollovers that occur one per 1000 counts The low speed Quadrature Decoder displays the current count in the register Once the connections are made as shown and you compile and run this sample program change the frequency direction for a given Quadrature Decoder via the Dynamic C STDIO window and watch the regis...

Page 45: ...is program demonstrates 5 wire RS 232 serial communication using the Dynamic C STDIO window Follow these instructions before running this sample program Before you compile and run this sample program connect Tx 1 W to Rx then connect RTS to CTS To test flow control disconnect RTS from CTS while running this program Characters should stop printing in the Dynamic C STDIO window and should resume whe...

Page 46: ... counter depending on the parity of both the BL4S100 and the terminal emulation program COMPUTER3WIRE C This sample program demonstrates basic initialization for a sim ple three wire RS 232 connection Characters typed in either the Dynamic C STDIO window or in a serial terminal emulation program are echoed in both displays The setup and run instructions are the same as for the COMPUTER_PARITY C sa...

Page 47: ... tored 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 STDIO window ADC_CAL_SE_UNIPOLAR C Demonstrates how to recalibrate a single ended u...

Page 48: ...IN3 and AGND then compile and run the sample program and follow the instructions in the Dynamic C STDIO window as you vary the output from the power supply ADC_RD_SE_UNIPOLAR C Demonstrates how to read and display the voltage of all single ended analog input channels using calibration coefficients previously stored in the user block Before you compile and run this sample program connect the power ...

Page 49: ... 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 informa tion about TCP IP is provided in Chapter 5 Using the Ethernet TCP IP Features ZigBee libraries specific to using ZigBee functions on the BL4S100 Further infor mation about ZigBee is provided in Chapter 6 Using th...

Page 50: ... 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 ...

Page 51: ...ess 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 0 logic low 1 logic high EINVAL channel value is out of range EPERM channel functionality does not permit this operation SEE A...

Page 52: ... 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 EINVAL invalid parameter value SEE ALSO brdInit digIn setDigIn Data Bits Bank 0 Bank 1 LSB D0 IN0 IN8 D1 IN1 IN9 D2 IN2 IN10 D3 IN3 IN11 D4 IN4 not used D5 IN5 D6 IN6 MSB D7 IN7 ...

Page 53: ...RQ_BOTH interrupt events on both edges handle handle for the ISR handler to service this interrupt 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 bl...

Page 54: ...hannel to use as Input B also known as quadrature or Q 0 11 pins IN0 IN11 channel_index channel to use as index input 1 if not used 0 11 pins IN0 IN11 NOTE The Quadrature Decoder count may still be reset by existing or new synch signals set up on the same block of a particular RIO chip index_polarity polarity of the index channel not used when channel_index set to 1 0 index on low level non zero i...

Page 55: ...NABLE continuous up count mode with count stopping on any match event edge edge setting macro for the up count event BL_EDGE_RISE up count on rising edge BL_EDGE_FALL up count on falling edge BL_EDGE_BOTH up count on either edge options options based on mode N Aif the continuous up mode is selected BL_EDGE_RISE down count on rising edge BL_EDGE_FALL down count on falling edge BL_EDGE_BOTH down cou...

Page 56: ...T 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 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 SEE ALSO brdInit ge...

Page 57: ...then it specifies the end event input 0 11 pins IN0 IN11 mode mode macro for the counter timer BL_CNT_RUN continuous count mode BL_CNT_BEGIN_END start count on begin event continue to count until end event detected BL_CNT_TIL_END count until end event detected BL_CNT_ON_BEGIN count while begin signal is active NOTE If an end event occurs before the begin event the count will begin then end immedia...

Page 58: ...and limit options use BL_PRESCALE use prescaled clock BL_SAVE_LIMIT save current limit register value other wise limit set to 0xFFFF RETURN VALUE 0 success EINVAL invalid parameter value 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 corresp...

Page 59: ...success EINVAL invalid parameter value SEE ALSO brdInit setCounter setDecoder setCapture resetCounter getBegin int getBegin int channel word begin FUNCTION DESCRIPTION Reads the current value of the begin 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...

Page 60: ...URN VALUE 0 success EINVAL invalid parameter value EPERM pin type does not permit this function SEE ALSO brdInit setCapture resetCounter getBegin resetCounter int resetCounter int channel FUNCTION DESCRIPTION Resets the current count of the counter register within the counter block hosting the given channel PARAMETER channel digital input channel that uses the desired counter block 0 11 pins IN0 I...

Page 61: ...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 EPERM pin type does not permit this function SEE ALSO brdInit setCapture resetCounter ...

Page 62: ...ERS channel digital input channel that is on the block that will have its synch set 0 11 pins IN0 IN11 source source of the synch signal 1 to use the RIO chip s Global Synch signal or input capable channel to use as an external synch signal edge edge of the synch signal BL_EDGE_RISE synchronize event on rising edge BL_EDGE_FALL synchronize event on falling edge BL_EDGE_BOTH synchronize events on b...

Page 63: ...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 RETURN VALUE 0 success EPERM brdInit was not run before calling this function SEE ALSO brdInit ...

Page 64: ...ed on the state parameter The digOut function should be used to control the output state after configuration as it is more effi cient This function is non reentrant 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 SEE AL...

Page 65: ...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 EPERM pin function was not set up as a digital output SEE ALSO brdInit setDigOut digOutBank ...

Page 66: ...tputs by the setDigOut function call PARAMETERS bank digital output bank pins 0 OUT0 OUT7 data data value to be written to the specified digital output bank the data format and bitwise value are as follows Bitwise value 0 connects the load to GND 1 puts the output in a high impedance state RETURN VALUE 0 success EINVAL invalid parameter value or board not initialized SEE ALSO brdInit digOut setDig...

Page 67: ... OUT0 OUT7 frequency PWM frequency in Hz should be from 2 Hz to 50 kHz use 1 to preserve the existing frequency on the RIO block duty PWM duty cycle should be from 0 to 100 use 1 and bind parameter to use bound edge to set the duty cycle invert whether the PWM output is inverted the PWM output normally starts with the output high and inverted starts with the output low 0 noninverted 1 inverted bin...

Page 68: ...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 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 SEE ALSO brdInit setFreq setDuty setSyncIn setSync...

Page 69: ...00 use 1 and bind_ duty parameter to use bound edge to set the duty cycle NOTE PPM will not wrap around the PPM period If offset is set to 25 the 75 to 100 duty cycle will have the same effect as offset 25 duty 75 The same waveform as a wrapped PPM can be created using an inverted PPM invert whether the PPM output is inverted the PPM output normally starts with the output low goes high at the offs...

Page 70: ...ive 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 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 SEE ALSO brdInit setFreq setOffset setDuty setSyncIn se...

Page 71: ...ift is of concern call setOffset and setDuty to reset the duty cycle and offset to the desired value PARAMETERS channel all digital output channels on the same RIO chip and block as this channel 0 7 OUT0 OUT7 will have their frequency set Duty cycle and offset percentages will be maintained frequency frequency of the PWM and PPM outputs should be from 2 Hz to 50 kHz Use 1 to preserve the existing ...

Page 72: ...s 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 SEE ALSO brdInit setPWM setPPM setOffset setFreq setSyncIn setSyncOut pulseEnable pulseDisable ...

Page 73: ...y the duty cycle the PPM output will start at the offset and will wrap around to the position of what was the trailing edge PARAMETERS channel digital output channel that is getting its offset set 0 7 OUT0 OUT79 offset PPM offset should be from 0 to 100 NOTE A zero offset will produce the smallest offset possible which is one count If you must have a zero offset use setPWM instead of setOffset RET...

Page 74: ...et to 0 or 1 RETURN VALUE 0 success EINVAL invalid parameter value EPERM channel function does not permit this operation SEE ALSO brdInit setPWM setPPM pulseEnable pulseEnable int pulseEnable int channel FUNCTION DESCRIPTION Enables a disabled PWM PPM output The pin is restored to the same PWM PPM operation it had before being disabled PARAMETER channel digital output channel that is getting its P...

Page 75: ...AMETERS channel digital output channel that is on the block that will have its synch set 0 7 OUT0 OUT7 source source of the synch signal 1 to use the RIO chip s Global Synch signal or input capable channel to use as an external synch signal edge edge of the synch signal BL_EDGE_RISE synchronize event on rising edge BL_EDGE_FALL synchronize event on falling edge BL_EDGE_BOTH synchronize events on b...

Page 76: ...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 RETURN VALUE Bit flags showing match use on success BL_IER_MATCH0 bit set if using Match Register 0 BL_IER_MATCH1 bit set if using Match Register 1 BL_IER_MATCH2 bit set if using Match Register 2 BL_IER_MAT...

Page 77: ...sting RIO block when called PARAMETERS channel digital input channel to bind to ISR 0 11 IN0 IN11 ier bit mask of interrupt s this handler services BL_IER_DQE decrement quadrature end BL_IER_IIB increment inphase begin BL_IER_ROLL_D counter rollover on decrement BL_IER_ROLL_I counter rollover on increment BL_IER_MATCH3 Match 3 condition BL_IER_MATCH2 Match 2 condition BL_IER_MATCH1 Match 1 conditi...

Page 78: ...RS channel digital output channel to bind to ISR 0 7 OUT0 OUT7 ier bit mask of interrupt s this handler services BL_IER_DQE decrement quadrature end BL_IER_IIB increment inphase begin BL_IER_ROLL_D counter rollover on decrement BL_IER_ROLL_I counter rollover on increment BL_IER_MATCH3 Match 3 condition BL_IER_MATCH2 Match 2 condition BL_IER_MATCH1 Match 1 condition BL_IER_MATCH0 Match 0 condition ...

Page 79: ...bled to set the IER value Disabling the ISR can be done by calling enableISR with a zero for the enable parameter PARAMETERS isr_handle index to the desired ISR ier bit mask of interrupts this handler services bit positions match RIO Interrupt Enable and Status registers RETURN VALUE 0 success EINVAL Invalid parameter given EPERM Handler is enabled can t change IER SEE ALSO addISRIn addISROut enab...

Page 80: ... 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 Any enabled ISR events will be passed to the appropriate ISR handler RETURN VALUE None SEE ALSO addISRIn addISROut enableISR setIER ...

Page 81: ...transmit ting or receiving and nonblocking functions which must be called repeatedly until they are finished For more information see the Dynamic C User s Manual and Technical Note 213 Rabbit Serial Port Software Use the following function calls with the BL4S100 serMode int serMode int mode FUNCTION DESCRIPTION This function call sets the serial interfaces used by your application program Call thi...

Page 82: ...of operation are as follows Single ended unipolar 0 20 V Differential bipolar 20 V 4 20 mA operation NOTE When a pin in a differential pair is reconfigured as a nondifferential pin the remaining paired pin is also reconfigured PARAMETERS channel analog input channel 0 7 AIN0 AIN7 opmode selects the mode of operation for the A D converter channel pair The values are as follows SE0_MODE single ended...

Page 83: ...ry NOTE The 10 and 90 points of the maximum voltage range are recommended when calibrating a channel PARAMETERS channel analog input channel number 0 to 7 corresponding toAIN0 AIN7 opmode the mode of operation for the specified channel Use one of the following macros to set the mode for the channel being configured SE0_mode single ended unipolar 0 20 V DIFF_MODE differential bipolar 20 V mAMP_mode...

Page 84: ...volts2 the voltage corresponding to the second A D converter value RETURN VALUE 0 success EINVAL invalid parameter ERR_ANA_CALIB error writing calibration constants SEE ALSO brdInit anaInConfig anaIn anaInmAmps anaInDiff anaInVolts Gain Code Macro Voltage Range 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...

Page 85: ...operation channel Single Ended Differential 4 20 mA 0 AIN0 AIN0 AIN1 AIN0 1 AIN1 AIN1 2 AIN2 AIN2 AIN3 AIN2 3 AIN3 AIN3 4 AIN4 AIN4 AIN5 5 AIN5 6 AIN6 AIN6 AIN7 7 AIN7 Gain Code Macro Value Range Voltage Range Single Ended Unipolar Differential Bipolar 0 GAIN_X1 0 20 V 20 V 0 20 V 1 GAIN_X2 0 10 V 10 V 0 10 V 2 GAIN_X4 0 5 V 5 V 0 5 V 3 GAIN_X5 0 4 V 4 V 0 4 V 4 GAIN_X8 0 2 5 V 2 5 V 0 2 5 V 5 GAI...

Page 86: ...RCODESTART 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 SEE ALSO brdInit anaInConfig anaInCalib anaInmAmps anaInDiff anaInVolts ...

Page 87: ... 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 channel analog input channel number 0 to 7 corresponding toAIN0 AIN7 gaincode the gain code of 0 to 7 the table below applies for single ended modes only Gain Code Macro Value Range Voltage Range Single Ended Unipolar Differential Bipolar 0 GA...

Page 88: ...e 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 System errors can create run time error unless disabled ERR_ANA_CALIB fault detected in reading calibration facto r ERR_ANA_INVAL invalid parameter value SEE ALSO brdInit anaInConfig anaIn anaInmAmp...

Page 89: ...r 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 channel the analog input channel number 0 2 4 6 as shown below gaincode the gain code of 0 to 7 channel Differential Inputs 0 AIN0 AIN1 2 AIN2 AIN3 4 AIN4 AIN5 6 AIN6 AIN7 Gain Code Macro Actual Gain Differential Voltage Range Act...

Page 90: ... 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 System errors can create run time error unless disabled ERR_ANA_CALIB fault detected in reading calibration factor ERR_ANA_INVAL invalid parameter value SEE ALSO brdInit anaInConfig anaIn anaInmAmps ...

Page 91: ...ponding to AIN0 AIN3 RETURN VALUE A current value corresponding to the current 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 timeou t BL_WRONG_MODE A D converter ...

Page 92: ...unipolar 0 20 V DIFF_MODE differential bipolar 20 V mAMP_mode 4 20 mA gaincode the gain code of 0 to 7 use the gain code macro mAMP_GAINCODE for 4 20 mA operation pcal_data calibration structure pointer to gain and offset values channel Single Ended Differential 4 20 mA 0 AIN0 AIN0 AIN1 AIN0 1 AIN1 AIN1 2 AIN2 AIN2 AIN3 AIN2 3 AIN3 AIN3 4 AIN4 AIN4 AIN5 5 AIN5 6 AIN6 AIN6 AIN7 7 AIN7 Gain Code Mac...

Page 93: ... s Manual 91 anaInRdCalib continued RETURN VALUE 0 success 1 invalid address or range 2 no valid user block found block version 3 or later 3 flash read error EINVAL invalid parameter SEE ALSO anaInCalib _anaInAddr ...

Page 94: ...rst and the A D converter oscillator have been enabled See anaInConfig for additional setup information After the last data bit is transferred the conversion begins immediately An exception error will occur if Direct Mode bit D7 is not set PARAMETER cmd The cmd parameter contains a gain code and channel code and the MSB is set high for direct mode access The format is as follows Use the following ...

Page 95: ...eout BL_OVERFLOW overflow or out of range System errors can create run time error unless disabled ERR_ANA_INVAL invalid parameter value SEE ALSO anaInConfig anaIn brdInit 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 1...

Page 96: ... 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 At power on the application program uses the active copy of the variable pointed to by its associated flag The sample code below shows how a protected variable is defined and how its value can be restored protected nf_device nandFlash int main _sysIsSoftReset ...

Page 97: ...RJ 45 crossover CAT 5 6 Ethernet cable The CAT 5 6 Ethernet cables and Ethernet hub are available from Rabbit in a TCP IP tool kit More information is available at www digi com 1 Connect the AC adapter and the programming cable as shown in Chapter 2 Getting Started 2 Ethernet Connections If you do not have access to an Ethernet network use a crossover CAT 5 6 Ethernet cable to connect the BL4S100 ...

Page 98: ...hen plug ging it back in or by pressing the RESET button located next to the Ethernet jack When working with the BL4S100 the green LNK light is on when a program is running and the board is properly connected either to an Ethernet hub or to an active Ethernet card The orange ACT light flashes each time a packet is received BL4S100 User s PC Crossover CAT 5 6 Ethernet cable Direct Connection networ...

Page 99: ...DRESS MY_NETMASK MY_GATEWAY and MY_NAMESERVER macros in each program 2 You can leave TCPCONFIG at the usual default of 1 which will set the IP configurations to 10 10 6 100 the netmask to 255 255 255 0 and the nameserver and gateway to 10 10 6 1 If you would like to change the default values for example to use an IP address of 10 1 1 2 for the BL4S100 board and 10 1 1 1 for your PC you can edit th...

Page 100: ...e network interface card used for the Ethernet interface you intend to use e g TCP IP Xircom Credit Card Network Adapter and click on the Properties button 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 ...

Page 101: ...is made Note If the LNK light does not light you may not have a crossover cable or if you are using a hub perhaps the power is off on the hub The next step is to ping the board from your PC This can be done by bringing up the MS DOS window and running the ping program ping 10 10 6 100 or by Start Run and typing the command ping 10 10 6 100 Notice that the orange ACT light flashes on the BL4S100 Et...

Page 102: ...R35 J6 C7 C11 2 JP1 C6 C10 J1 8 7 2 1 D10 D11 C2 C3 C4 R4 U1 R6 R23 R5 C5 R26 R34 R13 R14 R15 R16 R17 R18 R19 R20 R21 R22 R12 R7 R8 R9 R10 R11 D12 U7 D15 U8 D14 D13 20 11 10 C58 L1 J9 C69 C74 R69 R72 R73 R74 U18 J10 2 1 J11 2 1 AIN0 AIN1 AIN2 AIN3 R87 R89 R90 R93 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND IN11 IN10 IN9 IN8 IN7 IN6 IN5 IN4 GND RST PWR AGND C65 C64 C68 R63 R65 L2 BT1 C86 C87 R86 U...

Page 103: ...igital and analog inputs on header J3 J15 and J16 SMTP C Uses the SMTP library to send an e mail when a pushbutton switch on the Demonstration Board is pressed TELNET C Allows you to communicate with the BL4S100 using the Telnet protocol This program takes anything that comes in on a port and sends it out Serial Port D and displays the content in the Dynamic C STDIO window It uses a digital input ...

Page 104: ...C Check the Rabbit Technical Bulletin Board and forums at www digi com support and at www digi com support forum rabbit Click tech support digi com to send an email to Technical Support 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...

Page 105: ... and low power consumption A network of devices using the ZigBee proto col works via a self organizing mesh network that can be used for industrial control embedded sensors data collection home security and building automation The power consumption of the individual device could be met for a year or longer using the originally installed battery A ZigBee device can be set up in one of three ways As...

Page 106: ...s not a part of the stan dard BL4S200 Tool Kit See section F 2 Digi XBee USB Configuration for more infor mation on the Digi XBee USB device To run a sample program open it with the File menu if it is not still open then compile and run it by pressing F9 Each sample program has comments that describe the purpose and function of the pro gram Follow the instructions at the beginning of the sample pr...

Page 107: ...9 R20 R21 R22 R12 R7 R8 R9 R10 R11 D12 U7 D15 U8 D14 D13 20 11 10 C58 L1 J9 C69 C74 R69 R72 R73 R74 U18 J10 2 1 J11 2 1 AIN0 AIN1 AIN2 AIN3 R87 R89 R90 R93 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND IN11 IN10 IN9 IN8 IN7 IN6 IN5 IN4 GND RST PWR AGND C65 C64 C68 R63 R65 L2 BT1 C86 C87 R86 U20 C96 C91 C92 C95 C97 C101 C102 C103 C104 C105 C106 C107 C108 R98 R99 R100 R101 R102 R103 R104 R105 R106 R1...

Page 108: ... Panel System Hardware Device Manager Ports on your PC if you need help in identifying the USB COM port 6 Any ZigBee devices discovered will be displayed in the Devices Discovered window to the right If the utility times out and no ZigBee devices are displayed you will have to reconfig ure the Digi XBee USB and recompile the sample program once you make sure the BL4S100 BL4S150 is powered up The t...

Page 109: ...ult in the sample programs is for the BL4S100 Bl4S150 to be a router Set XBEE_ROLE to NODE_TYPE_COORD NODE_TYPE_ROUTER or NODE_TYPE_ENDDEV to match your XBee s firmware define XBEE_ROLE NODE_TYPE_ROUTER NOTE Remember that the firmware loaded to the XBee RF module is different depend ing on whether the BL4S100 BL4S150 is a router default an end device or a coordi nator See Appendix F Additional Con...

Page 110: ... Each node should have a unique identifier define NODEID_STR RabbitXBee The XBee sample programs in the Dynamic C SAMPLES XBee folder illustrate the use of the XBee function calls AT_INTERACTIVE C This sample program shows how to set up and use AT commands with the XBee RF module The program will print out a list of AT commands in the Dynamic C STDIO window You may type in either ATxx or just the ...

Page 111: ...rogram SAMPLES XBEE XBEE_GPIO_CLIENT C running on an RCM4510W RabbitCore module or on a single board computer with an XBee RF module Connect the BL4S100 BL4S150 to the Demonstration Board as explained in Section 6 2 1 Then compile and run this sample program on the BL4S100 BL4S150 Run the Windows GUI client XBEE_GPIO_GUI exe in the Dynamic C Utilities XBee GPIO GUI folder on your PC Configure the ...

Page 112: ...wing 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 Note that the XB24 ZB_2x40 firmware allows you to set digital outputs on all node types but analog and digital inputs can only be read on end devices ...

Page 113: ...s point Use the Dynamic C Help menu to get further assistance with Dynamic C Check the Rabbit Technical Bulletin Board and forums at www digi com support and at www digi com support forum rabbit Click tech support digi com to send an email to Technical Support If the sample programs ran fine you are now ready to go on An Introduction to ZigBee provides background information on the ZigBee protocol...

Page 114: ...BL4S100 User s Manual 112 APPENDIX A SPECIFICATIONS Appendix A provides the specifications for the BL4S100 ...

Page 115: ...08 R98 R99 R100 R101 R102 R103 R104 R105 R106 R107 R108 R109 R110 R111 R112 R113 ADC PROGRAMMER GND 2 J12 J15 R115 RP5 RP3 R94 R91 D19 D20 D21 D22 D23 D24 D25 D26 RP4 J13 2 RP6 1 S3 J16 S4 C114 2 7 8 J14 R117 D27 DS3 DS4 J17 2 PWR IN L12 3 4 C93 D18 C112 R116 R118 L10 L11 C109 L8 C110 L9 L4 R88 C98 L5 C111 L6 C99 L7 U21 C100 R95R96 R77 C94 R92 C113 R97 U19 R75 R85 C90 R76 C89 C88 U17 L3 C17 C18 C1...

Page 116: ...res channels software selectable ranges unipolar differential bipolar 1 2 2 5 5 10 20 V DC 4 channels can be hardware configured for 4 20 mA 1 M input impedance up to 4 100 samples s Serial Ports 3 serial ports two RS 232 or one RS 232 with CTS RTS one serial port dedicated for programming debug Serial Rate Max asynchronous rate 250kbps Max synchronous rate 1 MB s Hardware Connectors Micro Fit con...

Page 117: ...clusion zone of 0 12 3 mm is rec ommended below the BL4S100 shows this exclusion zone Figure A 2 BL4S100 Exclusion Zone A 1 2 Headers The BL4S100 has a 3 mm Micro Fit connectors at J17 for power supply connections There are four 1 9 screw terminal headers for the various analog inputs and digital I O One 1 6 screw terminal header handles to RS 232 signals Board Size 3 75 5 75 0 64 96 mm 146 mm 16 ...

Page 118: ...urations Header Description Pins Connected Factory Default JP1 Serial Communication Configuration Options not stuffed None J1 is configured for RS 232 1 2 J1 is configured for RabbitNet 2 3 J1 configured for 1 Wire serial J6 Serial Communication Configuration Options not stuffed None J1 is configured for RS 232 or RabbitNet 1 3 4 6 J1 is configured for alternate 1 Wire serial pinout 2 4 J1 is conf...

Page 119: ... Options None Voltage Option 1 2 AIN2 4 20 mA option 5 6 AIN3 4 20 mA option J11 A D Converter Voltage Current Measurement Options None Voltage Option 1 2 AIN0 4 20 mA option 5 6 AIN1 4 20 mA option J13 Digital Inputs IN0 IN11 Pull Up Options 1 2 Inputs pulled up to K 4 6 Inputs pulled down to GND 5 6 Inputs pulled up to 5 V Table A 2 BL4S100 Jumper Configurations continued Header Description Pins...

Page 120: ...ort D Inactive high PC1 Input RXD Pulled up PC2 Output TXC A D converter Serial Port C Inactive high PC3 Input RXC A D converter Pulled up PC4 Output TXB serial flash Serial Port B Inactive high PC5 Input RXB serial flash Pulled up PC6 Output TXA programming port Serial Port A Low PC7 Input RXA programming port Pulled up PD0 Output RabbitNet CLK Clock signal PD1 Input XBee 1 button PD2 Output SCLK...

Page 121: ...thernet LINK Inactive high LED off PE6 Output XBee RTS Low PE7 Output Ethernet ACT Inactive high LED off BUFEN Output CS A D converter Inactive high CLK Output CLK to Rabbit RIO CPU clock Table A 3 Use of Rabbit Microprocessor Parallel Ports continued Port I O Signal Initial State ...

Page 122: ...C power supply is used to drive regulated 1 8 V and 3 3 V power supplies The digital ground and the analog ground share a single split ground plane on the board with the analog ground connected at a single point to the digital ground by a 0 resistor R63 This is done to minimize digital noise in the analog circuits and to eliminate the possibility of ground loops External connections to analog grou...

Page 123: ... BL4S100 does not drain the battery while it is powered up normally B 2 1 Replacing the Backup Battery 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 NOTE The SRAM contents and...

Page 124: ...BL4S100 User s Manual 122 APPENDIX C DEMONSTRATION BOARD Appendix C explains how to use the Demonstration Board with the BL4S100 sample programs ...

Page 125: ...7 C11 2 JP1 C6 C10 J1 8 7 2 1 D10 D11 C2 C3 C4 R4 U1 R6 R23 R5 C5 R26 R34 R13 R14 R15 R16 R17 R18 R19 R20 R21 R22 R12 R7 R8 R9 R10 R11 D12 U7 D15 U8 D14 D13 20 11 10 C58 L1 J9 C69 C74 R69 R72 R73 R74 U18 J10 2 1 J11 2 1 AIN0 AIN1 AIN2 AIN3 R87 R89 R90 R93 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND IN11 IN10 IN9 IN8 IN7 IN6 IN5 IN4 GND RST PWR AGND C65 C64 C68 R63 R65 L2 BT1 C86 C87 R86 U20 C96 C...

Page 126: ...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 GND LED1 LED2 LED3 LED4 V OUTPUTS J3 V_ALT SW4 SW3 SW2 SW1 GND J1 POWER INPUTS 3 3 kW V JP15 SW1 SW4 ACTIVE LOW 3 3 kW V JP1...

Page 127: ...ore 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 There is a potentiometer immediately above the V_ALT location to allow you to vary the voltage at V_ALT from 0 V to V Figure C 5 shows the location of the adjustable output voltage and the potentiometer Figure C 5 Location of Adjustable Output Voltage K...

Page 128: ...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 ...

Page 129: ...Digital I O Pin Associations Table D 1 Digital I O Pin Associations I O Pin Block Pin IN0 0 0 IN1 1 IN2 2 IN3 1 0 IN4 1 IN5 2 IN6 2 0 IN7 1 OUT0 2 OUT1 3 IN8 3 0 IN9 1 OUT2 2 OUT3 3 OUT4 4 2 OUT5 3 OUT6 5 2 OUT7 3 IN10 6 0 IN11 7 0 ...

Page 130: ...11 which indicates that pin 1 and pin 2 of the block used by IN2 have the conflicts they are using the counter 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 Therefore you cannot use IN2 as a counter input unless you remove the Quadrature Decoder inputs from...

Page 131: ...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 Table D 2 RIO Counter Timer Block Mode Summary Up Count Count Until Match Up Down Count Free Running Timer Count Until End Count fro...

Page 132: ...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 Appendix E describes how to mount the BL4S100 inside the plastic enclosure and provides details on mounting the assembly ...

Page 133: ... 2 1 AIN0 AIN1 AIN2 AIN3 R87 R89 R90 R93 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND IN11 IN10 IN9 IN8 IN7 IN6 IN5 IN4 GND RST PWR A G N D C65 C64 C68 R63 R65 L2 BT1 C86 C87 R86 U20 C96 C 91 C 92 C95 C97 C1 01 C1 02 C1 03 C1 04 C1 05 C1 06 C1 07 C1 08 R9 8 R9 9 R1 00 R1 01 R1 02 R1 03 R1 04 R1 05 R1 06 R1 07 R1 08 R1 09 R1 10 R1 11 R1 12 R1 13 ADC PROGRAMMER GND 2 J1 2 J15 R115 RP5 RP3 R94 R91 D1...

Page 134: ...A G N D C65 C64 C68 R63 R65 L2 BT1 C86 C87 R86 U20 C96 C 91 C 92 C95 C97 C1 01 C1 02 C1 03 C1 04 C1 05 C1 06 C1 07 C1 08 R9 8 R9 9 R1 00 R1 01 R1 02 R1 03 R1 04 R1 05 R1 06 R1 07 R1 08 R1 09 R1 10 R1 11 R1 12 R1 13 ADC PROGRAMMER GND 2 J1 2 J15 R115 RP5 RP3 R94 R91 D19 D20 D21 D22 D23 D24 D25 D26 RP4 J1 3 2 RP6 1 S3 J16 S4 C 11 4 2 7 8 J14 R 11 7 D27 DS3 DS4 J17 2 PWR IN L1 2 3 4 C93 D 18 C112 R 1...

Page 135: ...c 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 0 754 19 5 0 736 18 5 6 016 153 2 0 0 5 5 1 4 0 1 0 1 0 2 7 140 181 ...

Page 136: ...ibrar ies in different ways 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 C sample program does not ...

Page 137: ...h more than one 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 LIB Rabbit4000 XBee XBEE_API LIB 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 library define DEFAULT_CHANNELS ZB_DEFAULT_CHANNELS For exam...

Page 138: ...ow click Test Query again 4 Under the Modem Configuration tab click the Read button XCTU will now display the networking and I O parameters for the Digi XBee USB being used as the ZigBee coordinator Modem XBEE XB24 ZB Function Set ZIGBEE COORDINATOR API do not select other settings Version the version of the firmware included with the version of Dynamic C you are using should be of the type 21 5 N...

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

Page 140: ...rial ports could be listed If you select a serial port without the Digi XBee USB connected the XCTU response to Test Query will be communica tion with modem OK but the modem type will be unknown and the firmware ver sion will be blank If you a get a message that XCTU is unable to open the COM port verify that you selected the COM port with the USB Serial Port then try unplugging the Digi XBee USB ...

Page 141: ... getBegin 21 57 getCounter 57 getEnd 21 58 getMatch 74 globalSync 61 pulseDisable 72 pulseEnable 72 resetCounter 21 58 setCapture 21 55 setCounter 21 53 setDecoder 21 52 setDigIn 49 setDigOut 62 setDuty 70 setExtInterrupt 21 51 setFreq 69 setLimit 59 setOffset 71 setPPM 24 67 setPWM 24 65 setSyncIn 60 setSyncOut 73 pin associations 127 digital inputs capture setup 21 counter setup 21 counter timer...

Page 142: ...ions 133 mounting instructions 131 setup attach 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 6 connections 11 PROG connector 30 programming port 25 PWM PPM outputs 23 R Rabbit microprocessor parallel ports ...

Page 143: ... programs 36 PONG C 14 specifications BL4S100 dimensions 113 electrical 114 exclusion zone 115 headers 115 temperature 114 plastic enclosure dimensions 133 spectrum spreader settings 31 subsystems 17 T tamper detection 32 TCP IP connections 95 96 10Base T Ethernet card 95 additional resources 102 Ethernet hub 95 steps 95 Tool Kit 6 AC adapter 6 DC power supply 6 Demonstration Board 6 Dynamic C sof...

Page 144: ...l 142 SCHEMATICS The schematics for 090 0265 BL4S100 090 0252 USB Programming Cable and 090 Rab bit Demonstration Board are available at www digi com products embedded sys tems single board computers bl4s100 productsupport ...

Reviews: