Digi BL1800 User Manual

Jackrabbit (BL1800)
C-Programmable Single-Board Computer
User’s Manual
019–0067 090515–J
Jackrabbit (BL1800) User’s Manual
©2000–2009 Digi International Inc. • All rights res erved.
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.
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.
The latest revision of this manual is available on the Rabbit Web s ite, www.rabbit.com , for free, unregistered download.
Digi International Inc.
www.rabbit.com
Jackrabbit (BL1800)

TABLE OF CONTENTS

Chapter 1. Introduction 1
1.1 Features.................................................................................................................................................1
1.2 Development and Evaluation Tools......................................................................................................2
1.3 How to Use This Manual......................................................................................................................3
1.3.1 Additional Product Information....................................................................................................3
1.3.2 Online Documentation..................................................................................................................3
1.4 CE Compliance.....................................................................................................................................4
1.4.1 Design Guidelines.........................................................................................................................5
1.4.2 Interfacing the Jackrabbit to Other Devices..................................................................................5
Chapter 2. Getting Started 7
2.1 Development Kit Contents....................................................................................................................7
2.2 Development Hardware Connections...................................................................................................8
2.2.1 Attach Jackrabbit to Prototyping Board........................................................................................9
2.2.2 Connect Programming Cable......................................................................................................10
2.2.3 Connect Power............................................................................................................................11
2.3 Installing Dynamic C..........................................................................................................................12
2.4 Run a Sample Program.......................................................................................................................13
2.4.1 Troubleshooting..........................................................................................................................13
2.5 Where Do I Go From Here? ...............................................................................................................14
2.5.1 Real-Time Clock.........................................................................................................................14
2.5.2 Technical Support.......................................................................................................................14
Chapter 3. Subsystems 15
3.1 Jackrabbit Pinouts...............................................................................................................................16
3.1.1 Headers........................................................................................................................................16
3.2 Digital Inputs/Outputs.........................................................................................................................17
3.2.1 Digital Inputs...............................................................................................................................17
3.2.2 Digital Outputs............................................................................................................................18
3.2.3 Bidirectional I/O .........................................................................................................................20
3.3 A/D Converter.....................................................................................................................................21
3.4 D/A Converters...................................................................................................................................23
3.4.1 DA1.............................................................................................................................................24
3.4.2 DA0.............................................................................................................................................26
3.5 Serial Communication ........................................................................................................................28
3.5.1 RS-232 ........................................................................................................................................28
3.5.2 RS-485 ........................................................................................................................................28
3.5.3 Programming Port.......................................................................................................................30
3.6 Programming Cable............................................................................................................................32
3.6.1 Changing Between Program Mode and Run Mode....................................................................32
3.7 Memory...............................................................................................................................................33
3.7.1 SRAM .........................................................................................................................................33
3.7.2 Flash EPROM.............................................................................................................................33
3.8 Other Hardware...................................................................................................................................34
3.8.1 External Interrupts.......................................................................................................................34
3.8.2 Clock Doubler.............................................................................................................................34
3.8.3 Spectrum Spreader......................................................................................................................35
User’s Manual
Chapter 4. Software Reference 37
4.1 An Overview of Dynamic C...............................................................................................................37
4.2 Sample Programs................................................................................................................................39
4.2.1 DEMOJR1.C ..............................................................................................................................40
4.2.2 Other Sample Programs Illustrating Digital I/O.........................................................................44
4.2.3 RS-232 Serial Communication Sample Programs .....................................................................46
4.2.4 RS-485 Serial Communication Sample Program.......................................................................47
4.3 Cooperative Multitasking...................................................................................................................48
4.3.1 Advantages of Cooperative Multitasking...................................................................................50
4.4 Jackrabbit Function Calls...................................................................................................................51
4.4.1 I/O Drivers..................................................................................................................................51
4.4.2 Serial Communication Drivers...................................................................................................55
4.5 Upgrading Dynamic C .......................................................................................................................56
4.5.1 Patches and Bug Fixes................................................................................................................56
4.5.2 Add-On Modules........................................................................................................................56
Appendix A. Specifications 57
A.1 Electrical and Mechanical Specifications..........................................................................................58
A.1.1 Exclusion Zone..........................................................................................................................60
A.1.2 Headers......................................................................................................................................61
A.2 Jumper Configurations......................................................................................................................62
A.3 Conformal Coating............................................................................................................................64
A.4 Use of Rabbit 2000 Parallel Ports.....................................................................................................65
Appendix B. Prototyping Board 69
B.1 Prototyping Board Overview.............................................................................................................70
B.1.1 Prototyping Board Features.......................................................................................................71
B.2 Mechanical Dimensions and Layout.................................................................................................72
B.3 Using the Prototyping Board.............................................................................................................73
B.3.1 Demonstration Board.................................................................................................................74
B.3.2 Prototyping Board......................................................................................................................76
Appendix C. Power Management 79
C.1 Power Supplies..................................................................................................................................79
C.2 Batteries and External Battery Connections...................................... ..... .................................. ... ......82
C.2.1 Battery Backup Circuit ..............................................................................................................83
C.2.2 Power to VRAM Switch............................................................................................................84
C.2.3 Reset Generator..........................................................................................................................84
C.3 Chip Select Circuit.............................................................................................................................85
Index 87
Schematics 89
Jackrabbit (BL1800)

