Rabbit Wildcat BL2000 User Manual

Wildcat (BL2000)
C-Programmable Singl e-Boar d Comp ut er with Et hern et
User’s Manual
019–0094 090529–O
Wildcat (BL2000)
Digi International Inc.
Wildcat (BL2000) User’s Manual
Part Number 019-0094 • 090529–O • Printed in U. S.A.
©2001–2009 Digi International Inc. • All right s rese rved.
Digi International reserves the right to make changes and
improvements to its products without providing n otice.
T r ade mark s
Rabbit and Dynamic C are registered trademarks of Digi International Inc.
Rabbit 2000 is a trademark of Digi International Inc.
No part of the contents of this manual may be reproduced or transmitted in any form or by any means without the express written permission of Digi International.
Permission is granted to make one or more copies as long as the copyright page contained therein is included. These copies of the manuals may not be let or sold for any reason without the express written permission of Digi International.
The latest revision of this manual is available on the Rabbit Web s ite, www.rabb it.com, for free, unregistered download.
User’s Manual
TABLE OF CONTENTS
Chapter 1. Introduction 1
1.1 BL2000 Description..............................................................................................................................1
1.2 BL2000 Features...................................................................................................................................1
1.2.1 Connector Options........................................................................................................................2
1.3 Development and Evaluation Tools......................................................................................................3
1.3.1 Tool Kit.........................................................................................................................................3
1.3.2 Software........................................................................................................................................4
1.4 CE Compliance.....................................................................................................................................5
1.4.1 Design Guidelines.........................................................................................................................6
1.4.2 Interfacing the BL2000 to Other Devices.....................................................................................6
Chapter 2. Getting Started 7
2.1 BL2000 Connections............................................................................................................................7
2.2 Installing Dynamic C..........................................................................................................................10
2.3 Starting Dynamic C ............................................................................................................................11
2.4 PONG.C..............................................................................................................................................12
2.5 Where Do I Go From Here? ...............................................................................................................12
Chapter 3. Subsystems 13
3.1 BL2000 Pinouts..................................................................................................................................14
3.1.1 Headers and Screw Terminals.....................................................................................................15
3.1.2 Power Supply Pins......................................................................................................................16
3.2 Digital I/O...........................................................................................................................................17
3.2.1 Digital Inputs...............................................................................................................................17
3.2.2 Digital Outputs............................................................................................................................19
3.3 Relay Outputs .....................................................................................................................................21
3.4 Serial Communication ........................................................................................................................22
3.4.1 RS-232 ........................................................................................................................................22
3.4.2 RS-485 ........................................................................................................................................22
3.4.3 Ethernet Port ...............................................................................................................................24
3.4.4 Programming Port.......................................................................................................................25
3.5 A/D Converter Inputs..........................................................................................................................27
3.6 D/A Converter Outputs .......................................................................................................................28
3.7 Memory...............................................................................................................................................30
3.7.1 SRAM .........................................................................................................................................30
3.7.2 Flash Memory.............................................................................................................................30
3.8 Programming Cable............................................................................................................................31
3.8.1 Changing Between Program Mode and Run Mode....................................................................31
3.9 Other Hardware...................................................................................................................................32
3.9.1 External Interrupts.......................................................................................................................32
3.9.2 Clock Doubler.............................................................................................................................32
3.9.3 Spectrum Spreader......................................................................................................................33
Chapter 4. Software 35
4.1 An Overview of Dynamic C...............................................................................................................35
4.1.1 Upgrading Dynamic C................................................................................................................37
Wildcat (BL2000)
4.2 Sample Programs................................................................................................................................38
4.2.1 General BL2000 Sample Programs............................................................................................38
4.2.2 Digital I/O...................................................................................................................................38
4.2.3 Serial Communication................................................................................................................39
4.2.4 A/D Converter Inputs.................................................................................................................39
4.2.5 D/A Converter Outputs...............................................................................................................40
4.2.6 Real-Time Clock ........................................................................................................................40
4.2.7 TCP/IP Sample Programs...........................................................................................................40
4.3 BL2000 Libraries...............................................................................................................................41
4.4 BL2000 Function Calls......................................................................................................................42
4.4.1 Board Initialization.....................................................................................................................42
4.4.2 Digital I/O...................................................................................................................................44
4.4.3 Serial Communication................................................................................................................45
4.4.4 Relay and LED Outputs..............................................................................................................46
4.4.5 A/D Converter Inputs.................................................................................................................47
4.4.6 D/A Converter Outputs...............................................................................................................50
Chapter 5. Using the TCP/IP Features 53
5.1 TCP/IP Connections...........................................................................................................................53
5.2 TCP/IP Sample Programs...................................................................................................................55
5.2.1 How to Set IP Addresses in the Sample Programs .....................................................................55
5.2.2 How to Set Up your Computer’s IP Address for a Direct Connection ......................................56
5.3 Run the PINGME.C Sample Program................................................................................................57
5.4 Running More Sample Programs With a Direct Connection.............................................................58
5.5 Where Do I Go From Here?...............................................................................................................58
Appendix A. Specifications 59
A.1 Electrical and Mechanical Specifications..........................................................................................60
A.1.1 Headers......................................................................................................................................63
A.2 Conformal Coating............................................................................................................................64
A.3 Jumper Configurations......................................................................................................................65
A.4 Use of Rabbit 2000 Parallel Ports..................................................................................................... 67
Appendix B. Plastic Enclosure 69
B.1 Assembly...........................................................................................................................................70
B.2 Dimensions........................................................................................................................................72
Appendix C. Power Supply 73
C.1 Power Supplies..................................................................................................................................73
C.1.1 Power for Analog Circuits.........................................................................................................74
C.2 Batteries and External Battery Connections........................................... ...... ...... ...............................74
C.2.1 Replacing the Backup Battery...................................................................................................75
C.2.2 Battery-Backup Circuit..............................................................................................................75
C.2.3 Power to VRAM Switch............................................................................................................76
C.2.4 Reset Generator..........................................................................................................................77
C.3 Chip Select Circuit.............................................................................................................................78
Appendix D. Demonstration Board 81
D.1 Connecting Demonstration Board.....................................................................................................81
Index 85
Schematics 89
User’s Manual 1
1. INTRODUCTION
The BL2000 is a high-performance, C-programmable single­board computer that offers built-in digital and analog I/O com­bined with Ethernet connectivity in a compact form factor. A
Rabbit
®
2000 microprocessor operating at 22.1 MHz provides fast data processing. An optional plastic enclosure is available, and may be wall-mounted or panel-mounted.
1.1 BL2000 Description
The BL2000 is an advanced single-board computer that incorporates the powerful Rabbit 2000 microprocessor, flash memory, static RAM, digital I/O ports, A/D converter inputs, D/A converter outputs, an SPDT relay output, and a 10Base-T Ethernet port.
1.2 BL2000 Features
Rabbit® 2000 microprocessor operating at 22.1 MHz.
128K static RAM and 256K flash memory.
Up to 28 digital I/O:
11 protected digital inputs (plus up to 7 dual-purpose unbuffered analog inputs that
may be software-configured for use as digital inputs) and 10 high-current digital sinking outputs that may be factory-configured as sourcing outputs.
11 analog channels: nine 12-bit A/D converter inputs, two 12-bit D/A converter outputs.
Onboard SPDT relay .
One RJ-45 Ethernet port compliant with IEEE 802.3 standard for 10Base-T Ethernet
protocol.
Eight status LEDs.
4 serial ports (2 RS-232 or 1 RS-232 with RTS/CTS, 1 RS-485, and 1 CMOS-compati-
ble programming port).
Real-time clock.
Watchdog supervisor.
Voltage regulator.
2 Wildcat (BL2000)
Backup battery.
Ability to send e-mail and serve Web pages containing embedded data from single-
board computer.
Remote program downloading and debugging capability via RabbitLink.
Boards with the CE mark are CE-compliant.
Optional plastic enclosure (can be wall-mounted or panel-mounted) and LED light
pipes (enclosure and light pipes are included with the Tool Kit, and are also sold sepa­rately).
Appendix A provides detailed specifications. Four models of the BL2000 are available. Their standard features are summarized in
Table 1.
1.2.1 Connector Options
In addition to the standard screw-terminal connectors supplied on BL2000 boards, IDC headers, bottom-mount connectors, and polarized friction-lock terminals may be factory­installed instead. Visit our Web site at www.rabbit.com or contact your Rabbit sales repre- sentative or authorized distributor for further information.
Table 1. BL2000 Series Features
Model Features
BL2000 Full-featured single-board computer.
BL2010
BL2000 with eleven 10-bit A/D converter inputs (no D/A
converter outputs). BL2020 BL2000 without Ethernet interface, only 6 LEDs. BL2030 BL2010 without Ethernet interface, only 6 LEDs.
Standard screw terminals, accept up to 14 AWG (1.5 mm
2
) wire
“Bottom-mount connector” to mount BL2000 directly on 0.1" pitch pins located on motherboard
2 × 17 IDC headers, 0.1" pitch
Polarized friction-lock terminals,
0.1" pitch
User’s Manual 3
1.3 Development and Evaluation Tools
1.3.1 Tool Kit
A T ool Kit contains the hardware essentials you will need to use your own BL2000 single­board computer. The items in the Tool Kit and their use are as follows:
Getting Started instructions.
Dynamic C CD-ROM, with complete product documentation on disk.
Programming cable, used to connect your PC serial port to the BL2000.
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 BL2000 to demonstrate the I/O.
Wire assembly to connect Demonstration Board to BL2000.
Plastic enclosure with four screws and eight customer-installable light pipes.
Screwdriver.
Rabbit 2000 Processor Easy Reference poster.
Registration card.
Figure 1. BL2000 Tool Kit
Rabbit and Dynamic C are registered trademarks of Digi International Inc.
Wildcat (BL2000)
The BL2000 provides optional Ethernet connectivity in a low-cost, high-performance single-board computer rich with the digital I/O, A/D, and D/A designers need for embedded control and monitoring applications on a compact board. These Getting Started instructions included with the Tool Kit will help you get your BL2100 up and running so that you can run the sample programs to explore its capa­bilities and develop your own applications.
Tool Kit Contents
The BL2000 Tool Kit contains the following items:
Dynamic C CD-ROM, with complete product documentation on disk.
Programming cable, used to connect your PC serial port to the BL2000.
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 BL2000 to demonstrate the I/O.
Wire assembly to connect Demonstration Board to BL2000.
Plastic enclosure with four screws and eight customer-installable light pipes.
Screwdriver.
Getting Started instructions.
Rabbit 2000 Processor Easy Reference poster.
Registration card.
Visit our online Rabbit store at www.rabbit.com/store/ for the latest information on peripherals and accessories that are available for the BL2000 single-board computers.
Step 1 — Install Dynamic C
®
Before doing any development, you must install Dynamic C. Insert the CD from the Development Kit in your PC’s CD-ROM drive. If the installation does not auto-start, run the setup.exe program in the root directory of the Dynamic C CD. Install any Dynamic C modules after you install Dynamic C
.
PROG
DIAG
Programming
Cable
Screwdriver
Plastic Enclosure
Getting Started
Instructions
LED Light Pipes
Demo Board
Demo Board Wiring Harness
Universal
AC Adapter
with Plugs
·
B
U
Z
Z
E
R
·
L
E
D
4
·
L
E
D
3
·
L
E
D
2
·
L
E
D
1
·
K
·
+
5
V
·
S
W
4
·
S
W
3
·
S
W
2
·
S
W
1
·
G
N
D
BUZZER
H
1
J
1
H2
· ·
1-2
· ·
3-4
· ·
5-6
LED1 LED2 LED3 LED4
SW1 SW2 SW3 SW4
·
·
8
-
7
·
·
6
-
5
·
·
4
­3
·
·
2
-
1
DEMO BOARD
4 Wildcat (BL2000)
1.3.2 Software
The BL2000 is programmed using version 7.04 or later of Rabbit’s Dynamic C. A compat-
ible version is included on the Tool Kit CD-ROM.
Dynamic C v. 9.60 includes the popular µC/OS-II real-time operating system, point-to-point protocol (PPP), FAT file system, RabbitWeb, and other select libraries that were previously sold as individual Dynamic C modules.
Rabbit also offers for purchase the Rabbit Embedded Security Pack featuring the Secure Sockets Layer (SSL) and a specific Advanced Encryption Standard (AES) library. In addi­tion 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 for further information and complete documentation, or contact your
Rabbit sales representative or authorized distributor.
User’s Manual 5
1.4 CE Compliance
Equipment is generally divided into two classes.
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.
The BL2000 single-board computer has been tested and was found to be in conformity with the following applicable immunity and emission standards. The BL2010, BL2020, and BL2030 single-board computers are also CE qualified as they are sub-versions of the BL2000 single­board computer. Boards that are CE-compliant have the CE mark.
NOTE: Earlier versions of the BL2000 sold before 2003 that do not have the CE mark
are not CE-compliant.
Immunity
The BL2000 series of single-board computers meets the following EN55024/1998 immu­nity 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 BL2000 series of single-board computers meets the following emission standards using the enhanced-EMI PCB, Part# 175-0224 Rev. A, and the 668-0003 Rev. A Rabbit 2000 microprocessor.
EN55022:1998 Class B
FCC Part 15 Class B
Your results may vary, depending on your application, so additional shielding or filtering may be needed to maintain the Class B emission qualification.
CLASS A CLASS B
Digital equipment meant for light industrial use Digital equipment meant for home use Less restrictive emissions requirement:
less than 40 dB µV/m at 10 m (40 dB relative to 1 µV/m) or 300 µV/m
More restrictive emissions requirement: 30 dB µV/m at 10 m o r 100 µV/m
6 Wildcat (BL2000)
1.4.1 Design Guidelines
Note the following requirements for incorporating the BL2000 series of single-board com­puters into your application to comply with CE requirements.
General
The power supply provided with the Tool Kit is for development purposes only. It is the
customer’s responsibility to provide a CE-compliant power supply for the end-product application.
When connecting the BL2000 single-board computer to outdoor cables, the customer is
responsible for providing CE-approved surge/lighting protection.
Rabbit recommends placing digital I/O or analog cables that are 3 m or longer in a
metal conduit to assist in maintaining CE compliance and to conform to good cable design practices.
When installing or servicing the BL2000, it is the responsibility of the end-user to use
proper ESD precautions to prevent ESD damage to the BL2000.
Safety
All inputs and outputs to and from the BL2000 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 BL2000 single-board computer has been
designed to protect the battery from hazardous conditions such as reverse charging and excessive current flows. Do not disable the safety features of the design.
1.4.2 Interfacing the BL2000 to Other Devices
Since the BL2000 series of single-board computers is designed to be connected to other devices, good EMC practices should be followed to ensure compliance. CE compliance is ultimately the responsibility of the integrator. Additional information, tips, and technical assistance are available from your authorized Rabbit distributor, and are also available on our Web site at www.rabbit.com.
User’s Manual 7
2. GETTING S TARTED
Chapter 2 explains how to connect the programming cable and power supply to the BL2000.
2.1 BL2000 Connections
1. Attach the BL2000 to the plastic enclosure base. Position the BL2000 over the plastic enclosure base as shown below in Figure 2. Attach
the BL2000 to the base at the top left and bottom right positions using the two 4-40 × ¼ screws supplied with the enclosure.
Figure 2. Attach BL2000 to Plastic Enclosure Base
The plastic enclosure base facilitates handling the BL2000 during development, and pro­vides an attractive mounting alternative. Alternatively, you may wish to use standoffs to protect the components on the other side of the board. The plastic enclosure is offered as a separate option when individual BL2000 boards are purchased.
NOTE: Appendix B, “Plastic Enclosure,” provides additional information and specifications
for the plastic enclosure.
14
23
L1
D2
J8
POWER IN
J7
T
V S 1
J10
+
C28
R1
C23
C25
C17
J6
C20
D1
U4
Y3
Q2
C24
R30
R 1 5
1
R4
C16
R20
R6
R12
C10
J5
R19
C80
R16
R130
U1
C2
C3
C19
R153
C18
R154
R9
R13
R15
C1
Y2
R 2 7
C 2 2
C 2 7
R
2
8
9
0
1
5
6 5
4
0
U5
R 5
5
R 5 4
R 3 7
R 3 6
R 3 8
R 5 6
C 4
0
C 3
9
C 3
8
R
5
0
R
5
1
R
5
2
R 5
8
R 5 9
R 6 0
C 3 5
C 3 4
C 3
3
C31
+
C29
R33
R31
C 3
6
U6
R32 R34 R35
C 4 1
R
5
3
R 6
1
D5
D4
R41
R42
D3
R40
R 5
7
R 3
9
C45
C44
C43
J2
J1
J4
J3
D6
D7 D8 D9
J9
J11
R43 R44
R45
C49C48
C47
C46
+
+
BT1
D
G
S
Q3
Q5
C32
D10
D11 D12
R46
R47
R48
R49
C51
C52
C50
C8
U2
R5
R 1 1
R 1 0
C75
C 1
1
R17
C4
C13
U3
R8
R18
R2
R3
R 2 3
R22
C 1
4
R152
R7
C78
C77
C76
C79
C5
C 1 5
1432
Y1
C26
Q4
Q1
R
2
5
R
2
4
R29
C21
R 2 6
1
56
1 0
K1
+
C9
R14 C12
R21
C7
J12
D S 1
D S 4
D S
3
D S
2
Q6
C 3 7
C
4
2
D S
5
D S 6
D S 7
DS8
GND
IN3IN2 IN4 IN5 IN6 IN7 IN8 IN9 IN10 OUT8 OUT9 GND GNDOUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 NC
GND RST- IN1 IN0 485- 485+ RXD2 TXD2 RXD1 TXD1 AGND DAC1 DAC0 ADC8 ADC7 ADC6ADC5 ADC4 ADC3ADC2 ADC1 ADC0+RAW +K
NO
COM
GND
GND
GND
GN D
GND
GND
GND
GNDGNDGNDGND
GN D
GND GND
GND
GND GND
GN D
AGND
AGND
AGND
AGND
AGND
AG ND
P
W
R
L
N
K
A
C
T
O
U
T
0
O
U
T
1
O
U
T
2
O
U
T
3
B
A
D
JP2
Battery
CAUTION
C85
J P 1
R 1 5
7
8 Wildcat (BL2000)
2. Connect the programming cable to download programs from your PC and to debug the BL2000.
Connect the 10-pin
PROG connector of the programming cable to header J5 on the BL2000.
Ensure that the colored edge lines up with pin 1 as shown. (Do not use the DIAG connector,
which is used for a normal serial connection.) Connect the other end of the programming
cable to a COM port on your PC.
Figure 3. Programming Cable Connections
NOTE: Never disconnect the programming cable by pulling on the ribbon cable. Carefully
pull on the connector to remove it from the header.
NOTE: Some PCs now co me equipped only with a USB port. It m ay be possible to use an
RS-232/USB converter (Part No. 20-151-0178) with the programming cable supplied with the Tool Kit. Note that not all RS-232/USB converters work with Dynamic C.
R1
C23
C25
C17
J6
C20
U4
Y3
Q2
C24
R30
R151
R4
C16
R20
R6
R12
C10
J5
R19
C80
R16
R130
U1
C2
C3
C19
R153
C18
R154
R9
R13
R15
C1
Y2
R27C22
C27
R28
90
15
65
40
U5
J2
J1
J4 J3
C8
U2
R5
R11
R10
C75
C11
R17
C4
C13
U3
R8
R18
R2
R3
R23
R22
C14
R152
R7
C78
C77
C76
C79
C5
C15
1432
Y1
C26
Q4
Q1
R25
R24
R29
C21
R26
1
56
10
K1
+
C9
R14
C12
R21
C7
J12
DS1
DS4
DS3
DS2
GND RST- IN1 IN0 485- 485+ RXD2 TXD2 RXD1 TXD1 AGND DAC1 DAC0 ADC8 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 ADC1 ADC0+RAW +K
GND GND
GND
GND GND
GN D
AGND
AGND
AGND
AGND
AGND
AG ND
PWRLNKACTOUT 0
JP2
Colored edge
Programming Cable
To
PC COM port
C85
JP1
R157
PROG
J5
DIAG
PROG
Red
shrink wrap
User’s Manual 9
3. Connect the power supply. First, prepare the AC adapter for the country where it will be used by selecting the plug.
The BL2000 Tool Kit presently includes Canada/Japan/U.S., Australia/N.Z., U.K., and European style plugs. Snap in the top of the plug assembly into the slot at the top of the AC adapter as shown in Figure 4, then press down on the spring-loaded clip below the plug assembly to allow the plug assembly to click into place.
Connect the bare ends of the power supply to the +RAW and GND positions on screw- terminal header J2 as shown in Figure 4.
Figure 4. Power Supply Connection
4. Apply power. Plug in the AC adapter. If you are using your own power supply , it must provide 9 V to 40 V
DC—voltages outside this range could damage the BL2000.
CAUTION: Unplug the power supply while you make or otherwis e work with t he co nnection s
to the headers. This will prot ect your BL2000 fr om ina dver tent shor ts or power spikes.
NOTE:
The green PWR LED and the red BAD LED on the opposite end of the board
should come on, indicating that the BL2000 is now ready to be used.
NOTE: A hardware RESET is done by unplugging the AC adapter, then plugging it back in,
or by momentarily grounding the board reset input at pin 9 on screw-terminal header J2.
14
23
L1
D2
J8
POWER IN
J7
TVS1
J10
+
C28
R1
C23
C25
C17
J6
C20
D1
U4
Y3
Q2
C24
R30
R151
R4
C16
R20
R6
R12
C10
J5
R19
C80
R16
R130
C19
R153
R154
R9
R13
R15
C1
Y2
R27C22
C27
R28
U5
R55
R54
R37
R36
R38
R56
C40
C39
C38R50
R51
R52
R58
R59
R60
C35
C34
C33
C31
+
C29
R33
R31
C36
R32 R34 R35
C41R53
R61
D4
R41
D3
R40
R57
R39
C44
C43
J2
J1
GND
IN3IN2 IN4 IN5 IN6 IN7 IN8 IN9 IN10 OUT8 OUT9 GND
GND RST- IN1 IN0 485- 485+ RXD2 TXD2 RXD1 TXD1+RAW +K
GND
GNDGNDGNDGND
GN D
GND GND
GND
GND GND
GN D
RESET
PIN
Remove slot cover, insert tab into slot
Snap plug into place
2
1
Assemble
AC Adapter
J2
+
Red
Heat-Shrink
Tubing
10 Wildcat (BL2000)
2.2 Installing Dynamic C
If you have not yet installed Dynamic C version 7.04 (or a later version), do so now by inserting the Dynamic C CD in your PC’s CD-ROM drive. The CD will auto-install unless you have disabled auto-install on your PC.
If the CD does not auto-install, click Start > Run from the Windows St art button and browse for the Dynamic C setup.exe file on your CD drive. Click OK to begin the installation once you have selected the
setup.exe file.
The online documentation is installed 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 documents are always available for free, unregistered download from our web sites as well.
The Dynamic C User’s Manual provides detailed instructions for the installation of Dynamic C and any future upgrades.
NOTE: If you have an ea rl ier ve rs ion of Dynamic C alrea dy i ns tal l ed, t he default installat io n
of the later versi on wi ll be in a diff erent folder, and a separate icon will appear o n you r d esk­top.
User’s Manual 11
2.3 Starting Dynamic C
Once the BL2000 is connected to your PC and to a power source, start Dynamic C by double-clicking on the Dynamic C icon on your desktop or in your Start menu.
Dynamic C defaults to using the serial port on your PC that you specified during installa­tion. If the port setting is correct, Dynamic C should detect the BL2000 and go through a sequence of steps to cold-boot the BL2000 and to compile the BIOS. (Some versions of Dynamic C will not do the init ial BIOS compile and load until the first t ime you compile a program.)
If you are using a USB port to connect your computer to the BL2000, choose
Options >
Project Options
and select “Use USB to Serial Converter.” Click OK.
If 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 system may not be powered up. First, check both ends of the programming cable to ensure that it is firmly plugged into the PC and the programming port.
If there are no faults with the hardware, select a different COM port within Dynamic C. From the Options menu, select Communications. Select another COM port from the list, then click OK. Press <Ctrl-Y> to force Dynamic C to recompile the BIOS. If Dynamic C still reports it is unable to locate the target system, repeat the above steps until you locate the active COM port. You should receive a Bios compiled successfully message once this step is completed successfully.
If Dynamic C appears to compile the BIOS successfully, but you then receive a communi­cation error message when you compile and load a sample program, it is possible that your PC cannot handle the higher program-loading baud rate. Try changing the maximum download rate to a slower baud rate as follows.
Locate the Serial Options dialog in the Dynamic C Options > Communications menu. Select a slower Max download baud rate.
If a program compiles and loads, but then loses target communication before you can begin debugging, it is possible that your PC cannot handle the default debugging baud rate. Try lowering the debugging baud rate as follows.
Locate the
Serial Options dialog in the Dynamic C Options > Communications
menu. Choose a lower debug baud rate.
12 Wildcat (BL2000)
2.4 PONG.C
You are now ready to test your set-up by running a sample program. Find the file PONG.C, which is in the Dynamic C SAMPLES folder. To run the program,
open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The STDIO window will open and will dis­play a small square bouncing around in a box.
This program does not test the serial ports, the I/O, or the TCP/IP part of the board, but does ensure that the board is basically functional. The sample program described in Section 5.3, “Run the PINGME.C Sample Program,” tests the TCP/IP portion of the board.
2.5 Where Do I Go From Here?
NOTE: If you purchased your BL2000 through a distributor or Rabbit partner, contact the
distributor or partner first for technical support.
If there are any problems at this point:
Use the Dynamic C Help menu to get further assistance with Dynamic C.
Check the Rabbit Technical Bulletin Board and forums at www.rabbit.com/support/bb/
and at www.rabbit.com/forums/.
Use the Technical Support e-mail form at www.rabbit.com/support/. If the sample program ran fine, you are now ready to go on to explore other BL2000 fea-
tures and develop your own applications. Chapter 3, “Subsystems,” provides a description of the BL2000’s features, Chapter 4,
“Software,” describes the Dynamic C software libraries and introduces some sample pro­grams, and Chapter 5, “Using the TCP/IP Features,” explains the TCP/IP features.
User’s Manual 13
3. SUBSYSTEMS
Chapter 3 describes the principal subsystems for the BL2000.
• Digital I/O
• Relay Outputs
• Serial Communication
• A/D Converter Inputs
• D/A Converter Outputs
• Memory
• External Interrupts
Figure 5 shows these Rabbit-based subsystems designed into the BL2000.
Figure 5. BL2000 Subsystems
SRAM
Flash
11 MHz
osc
32 kHz
osc
BL2000
RABBIT
2000
RS-232
RS-485
A/D
Converter
Digital
Outputs
Relay
Output
Programming
Port
Digital Inputs
Ethernet
D/A
Converter
14 Wildcat (BL2000)
3.1 BL2000 Pinouts
The BL2000 pinouts are shown in Figure 6(a) and Figure 6(b).
Figure 6(a). BL2000 Pinouts (screw-terminal headers)
Battery
Serial Port Nomenclature
HeaderJ2
TXD1 RXD1 TXD2 RXD2
Rabbit 2000
TxB
RxB
TxC/RTS
RxC/CTS
+RAW
GND
+K
/RESET
IN1
IN0
485
485+
RXD2
TXD2
RXD1
TXD1
J2
12
11
10
9
8
7
6
5
4
3
2
1
J8
AGND
DAC1
DAC0
ADC8
ADC7
ADC6
ADC5
ADC4
ADC3
ADC2
ADC1
ADC0
J4
12
11
10
9
8
7
6
5
4
3
2
1
J8
J12
GND
VBATEXT
GND
OUT0
OUT1
OUT2
OUT3
OUT4
OUT5
OUT6
OUT7
NO
COM
NC
GND/VCC
J9
1
2
3
4
5
6
7
8
9
10
11
12
J8
1
2
3
4
5
6
7
8
9
10
11
12
J8
IN2
IN3
IN4
IN5
IN6
IN7
IN8
IN9
IN10
OUT8
OUT9
GND
J8
DS8
DS7
DS6
DS5
DS4
DS3
DS2
DS1
BAD OUT3 OUT2 OUT1 OUT0 ACT LNK PWR
J6
J7
User’s Manual 15
3.1.1 Headers and Screw Terminals
All BL2000 models are equipped with 1 × 12 screw terminal strips (J2, J4, J8, and J9) and a 2-pin power jack (J7). The BL2000 and BL2010 also have the RJ-45 Ethernet jack (J6).
There is provision on the circuit board to accommodate one of the following types of connectors instead of the screw-terminal strips.
2 × 17 IDC headers with a pitch of 0.1".
1 × 17 friction-lock connectors with a pitch of 0.1".
1 × 17 bottom-mount sockets with a pitch of 0.1". The holes for the bottom-mount
sockets are on the “outside” edges of the connector locations
The pinouts for these connectors are shown in Figure 6(b).
Figure 6(b). BL2000 Pinouts (other 0.1" headers)
Battery
Serial Port Nomenclature
HeaderJ2
TXD1
RXD1
TXD2
RXD2
Rabbit 2000
TxB RxB
TxC/RTS
RxC/CTS
+RAW GND GND +K /RESET GND IN1 IN0 GND 485 485+ GND RXD2 TXD2 GND RXD1 TXD1
J1
AGND DAC1 AGND DAC0 ADC8 AGND ADC7 ADC6 AGND ADC5 ADC4 AGND ADC3 ADC2 AGND ADC1 ADC0
J3
J12
GND
VBATEXT
GND
OUT0 OUT1
GND OUT2 OUT3
GND OUT4 OUT5
GND OUT6 OUT7
GND
NO
COM
GND
NC
GND/VCC
J11
IN2 IN3
GND
IN4 IN5
GND
IN6 IN7
GND
IN8
IN9 GND IN10
OUT8
GND
OUT9
GND
J10
DS8
DS7
DS6
DS5
DS4
DS3
DS2
DS1
BAD OUT3 OUT2 OUT1 OUT0 ACT LNK PWR
J6
J7
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33
33 31 29 27 25 23 21 19 17 15 13 11
9 7 5 3 1
33 31 29 27 25 23 21 19 17 15 13
11
9 7 5 3 1
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33
16 Wildcat (BL2000)
3.1.2 Power Supply Pins
Instead of connecting an AC adapter to the power supply jack, J7, the input power supply (9 V to 40 V DC) may be connected to pins 12 and 11 on header J2 (see Figure 6(a) or Figure 6(b)).
Pin 12 on header J9 or J10 is normally GND by factory default, but may be changed to Vcc by removing resistor R161 and installing resistor R160. See Appendix C, “Power Supply,” for more information on this configuration and for information on backup­battery options.
User’s Manual 17
3.2 Digital I/O
3.2.1 Digital Inputs
The BL2000 has 11 digital inputs, IN0–IN10, each of which is protected over a range of –36 V to +36 V. The inputs are factory-configured to be pulled up to +5 V, but they can also be pulled down by moving the surface-mounted jumper at JP6 as shown in Figure 7.
Figure 7(a). BL2000 Digital Inputs [Pulled Up—JP6(1–2) connected]
Figure 7(b). BL2000 Digital Inputs [Pulled Down—JP6(2–3) connected]
JP6
10 nF
22 kW
27 kW
Rabbit 2000
Microprocessor
Factory Default
Vcc
1
3
GND
JP6
JP6
10 nF
22 kW
27 kW
Rabbit 2000
Microprocessor
Vcc
1
3
GND
+5 V
JP6
18 Wildcat (BL2000)
Figure 7(c). Example of Logic Gate Driving BL2000 Digital Input
The actual switching threshold is approximately 2.40 V for channels IN0–IN10. Anything below this value is a logic 0, and anything above is a logic 1.
The A/D converter inputs can be used as additional digital inputs using the parameters specified for the digIn software function call. The default threshold for channels IN11– IN21 is also set to 2.40 V, but may be changed by adding two lines to your program as dis­cussed for the digIn software function call.
The digital inputs are each fully protected over a range of -36 V to +36 V, and can handle short spikes of ±40 V.
Figure 8. BL2000 Digital Input Protected Range
10 nF
22 kW
27 kW
Rabbit 2000
Microprocessor
Vcc
1
3
JP6
+40 V
+36 V
+3.3 V
40 V
Normal Switching
Levels
Spikes
Digital Input Voltage
Spikes
Spikes
User’s Manual 19
3.2.2 Digital Outputs
The BL2000 has 10 digital outputs, OUT0–OUT9, each of which can either sink or source up to 200 mA, depending on how the outputs are configured. On boards that carry the CE mark, OUT8 and OUT9 are each capable of sinking up to 750 mA.
Each output can be configured individually as either a sinking or a sourcing output as shown in Figure 9. The outputs can be pulled as a group to Vcc, +K, or GND through 27 k resis­tors. Tie the outputs high to either Vcc or +K when using the outputs as sinking outputs (via 0 resistors at R32 or R35 respectively), or tie the outputs to GND via R34 when using the outputs as sourcing outputs. +K is an externally supplied voltage of up to 40 V DC, and is used primarily in combination with current sourcing outputs, and must also be connected to an external supply when an inductive load is connected to a sinking output.
NOTE: Remove the 27 kΩ resistors (R143–R150) from the output circuits if no pull-
up/down is required to avoid leakage between the outputs. These resistors are located on the bottom side of the BL2000 board above the solder points for screw terminal header J9.
Vcc
27 kW
Vcc
27 kW
K
SINKING OUTPUTFactory Default
0 W
0 W
SOURCING OUTPUTSpecial Order
K
20 Wildcat (BL2000)
Figure 9. BL2000 Digital Outputs
The locations of the output pull-up/pull-down select resistors R32, R34, and R35 are shown in Figure 10.
Figure 10. Locations of Resistors R32, R34, and R35
All BL2000 models are factory-configured with sinking outputs and pull-up resistors tied to Vcc via a 0 resistor at R32.
14
23
L1
D2
J8
POWER IN
J7
TVS1
J10
+
C28
C25
D1
Q2
R30
R55
R54
R37
R36
R38
R56
C40
C39
C38R50
R51
R52
R58
R59
R60
C35
C34
C33
C31
+
C29
R33
R31
C36
U6
R32 R34 R35
C41R53
R61
D5
D4
R41
R42
D3
R40
R57
R39
C45
C44
C43
D6
D7 D8 D9
J9
J11
R43 R44
R45
C49C48
C47
C46
+
+
BT1
D
G
S
Q3
Q5
C32
D10
D11 D12
R46
R47
R48
R49
C51
C52
C50
C26
Q4
R29
DS4
Q6
C37
C42
DS5
DS6
DS7
DS8
GND
IN3IN2 IN4 IN5 IN6 IN7 IN8 IN9 IN10 OUT8 OUT9 GND GND/VCCOUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 NCNO
COM
GND
GND
GND
GN D
GND
GND
GND
GNDGNDGNDGND
GN D
OUT 0OUT 1OUT 2OUT 3BAD
SRAM
R32 R34 R35
Battery
User’s Manual 21
3.3 Relay Outputs
Figure 11 shows the BL2000 relay contact connections. A diode across the coil provides a return path for inductive spikes, and snubbers across the relay contacts protect the relay contacts from inductive spikes.
Figure 11. BL2000 Relay Output Contact Connections
The relay is driven by PA0, which is the same Rabbit 2000 parallel port that drives OUT0 and LED DS4. OUT0 therefore works in parallel with the relay output.
The relay included on the BL2000 has contacts rated for 1 A @ 30 V DC or 300 mA @ 120 V AC. When using the BL2000 in a CE-certified application, the voltages handled by the relay must not exceed SELV levels (42.4 V AC peak, or 60 V DC).
7
8
9
1
10
COM
NO
NC
4
3
2
COM
NO
NC
Vcc
47 W
100 nF
47 W
100 nF
J9
9
10
11
Rabbit 2000
Microprocessor
22 Wildcat (BL2000)
3.4 Serial Communication
The BL2000 has one RS-232 serial channel (with RTS/CTS) or two RS-232 (3-wire) channels, one RS-485 serial channel, and one CMOS serial channel. The RS-232 chan­nel(s) are configured with the serMode software function call. Table 2 summarizes the options.
All four serial ports operate in an asynchronous mode. An asynchronous port can handle 7 or 8 data bits. A 9th bit address scheme, where an additional bit is sent to mark the first byte of a message, is also supported. Serial Port A can be operated alternately in the clocked serial mode. In this mode, a clock line synchronously clocks the data in or out. Either of the two communicating devices can supply the clock. The BL2000 series boards typically use all four ports in the asynchronous serial mode. Serial Ports B and C are used for RS-232 communication, and Serial Port D is used for RS-485 communication. The BL2000 uses an 11.0592 MHz crystal, which is doubled to 22.1184 MHz. At this fre­quency, the BL2000 supports standard baud rates up to a maximum of 230,400 bps.
3.4.1 RS-232
The BL2000 RS-232 serial communication is supported by an RS-232 transceiver , U1. U1 provides the voltage output, slew rate, and input voltage immunity required to meet the RS-232 serial communication protocol. Basically, the chip translates the Rabbit 2000’s CMOS/TTL signals to RS-232 signal levels. Note that the polarity is reversed in an RS-232 circuit so that a +5 V output becomes approximately -10 V and 0 V is output as +10 V. U1 also provides the proper line loading for reliable communication.
RS-232 can be used effectively at this baud rate for distances up to 15 m.
3.4.2 RS-485
The BL2000 has one RS-485 serial channel, which is connected to the Rabbit 2000 Serial Port D through U8, an RS-485 transceiver.
U8 supports the RS-485 serial communication
protocol. The chip’s slew rate limiters provide for a maximum baud rate of
230,400
bps
, which allows for a network of up to 300 m (or 1000 ft). The half-duplex communication uses the Rabbit 2000’s PB6 pin to control the transmit enable on the communication line.
The BL2000 can be used in an RS-485 multidrop network. Connect the 485+ to 485+ and 485– to 485– using single twisted-pair wires (nonstranded, tinned) as shown in Figure 12. Note that a common ground is recommended.
Table 2. Serial Communication Configurations
Mode
Serial Port
B C D
0 RS-232, 3-wire RS-232, 3-wire RS-485 1 RS-232, 5-wire CTS/RTS RS-485
User’s Manual 23
Figure 12. Multidrop BL2000 Network
R1
C17
C20
Y3
R4
C16
R20
R6
R12
C10
J5
R19
C80
R16
R130
U1
C2
C3
C19
R153
C18
R154
R9
R13
R15
C1
Y2
U5
J2
J1
J4
J3
C8
U2
R5
R11
R10
C75
C11
R17
C4
C13
U3
R8
R18
R2
R3
R23
R22
C14
R152
R7
C78
C77
C76
C79
C5
C15
Q1
R24
C21
+
C9
R14
C12
R21
C7
J12
DS1
DS2
GND RST- IN1 IN0 485- 485+ RXD2 TXD2 RXD1 TXD1 AGND DAC1 DAC0 ADC8 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 ADC1 ADC0+RAW +K
GND GND
GND
GND GND
GN D
AGND
AGND
AGND
AGND
AGND
AG ND
PWRLNK
JP2
C85
JP1
R157
R1
C17
C20
Y3
R4
C16
R20
R6
R12
C10
J5
R19
C80
R16
R130
U1
C2
C3
C19
R153
C18
R154
R9
R13
R15
C1
Y2
U5
J2
J1
J4
J3
C8
U2
R5
R11
R10
C75
C11
R17
C4
C13
U3
R8
R18
R2
R3
R23
R22
C14
R152
R7
C78
C77
C76
C79
C5
C15
Q1
R24
C21
+
C9
R14
C12
R21
C7
J12
DS1
DS2
GND RST- IN1 IN0 485- 485+ RXD2 TXD2 RXD1 TXD1 AGND DAC1 DAC0 ADC8 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 ADC1 ADC0+RAW +K
GND GND
GND
GND GND
GN D
AGND
AGND
AGND
AGND
AGND
AG ND
PWRLNK
JP2
C85
JP1
R157
R1
C17
C20
Y3
R4
C16
R20
R6
R12
C10
J5
R19
C80
R16
R130
U1
C2 C3
C19
R153
C18
R154
R9
R13
R15
C1
Y2
U5
J2
J1
J4
J3
C8
U2
R5
R11
R10
C75
C11
R17
C4
C13
U3
R8
R18
R2
R3
R23
R22
C14
R152
R7
C78
C77
C76
C79
C5
C15
Q1
R24
C21
+
C9
R14
C12
R21
C7
J12
DS1
DS2
GND RST- IN1 IN0 485- 485+ RXD2 TXD2 RXD1 TXD1 AGND DAC1 DAC0 ADC8 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 ADC1 ADC0+RAW +K
GND GND
GND
GND GND
GN D
AGND
AGND
AGND
AGND
AGND
AG ND
PWRLNK
JP2
C85
JP1
R157
GN
+K
/RESET
IN1
IN0
485
485+
RX
J2
10
9
8
7
6
5
Ground recommended
24 Wildcat (BL2000)
The BL2000 comes with a 220 termination resistor and two 681 bias resistors installed and enabled with jumpers across pins 1–2 and 3–4 on header JP1, as shown in Figure 13.
Figure 13. RS-485 Termination and Bias Resistors
The bias and termination resistors in a multidrop network should only be enabled on both end nodes of the network. Disable the termination and bias resistors on the intervening BL2000 units in the network by removing both jumpers from header JP1.
3.4.3 Ethernet Port
Figure 14 shows the pinout for the Et her net po rt (J6) . Note t hat th ere are tw o stan dar ds 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 14) are always absolute, and the RJ-45 connector will work pr operly with off-the-shelf Ethernet cables.
Figure 14. RJ-45 Ethernet Port Pinout
RJ-45 pinouts are sometimes numbered opposite to the way shown in Figure 14.
R68 681 W
R70 220 W
R77 681 W
485+
485
6
7
termi-
nation
bias
bias
U8
Factory Default
U1
C2
C3
J4 J3
C8
U2
R5
R11
R10
C75
C11
C4
U3
R8
R18
R2
R3R7C78
C79
C5
+
C9
R14
C12
C7
J12
RXD1 TXD1 AGND DAC1 DAC0 ADC8 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 ADC1 ADC0
GND AGND
AGND
AGND
AGND
AGND
AG ND
C85
JP1
R157
JP1
1
2
3
4
JP1
1
2
3
4
ETHERNET
RJ-45 Plug
1. E_Tx+
2. E_Tx
3. E_Rx+
6. E_Rx
1
8
RJ-45 Jack
J6
User’s Manual 25
The transformer/connector assembly ground is connected to the BL2000 printed circuit board digital ground via a 0 resistor “jumper,” R1, as shown in Figure 15.
Figure 15. Isolation Resistor R1
The factory default is for the 0 resistor “jumper” at R1 to be installed. In high-noise environments, it may be useful to ground the transformer/connector assembly directly through the chassis ground. This will be especially helpful to minimize ESD and/or EMI problems. Once you have removed the 0 resistor “jumper,” R1, use a ring lug to attach the BL2000 to the chassis ground, thereby grounding the transformer/connector assembly.
A convenient position for the ring lug has been provided at the top-left mounting screw hole near the RJ-45 jack as shown in Figure 16.
Figure 16. Recommended Location for Ring Lug
3.4.4 Programming Port
The BL2000 has a 10-pin programming header labeled J5. The programming port uses the Rabbit 2000’ s Serial Port A for communication. Dynamic C uses the programming port to download and debug programs.
The programming port is also used for the following operations.
Cold-boot the Rabbit 2000 after a reset.
Remotely download and debug a program over an Ethernet connection using the
RabbitLink EG2110.
Fast copy designated portions of flash memory from one Rabbit-based board (the master) to another (the slave) using the Rabbit Cloning Board.
RJ-45 Ethernet Plug
R1
Chassis Ground
Board
Ground
R1
C23
C17
J6
C20
D1
U4
Y3
Q2
C24
R151
R4
C16
R20
R6
R12
C10
J5
R19
C80
R16
R130
C19
R153
R154
R9
R13
R15
C1
Y2
R27C22
C27
R28
U5
J2
J1
GND RST- IN1 IN0 485- 485+ RXD2 TXD2 RXD1 TXD1+RAW +K
GND GND
GND
GND GND
GN D
Remove R1
Add solder lug to
connect ground
wire to chassis
Loading...
+ 65 hidden pages