1. INTRODUCTION

The Jackrabbit is a high-performance, C-programmable single-
®
board computer with a compact form factor. A Rabbit microprocessor operating at 29.5 MHz provides fast data pro­cessing.

1.1 Features

29.5 MHz clock
24 CMOS-compatible I/O
3 analog channels: 1 A/D input, 2 PWM D/A outputs
4 high-power outputs (factory-configured as 3 sinking and 1 sourcing)
4 serial ports (2 RS-232 or 1 RS-232 with RTS/CTS, 1 RS-485, and 1 CMOS-
compatible)
2000
6 timers (five 8-bit timers and one 10-bit timer)
128K SRAM, 256K flash EPROM
Real-time clock
Watchdog supervisor
Voltage regulator
Backup battery
User’s Manual 1
Three Jackrabbit models are available. Their standard features are summarized in Table 1.
Table 1. Jackrabbit Features
Model Features
BL1800 Full-featured controller with switching voltage regulator.
BL1800 with 14.74 MHz clock, 12 8K flash EPROM, l inear
BL1810
voltage regulator, sinking outputs sink up to 200 mA, sourcing output sources up to 100 mA, RS-232 serial ports rated for 1 kV ESD
BL1820
BL1810 with 3 additional digital I/O, no RS-485, no backup battery.
Throughout this manual, the term Jackrabbit refers to all three Jackrabbit models in Table 1; individual models are referred to specifically according to the model number in Table 1.
Appendix A provides detailed specifications.
Visit the Web site for up-to-date information about additional add-ons and features as they become available. The Web site also has the latest revision of this user’s manual.

1.2 Development and Evaluation Tools

A complete Development Kit, including a Prototyping Board and Dynamic C develop­ment software, is available for the Jackrabbit. The Development Kit puts together the essentials you need to design an embedded microprocessor-based system rapidly and effi­ciently.
2 Jackrabbit (BL1800)

1.3 How to Use This Manual

This user’s manual is intended to give users detailed information on the Jackrabbit. It does not contain detailed information on the Dynamic C development environment or the Rabbit
2000® microprocessor. Most users will want more detailed information on some or all of these topics in order to put the Jackrabbit to effective use.

1.3.1 Additional Product Information

In addition to the product-specific information contained in the Jackrabbit (BL1800) User’s Manual (this manual), several higher level reference manuals are provided in
HTML and PDF form on the accompanying CD-ROM. Advanced users will find these references valuable in developing systems based on the Jackrabbit:
Dynamic C User’s Manual
Dynamic C Function Reference Manual
Rabbit 2000 Microprocessor User’s Manual

1.3.2 Onlin e Documentation

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, use your browser to find and load 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.
User’s Manual 3

1.4 CE Compliance

Equipment is generally divided into two classes.
CLASS A CLASS B
Digital equipment meant for light industrial use Digital equipment meant for home use Less restrictive emissions requirement:
less than 40 dB µV/m at 10 m (40 dB relative to 1 µV/m) or 300 µV/m
More restrictive emissions requirement: 30 dB µV/m at 10 m or 1 00 µV/m
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 Jackrabbit single-board computer has been tested and was found to be in conformity with the following applicable immunity and emission standards. The BL1810 and BL1820 single-board models are also CE qualified as they are sub-versions of the Jackrabbit. Boards that are CE­compliant have the CE mark.
NOTE: Earlier versions of the Jackrabbit sold before 2002 that do not have the CE mark
are not CE-complaint.
Immunity
The Jackrabbit 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 Jackrabbit series of single-board computers meets the following emission standards with the Rabbit 2000 spectrum spreader turned on and set to the normal mode. The spectrum spreader is only available with Rev. C or higher of the Rabbit 2000 microprocessor. This microprocessor is used in all Jackrabbit series boards that carry the CE mark.
EN55022:1998 Class B
FCC Part 15 Class B
In order for the Jackrabbit boards to meet these EN55022:1998 Class B standards, you must add ferrite absorbers to the serial I/O cables used for RS-232 and RS-485 serial com­munication. Depending on your application, you may need to add ferrite absorbers to the
4 Jackrabbit (BL1800)
digital I/O cables. Your results may vary, depending on your application, so additional shielding or filtering may be needed to maintain the Class B emission qualification.
NOTE: If no ferrite absorbers are fitted, the Jackrabbit boards will still meet
EN55022:1998 Class A requirements as long as the spectrum spreader is turned on.
The spectrum spreader is on by default for Jackrabbit models BL1810 and BL1820. The spectrum spreader is off by default for the Jackrabbit model BL1800, and must be turned on with at least one wait state in order for the BL1800 model to be CE-compliant. Section 3.8.3 provides further information about the spectrum spreader and its use, and includes information on how to add a wait state.

1.4.1 Design Guidelines

Note the following requirements for incorporating the Jackrabbit series of single-board computers into your application to comply with CE requirements.
General
The power supply provided with the Development Kit is for development purposes only . It i s the customer’ s responsibility to provide a CE-compliant power supply for the end-product application.
When connecting the Jackrabbit single-board computer to outdoor cables, the customer is responsible for providing CE-approved surge/lightning 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. Rabbit also recommends using properly shielded I/O cables in noisy electromagnetic environments.
When installing or servicing the Jackrabbit, it is the responsibility of the end-user to use proper ESD precautions to prevent ESD damage to the Jackrabbit.
Safety
For personal safety, all inputs and outputs to and from the Jackrabbit series of single­board computers must not be connected to voltages exceeding SEL V levels (42.4 V AC peak, or 60 V DC). Damage to the Rabbit 2000 microprocessor may result if voltages outside the design range of 0 V to 5.5 V DC are applied directly to any of its digital inputs.
The lithium backup battery circuit on the Jackrabbit 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 Jackrabbit to Other Devices

Since the Jackrabbit 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 5
6 Jackrabbit (BL1800)

2. GETTING S TARTED

This chapter des cribes the Jackrabbit board in more detail, an d explains how to set up and use the accompanying Prototyping Board.
NOTE: This chapter (an d this ma nual) as sume that yo u have the J ackrabbi t Development
Kit. If you purchased a Jackrabbit board by itself, you will have to adapt the informa­tion in this chapter and elsewhere to your test and development setup.

2.1 Development Kit Contents

The Jackrabbit Development Kit contains the following items:
BL1810 single-board computer.
Prototyping Board.
Universal AC adapter, 12 V DC, 1 A (includes Canada/Japan/U.S., Australia/N.Z.,
U.K., and European style plugs).
7.5–25 V
DC at 5 W
.
If you are using another power supply, it must provide
NOTE: The linear voltage regulator becomes rather hot for voltages above 15 V.
10-pin header to DB9 programming cable with integrated level-matching circuitry.
Dynamic C CD-ROM, with complete product documentation on disk.
Getting Started instructions.
A bag of accessory parts for use on the Prototyping Board.
Screwdriver.
Rabbit 2000 Processor Easy Reference poster.
Registration card.
User’s Manual 7

2.2 Development Hardware Connections

There are three steps to connecting the Prototyping Board for use with Dynamic C and the sample programs:
1. Attach the Jackrabbit to the Prototyping Board.
2. Connect the programming cable between the Jackrabbit and the workstation PC.
3. Connect the power supply to the Jackrabbit.
8 Jackrabbit (BL1800)
2.2.1 Attach Jackrabbit to Prototyping Board
To attach the Jackrabbit board to the Prototyping Board, turn the Jackrabbit board over so that the battery is facing up. Plug the pins from headers J4 and J5 on the bottom side of the Jackrabbit board into the header sockets at J2 and J6 on the Prototyping Board as indicated in Figure 1.
GND
PA0
PA2
PA4
PA6
GND
PB0
PB2
PB4
PB6
WDO
GND
PE6
PE4
PE2
PE0
HV0
HV2KGND
Prototyping
Board
J4
PA1
PA3
PA5
PA7
PB1
PB3
PB5
PB7
PE7
PE5
PE3
PE1
HV1
HV3
VCC
GND
PCLK
VCC
GND
+RAW
Jackrabbit
J2
VCC
PA1
PA3
PA0
PA2
GND
GND
RXC
TXC
J2
PA5
PA7
GND
PB1
PB3
PB5
PB7
PCLK
PE7
PE5
PE3
PE1
GND
HV1
HV3
+RAW
VCC
PA4
PA6
PB0
PB2
PB4
PB6
PE6
GND
PA0
PA1
PA2
PA3
PA4
PA5
DS1
DS2
DS3
DS4
DS5
DS6
PE4
GND
WDO
PA6
PA7
PB2
PB3
PB4
S1S2S3
DS7
DS8
J6
PC1
PC3
PC5
PC7
AGND
DA1
PD1
PD3
PD5
PD7
GND
PE2
485+
K
PE0
HV0
HV2
PB5
S4
GND
GND
GND
J6
GND
VCC
SM1
STAT
VBAT
Buzzer
VCC
J5
GND
R3
Board
+
S1S2S3S4
DS1
RXB
TXB
PC0
PC2
PC4
PC6
AD0
DS2
PC1
PC3
PC5
PC7
TXC
RXC
DS3DS4
AGND
DS5
DS6
Battery
DA0
PD0
PD2
PD4
PD6
GND
485
VCC
SM0
IOBEN
GND
/RST
DA1
PD1
PD3
PD5
PD7
SM1
VCC
GND
485+
GND
STAT
VBAT
DS7
TXB
PC0
PC2
PC4
PC6
AD0
DA0
PD0
PD2
PD4
RXB
VCC
JACKRABBIT PROTOTYPING BOARD
PD6
S5
/RST
RESET
SM0
VCC
GND
485
GND
IOBEN
Z-World, Inc.
PWR
DS8
Figure 1. Attach Jackrabbit Board to Prototyping Board
NOTE: It is important that you line up the pins on headers J4 and J5 of the Jackrabbit
board exactly with the corresponding pins of header sockets J2 and J6 on the Prototyp­ing Board. The header pi ns ma y be come bent or damaged if the pin ali gnmen t i s offset, and the Jackrabbit might not work. Permanent electrical damage to the may also result if a misaligned Jackrabbit is powered up.
Press the Jackrabbit’s pins firmly into the Prototyping Board headers.
User’s Manual 9

2.2.2 Connect Programming Cable

The programming cable connects the Jackrabbit to the PC running Dynamic C to down­load programs and to monitor the Jackrabbit during debugging.
Connect the 10-pin connector of the programming cable labeled PROG to header J3 on the Jackrabbit board as shown in Figure 2. Be sure to orient the marked (usually red) edge of the cable towards pin 1 of the connector. (Do not use the DIAG connector, which is used for a normal serial connection.)
NOTE: Use only the programming cable that has a red shrink wrap around the RS-232
level converter (Part No. 20-101-0513), which is supplied with the Development Kit. Other Rabbit programming cables are not voltage-compatible or their connector sizes may be different.
Remove slot cover,
1
insert tab into slot
Assemble
AC Adapter
Snap plug into place
2
JACKRABBIT BOARD
U5
JP1
SRAM
U6
RS-485
U4
RS-232
VCC RXB TXB PC0 PC2 PC4 PC6 AD0 DA0 PD0 PD2 PD4 PD6 GND 485 VCC SM0
IOBEN
GND /RST
Red shrink wrap
RESET
J5
GND RXC TXC PC1 PC3 PC5 PC7 AGND DA1 PD1 PD3 PD5 PD7 GND 485+ VCC SM1 STAT VBAT GND
Colored side lines up with
pin 1
Programming connector
U1
J4
GND
VCC
PA0
PA1
PA2
PA3
PA4
PA5
PA6
PA7
K
U3
GND PB1 PB3 PB5 PB7 PCLK PE7 PE5 PE3 PE1 GND HV1 HV3 +RAW VCC
JACKRABBIT
Rabbit 2000
Y3
Z-World, Inc.
GND
PB0 PB2 PB4
PB6 WDO GND
PE6
PE4
PE2
J2
PROG
PE0
HV0 HV2
GND
J1
VINGNDGND
J3
PROTOTYPING BOARD
Diagnostic connector
DIAG
To
PC COM port
Figure 2. Power and Programming Cable Connections
to Jackrabbit Board
NOTE: Never disconnect the programming cable by pulling on the ribbon cable.
Carefully pull on the connector to remove it from the header.
Connect the other end of the programming cable to a COM port on your PC.
NOTE: Some PCs now come equipped only with a USB port. It may be possible to use
an RS-232/USB converter (Part No. 20-151-0178) with the programming cable sup­plied with the Jackrabbit Development Kit. Note that not all RS-232/USB converters work with Dynamic C.
10 Jackrabbit (BL1800)

2.2.3 Connect Power

When all other connections have been made, you can connect power to the Jackrabbit. First, prepare the AC adapter for the country where it will be used by selecting the plug.
The Jackrabbit Development 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 2, then press down on the spring-loaded clip below the plug assembly to allow the plug assembly to click into place.
Hook up the connector from the AC adapter to header J1 on the Jackrabbit board as shown in Figure 2. The orientation of this connector is not important since the VIN (positive) voltage is the middle pin, and GND is available on both ends of the three-pin header J1.
Plug in the AC adapter. The Jackrabbit board and the Prototyping Board are ready to be used.
NOTE: A RESET button is provided on the Prototyping Board (see Figure 1) to allow
hardware reset without disconnecting power.
To power down the Jackrabbit, unplug the power connector from J1. You should discon­nect power before making any circuit adjustments in the prototyping area, changing any connections to the board, or removing the Jackrabbit from the Prototyping Board.
User’s Manual 11

2.3 Installing Dynamic C

If you have not yet installed Dynamic C, do so now by inserting the Dynamic C CD from the Jackrabbit Development Kit 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 Start 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 earlier version of Dynamic C already installed, the default instal-
lation of the la te r ver sion wi ll b e in a dif f erent fold er, and a separate icon will appear on your desktop.
Once your installation is complete, you will have up to three icons on your PC desktop. One icon is for Dynamic C, one opens the documentation menu, and the third is for the Rabbit Field Utility, a tool used to download precompiled software to a target system.
If you have purchased any of the optional Dynamic C modules, install them after installing Dynamic C. The modules may be installed in any order. You must install the modules in the same directory where Dynamic C was installed.
12 Jackrabbit (BL1800)

2.4 Run a Sample Program

If you already have Dynamic C installed, you are now ready to test your programming connections by running a sample program. Start Dynamic C by double-clicking on the Dynamic C icon on your desktop or in your Start menu. Dynamic C uses the serial port specified during installation.
If you are using a USB port to connect your computer to the BL1810, click on the Commu-
nications
programming cable. Click OK.Y ou may have to determine which COM port was assigned to the RS-232/USB converter. Open Control Panel > System > Hardware > Device Man-
ager > Ports
select Options > Project Options, then select this COM port on the Communications tab, then click OK. You may type the COM port number followed by Enter on your com­puter keyboard if the COM port number is outside the range on the dropdown menu.
Find the file PONG.C, which is in the Dynamic C SAMPLES folder. To run the program, open it with the File menu, compile it using the Compile menu, and then run it by selecting
Run in the Run menu. The STDIO window will open on your PC and will display a small
square bouncing around in a box. This program shows that the CPU is working.

2.4.1 Troubleshooting

tab and verify that Use USB to Serial Converter is selected to support the USB
and identify which COM port is used for the USB connection. In Dynamic C,
If Dynamic C cannot find the target system (error message "No Rabbit Processor
Detected."
):
Check that the BL1810 is powered correctly — the AC adapter should be connected to
header J1 on t he Jackrabbit boar d and should be plugged in to a wall outlet.
Check both ends of the programming cable to ensure that they are firmly plugged into the PC and that the PROG connector, not the DIAG connector, is plugged in to the programming port on the BL1810 with the colored side lined up with pin 1.
Ensure that the BL1810 is firmly and correctly installed in its sockets on the Prototyp­ing Board.
Select a different COM port within Dynamic C. From the
Project Options, then select another COM port from the list on the Comm unications
Options menu, select
tab, then click OK. Press <Ctrl-Y> to force Dynamic C to recompil e the BIOS.
If a program compiles and loads, but then loses target communication before you can begin debugging, it is possible that your PC ca nnot handle the default debuggi ng baud rate. Try lowering the debugging baud rate as follows.
Locate the Serial Options dialog in the Dynamic C Options > Project Options >
Communications
menu. Choose a lower debug baud rate, then click OK.
User’s Manual 13

2.5 Where Do I Go From Here?

If everything appears to be working, we recommend the following sequence of action:
1. Run all of the sample programs described in Section 4.2 to get a basic familiarity with Dynamic C and the Jackrabbit’s capabilities.
2. For further development, refer to this Jackrabbit (BL1800) User’s Manual for details of the board’s hardware components.
A documentation icon should have been installed on your workstation’s desktop; click on it to reach the documentation menu. You can create a new desktop icon that poi nts to
default.htm in the docs folder in the Dynamic C installation folder.
3. For advanced development topics, refer to the Dynamic C User’s Manual, also in the online documentation set.

2.5.1 Real-Time Clock

If you plan to use the real-time clock functionality in your application, you will need to set the real-time clock. You may set the real-time clock using the SETRTCKB.C sample pro­gram from the Dynamic C SAMPLES\RTCLOCK folder. The RTC_TEST.C sample pro­gram in the Dynamic C SAMPLES\RTCLOCK folder provides additional examples of how to read and set the real-time clock

2.5.2 Technical Support

NOTE: If you purchased your Jackra bbit thr ough a distributor or through a Rabbi t pa rtner,
contact the distrib utor or partner first for tec hnic al 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/.
14 Jackrabbit (BL1800)

3. SUBSYSTEMS

Chapter 3 describes the principal subsystems and their use for the Jackrabbit.
Digital Inputs/Outputs
A/D Converter
D/A Converters
Serial Communication
Memory
Figure 3 shows these Rabbit-based subsystems designed into the Jackrabbit.
SRAM
Flash
BL1800
32 kHz
osc
RABBIT
Programming
Port
15 MHz
osc
®
RS-232
RS-485
2000
Figure 3. Jackrabbit Subsystems
Digital Inputs
Digital
Outputs
High-
Power
Outputs
A/D
Converter
Analog
Outputs
User’s Manual 15

3.1 Jackrabbit Pinouts

Figure 4 shows the pinout for headers J4 and J5, which carry the signals associated with the Jackrabbit subsystems.
J5
GND
PA0 PA2 PA4 PA6
GND
PB0 PB2 PB4 PB6
WDO
GND
PE6 PE4 PE2
PE0 HV0 HV2
GND
J4
VCC PA1 PA3 PA5 PA7 GND PB1 PB3 PB5 PB7 PCLK PE7 PE5 PE3 PE1 GND HV1 HV3
K
+RAW VCC
Legend
Bidirectional I/O
One-Direction I/O
VCC RXB
TXB PC0 PC2 PC4 PC6 AD0 DA0 PD0 PD2 PD4
PD6 GND 485
VCC SM0
IOBEN
GND /RST
Figure 4. Pinout for Jackrabbit Headers J4 and J5
GND RXC TXC PC1 PC3 PC5 PC7 AGND DA1 PD1 PD3 PD5 PD7 GND 485+ VCC SM1 STAT VBAT GND

3.1.1 Headers

Standard Jackrabbit models are equipped with two 2 × 20 IDC headers (J4 and J5) with a 2 mm pitch.
16 Jackrabbit (BL1800)

3.2 Digital Inputs/Output s

3.2.1 Digital Inputs

The Jackrabbit has six CMOS-level digital inputs, PB0–PB5, each o f which is pulled up to +5 V as shown in Figure 5. The BL1820, which does not have RS-485, has one additional CMOS-level digital input, PC1.
Vcc
47 kW
GND
Figure 5. Digital Inputs
Rabbit 2000
Microprocessor
The actual switching threshold is approximately 2.40 V. Anything below this value is a logic 0, and anything above is a logic 1.
NOTE: Since the voltage limits on the inputs to the Rabbit 2000 microprocessor are 0 to
5.5 V DC, the end user must ensure that the voltage applied to any I/O pin is within these limits.
User’s Manual 17

3.2.2 Digital Outputs

The Jackrabbit has four CMOS-level digital outputs, PB6–PB7, PCLK, and IOBEN. Four high-power outputs, HV0–HV3, are also available—HV0–HV2 can each sink up to 1 A (200 mA for the BL1810 and BL1820) at 30 V, and HV3 can source up to 500 mA (100 mA for the BL1810 and BL1820) at 30 V. The BL1820, which does not have RS-485, has one additional CMOS-level digital output, PC0.
HV0HV2 SINKING OUTPUTS
+K
Current
Flow
PE[02]
HV3 SOURCING OUTPUT
+K
PE3
Figure 6. Jackrabbit High-Power Digital Outputs
Current
Flow
The common power supply for the four high-power outputs is called K, and is available on header J4. Connect K to the power supply that powers the load, which is usually a separate power supply to that used for the Jackrabbit, and must be no more than 30 V because of the power limitations of the resistors used in the sourcing output circuit.
The K connection performs two functions.
1. K supplies power to the sinking/sourcing transistors used in the high-power circuits.
2. A diode-capacitor combination in the circuit “snubs” voltage transients when inductive loads such as relays and solenoids are driven.
18 Jackrabbit (BL1800)
3.2.2.1 Configurable High-Power Output (HV3)
HV3, shown schematically in Figure 7, is factory-configured to be a sourcing output.
R55
0 W
C27 100 nF
HV3
(sinking
option)
R48
K
R50
100 kW
Q25
PE3
470 W
Q28
C28
100 nF
MMBT3906
MMBT4401
R52
1.8 kW R51
1.8 kW R56
HV3
(sourcing)
0 W
D24
Figure 7. Configurable High-Current Output
When used as a sourcing output, HV3 is switched to K when PE3 on the R abbit 2000 goes high, and the two transistors shown in Fi gure 7 are turned on. The maximum sourcing cur­rent is 100 mA (BL1810 and BL1820) or 500 mA (BL1800), and the maximum K is 30 V. This voltage limit on K arises because R51 and R52 at the base of Q28 can each dissipate 500 mW for a total of 1 W. The 30 V limit then constrains the sinking outputs as well because K is common to all four high-current outputs.
User’s Manual 19
HV3 can also be reconfigured as a sinking output. To do so, remove the 0 surface­mounted resistor R56, and solder on a 0 surface-mounted resistor or jumper wire at R55. If you plan to drive inductive loads, add a diode at D21. Figure 8 shows the location of these components.
GND RXC
TXC PC1 PC3 PC5 PC7
AGND
DA1 PD1 PD3 PD5
PD7 GND 485+ VCC SM1
STAT VBAT
GND
J5
VCC RXB TXB PC0 PC2 PC4 PC6 AD0 DA0 PD0 PD2 PD4 PD6 GND 485 VCC SM0 IOBEN GND /RST
Battery
C27
D24
VCC
GND
PCLK
GND
+RAW
VCC
J4
GND PA1 PA3 PA5 PA7
PB1 PB3 PB5 PB7
PE7 PE5 PE3 PE1
HV1 HV3
PA0
PA2
PA4
PA6
GND
PB0
PB2
PB4
PB6
WDO
GND
PE6
PE4
PE2
PE0
HV0
HV2
K
GND
R55
R56
D21
Figure 8. Changing HV3 to a Sinking Output

3.2.3 Bidirectional I/O

The Jackrabbit has 14 CMOS-level bidirectional I/O: PA0–PA7, PD0, PD3, PD6–PD7, and PE4–PE5. The BL1820, which does not have RS-485, has one additional bidirectional I/O, PD5.
20 Jackrabbit (BL1800)

3.3 A/D Converter

The analog-to-digital (A/D) converter, shown in Figure 9, compares the DA0 voltage to AD0, the voltage presented to the converter. DA0 therefore cannot be used for the digital­to-analog (D/A) converter when the A/D converter is being used.
Vcc
R34
51.1 kW
AD0
R35
200 W
DA0
R33
200 W
R32
51.1 kW
Vcc
R31
10 kW
9
10
13
12
LM324
+
LM324
+
DA0 too low
R36
8
0 W
R30
14
0 W
DA0 too high
PE7
PE6
Figure 9. Schematic Diagram of A/D Converter
The A/D converter transforms the voltage at DA0 into a 20 mV window centered around DA0. For example, if DA0 is 2.0 V, the window in
the A/D
converter would be 1.990 V to
2.010 V. If AD0 > 2.010 V, PE7 would read high and PE6 would read low. If 1.990 V < AD0 < 2.010 V, PE7 would read low and PE6 would read low. This is the case when the A/D input is exactly the same as DA0. If AD0 < 1.990 V, PE7 would read low and PE6 would read high.
PE6 can be imagined to be a “DA0 voltage is too high” indicator . If DA0 is lar ger than the analog voltage presented at AD0, then PE6 will be true (high). If this happens, the pro­gram will need to reduce the DA0 voltage.
PE7 can be imagined to be a “DA0 voltage is too low” indicator. If DA0 is smaller than the analog voltage presented at AD0, then PE7 will be true (high). If this happens, the pro­gram will need to raise the DA0 voltage.
The A/D input, AD0, is the same as DA0 only when PE6 and PE7 are low. Because the A/D converter circuit uses a 20 mV window, the accuracy is ±10 mV. DA0 can range from
0.1 V to 2.8 V, which represents 270 steps of ±10 mV. This is better than 8-bit accuracy. Since the D/A converter is able to change the DA0 output in 3.88 mV steps, there are 697 steps over the range from 0.1 V to 2.8 V. This represents a resolution of more than 9 bits.
User’s Manual 21
There is a 10 k resistor, R31, connected between Vcc and AD0. This resistor should pro­vide an appropriate voltage divider bias for a variety of common thermistors so that they can be connected directly between AD0 and ground. The A/D converter load is the 10 k resistor connected to Vcc. Remove R31 if a smaller load is desired—this will lead to a very high input impedance for the A/D converter.
The A/D converter has no reference voltage. There is a relative accuracy between mea­surements, but no absolute accuracy. This is because Vcc can vary ±5%, the pulse-width modulated outputs might not reach the full 0 V and 5 V rails out of the Rabbit 2000 micro­processor, and the gain resistors used in the circuit have a 1% tolerance. For these reasons, each Jackrabbit needs to be calibrated individually, with the constants held in software, to be able to rely on an absolute accuracy . The Jackrabbit is sold without this calibration sup­port.
The algorithm provided to perform the conversion does a successive approximation search for the analog voltage. This takes an average of 150 ms, and a maximum of 165 ms, with a
14.7 MHz Jackrabbit.
22 Jackrabbit (BL1800)

3.4 D/A Converters

Two digital-to-analog (D/A) converter outputs, DA0 and DA1, are supplied on the Jack­rabbit. These are shown in Figure 10.
The D/A converters have no reference voltage. Although they may be fairly accurate from one programmed voltage to the next, they do not have absolute accuracy. This is because Vcc can change ±5%, the PWM outputs might not achieve the full 0 V and 5 V rail out of the processor, and the gain resistors in the circuit have a 1% tolerance. The D/A converters therefore need individual calibration, with the calibration constants held in software before absolute accuracy can be relied on. The Jackrabbit is sold without such calibration.
Vcc
R29
1 MW
DA0
R20
1.1 kW
DA1
R25
1.1 kW
R26
82.5 kW
1
LM324
R28
100 kW
7
LM324
2
3
+
R27
255 kW
6
5
+
C22
100 nF
C20
100 nF
R22
10 kW
R24
100 kW
R21
110 kW
PD2
PD1
PD4
Figure 10. Schematic Diagram of D/A Converters
Note that DA0 is used to provide a reference voltage for the A/D converter and is unavail­able for D/A conversion when the A/D converter is being used.
Pulse-width modulation (PWM) is used for the D/A conversion. This means that the digi­tal signal, which is either 0 V or 5 V, is a train of pulses. This means that if the signal is taken to be usually at 0 V (or ground), there will be 5 V pulses. The voltage will be 0 V for a given time, then jump to 5 V for a given time, then back to ground for a given time, then back to 5 V, and so on. A hardware filter in the circuit consisting of a resist or and capacitor averages the 5 V signal and the 0 V signal over time. Therefore, if the time that the signal is at 5 V is equal to the time the signal is 0 V, the duty cycle will be 50%, and the average signal will be 2.5 V. If the time at 5 V is only 25% of the time, then the average voltage will be 1.25 V. Thus, the software needs to only vary the time the signal is at 5 V with respect to the time t he signa l is at 0 V to ac hieve any de sired voltage between 0 V and 5 V.
User’s Manual 23
It is very easy to do pulse-width modulation with the Rabbit 2000 microprocessor because of the chip’s architecture.

3.4.1 DA1

The op amp supporting DA1 converts pulse-width modulated signals to an analog voltage between 0 V and 5 V. A digital signal that varies with time is fed from PD4. The resolution of the DA1 output depends on the smallest increment of time to change the on/off time (the time between 5 V and 0 V). The Jackrabbit uses the Rabbit 2000’s Port D control reg­isters to clock out the signal at a timer timeout. The timer used is timer B. Timer B has 10 bits of resolution so that the voltage can be varied in 1/1024 increments. The resolution is thus about 5 mV (5 V/1024).
R28 is present solely to balance the op amp input current bias. R25 helps to achieve a volt­age close to ground for a 0% duty cycle.
A design constraint dictates how fast timer B must run. The hardware filter has a resistor­capacitor filter that averages the 0 V and 5 V values. Its effect is to smooth out the digital pulse train. It cannot be perfect, and so there will be some ripple in the output voltage. The maximum signal decay between pulses will occur when DA1 is set to 2.5 V. This means the pulse train will have a 50% duty cycle. The maximum signal decay will be
t
⎛⎞
------- -
⎝⎠
RC
2.5 V 1 e
where RC = 0.01 s for 14.74 MHz Jackrabbits, and t is the pulse on or off time (not the length of the total cycle).
Timer B is driven at the Rabbit 2000 frequency divided by 2. The frequency achievable with a 14.74 MHz clock is (14.74 MHz/2)/1024 = 7.17 kHz. This is a period of 1/f = 139 µs. For a 50% duty cycle, half of the period will be high (70 µs at 5 V), and half will be low (70 µs at 0 V). Thus, a 14.74 MHz Jackrabbit has t = 70 µs. Based on the standard capaci­tor discharge formula, this means that the maximum voltage change will be
2.5 V 1 e
This is less than a 20 mV peak-to-peak ripple. The DA1 output can be less than 100 mV for a 0% duty cycle and above 3.5 V for a 100%
duty cycle. Because of software limitations on the low side and hardware limitations on the high side, the duty cycle can only be programmed from 12% to 72%. The low limita­tion allows the software to perform other tasks as well as maintain the PWM for the D/A converters. The high limitation is simply the maximum voltage obtainable with the LM324 op amp used in the circuit. Anything outside the 12%–72% range gets output as
× 17.4 mV=
×
70 µs
⎛⎞
----------------
⎝⎠
0.01 s
24 Jackrabbit (BL1800)
either a 0% or a 100% duty cycle. The duty cycle is programmed as the high-time count of 1024 total counts of the Rabbit 2000’s timer B. Thus, 256 counts would be 25% of 1024 counts, and corresponds to a 25% duty cycle.
Table 2 lists typical DA1 voltages measured for various duty cycle values with a load larger than 1 MΩ.
Table 2. Typical DA1 Voltages for Various Duty Cycles
Duty Cycle
(%)
0 0.002 0–122 12 0.620 123 25 1.242 256 50 2.483 512 72 3.567 742
100 3.567 743–1024
Voltage
(V)
Programmed Count
It is important to remember that the DA1 output voltage will not be realized instanta­neously after programming in a value. There is a settl ing time beca use of the RC time con­stant (R24 × C22), which is 10 ms. For example, the voltage at any given time is
V = VP – (VP – V
where V is the voltage at time t, VP is the programmed voltage, V
DA1
)e
(-t/RC)
is the last DA1 out-
DA1
(EQ 1)
put voltage from the D/A converter, and RC is the time constant (10 ms). The settling will be within 99.326% (or within about 21 mV for a 3 V change in voltage) after five time constants, or 50 ms. Six time constants, 60 ms, will allow settling to within 99.75% (or to within about 8 mV for a 3 V change in voltage). Seven time constants, 70 ms, will allow settling to within 99.91% (or to within about 3 mV for a 3 V change in voltage).
An LM324 op amp, which can comfortably source 10 mA throughout the D/A converter range, drives the D/A converter output. If the output voltage is above 1 V, the D/A con­verter can comfortably sink 10 mA. Below 1 V, the D/A converter can only sink a maxi­mum of 100 µA.
To summarize, DA1 is provided uncalibrated, can be programmed with a resolution of 5 mV and a peak-to-peak ripple less than 20 mV over the range from 0.7 V to 3.5 V and 0 V. The settling time to within 21 mV is 50 ms.
User’s Manual 25
Loading...
+ 65 hidden pages