Digi BL1000 User manual

  • Hello! I am an AI chatbot trained to assist you with the Digi BL1000 User manual. I’ve already reviewed the document and can help you find the information you need or explain it in simple terms. Just ask your questions, and providing more details will help me assist you more effectively!
BL1100
C-Programmable Controller
Users Manual
019–0010 • 041015–E
Z-World, Inc.
2900 Spafford Street
Davis, California 95616-6800
USA
Telephone:
Facsimile:
Web Site:
E-Mail:
(530) 757-3737
(530) 753-5141
http://www.zworld.com
zworld@zworld.com
BL1100 Users Manual
Part Number 019-0010
041015-E • Printed in U.S.A.
© 1999–2004 Z-World, Inc.
All rights reserved.
Z-World reserves the right to make changes and
improvements to its products without providing notice.
Notice to Users
Z-WORLD PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITI-
CAL COMPONENTS IN LIFE-SUPPORT DEVICES OR SYSTEMS
UNLESS A SPECIFIC WRITTEN AGREEMENT REGARDING SUCH
INTENDED USE IS ENTERED INTO BETWEEN THE CUSTOMER
AND Z-WORLD PRIOR TO USE. Life-support devices or systems are
devices or systems intended for surgical implantation into the body or to
sustain life, and whose failure to perform, when properly used in accor-
dance with instructions for use provided in the labeling and users manual,
can be reasonably expected to result in significant injury.
No complex software or hardware system is perfect. Bugs are always present
in a system of any size. In order to prevent danger to life or property, it is the
responsibility of the system designer to incorporate redundant protective
mechanisms appropriate to the risk involved.
Trademarks
• Dynamic C
®
is a registered trademark of Z-World
• Windows
®
is a registered trademark of Microsoft Corporation
• PLCBus
is a trademark of Z-World
• Hayes Smart Modem
®
is a registered trademark of Hayes Microcom-
puter Products, Inc.
Table of Contents
iiiBL1100
TABLE OF CONTENTS
About This Manual ix
Chapter 1: Overview 13
Overview..............................................................................................14
Features................................................................................................15
Standard Models ..................................................................................17
Options and Upgrades.....................................................................17
Expansion Boards ...........................................................................18
Development and Evaluation Tools .....................................................19
Developers Kit ...............................................................................19
Software ..........................................................................................19
Chapter 2: Getting Started 21
Developers Kit Packing List...............................................................22
Connecting BL1100 to a Host PC........................................................22
Factory-Default RS-232 Programming ...........................................22
Establishing Communication with the BL1100 ...................................24
Running a Sample Program .................................................................24
Chapter 3: System Development 25
Operating Modes .................................................................................26
Programming Options .....................................................................27
Run Mode........................................................................................30
Switching Between Run and Program Mode ..................................31
Memory................................................................................................32
EPROM...........................................................................................32
Programming EPROM..................................................................33
SRAM .............................................................................................33
Chapter 4: Subystems 35
Interface Overview...............................................................................36
Power-Supervisor Integrated Circuit ...................................................37
Digital Interfaces..................................................................................38
Zilog KIO Interface.........................................................................38
KIO Command Register ...............................................................39
iv
Table of Contents BL1100
PIO Interface ...................................................................................40
Using PIO Ports ............................................................................42
PIA Parallel Port ...........................................................................44
Counter/Timer Circuit (CTC)..........................................................44
Timer Control Word......................................................................46
High-Current/High-Voltage Driver .................................................48
Liquid Crystal Display Interface .....................................................50
Serial Communication..........................................................................52
RS-232 Communication ..................................................................54
Modem Communication ...............................................................54
XMODEM File Transfer ..............................................................54
RS-485 Communication ..................................................................55
Developing an RS-485 Network...................................................55
Hardware Connection ...................................................................56
Direct Programming Using Serial Ports...............................................57
Attainable Baud Rates.....................................................................59
Z180 Serial Ports ............................................................................60
Asynchronous Serial Communication Interface...................................62
ASCI Status Registers .....................................................................62
ASCI Control Register A ................................................................64
ASCI Control Register B ................................................................65
SIO Serial Ports ...................................................................................67
Programming the SIO in Asynchronous Mode ...............................70
Chapter 5: Analog Section 73
Analog Inputs.......................................................................................74
Signal Conditioning ........................................................................74
Configuration 4 .......................................................................... 75
Configuration 5 .......................................................................... 75
Installing Components ....................................................................76
A/D Conversion ...................................................................................84
Sources of Error ..............................................................................84
Onboard Temperature Sensor..........................................................85
Analog Output......................................................................................87
Chapter 6: Software Reference 89
Supplied Software................................................................................90
Digital Interfaces..................................................................................91
KIO Counter/Timer Circuit (CTC) .................................................91
High-Current/High-Voltage Driver .................................................92
Liquid Crystal Display Interface .....................................................93
A/D Converter......................................................................................94
Temperature Measurements ..........................................................94
High-Speed Sampling .....................................................................95
Table of Contents
vBL1100
D/A Converter ......................................................................................96
Miscellaneous Drivers .........................................................................96
Time/Date Clock .............................................................................96
Time/Date Functions.....................................................................96
Watchdog Timer ..............................................................................97
Appendix A: Troubleshooting 99
Out of the Box....................................................................................100
Dynamic C Will Not Start ..................................................................100
Dynamic C Loses Serial Link ............................................................101
BL1100 Repeatedly Resets ................................................................101
PIO Problems.....................................................................................101
Power-Supply Problems.....................................................................101
Blown-Out 5841 Driver Chip ............................................................102
Common Programming Errors ...........................................................102
Appendix B: Specifications 103
Electrical and Mechanical Specifications ..........................................104
BL1100 Mechanical Dimensions ..................................................105
Jumper and Header Specifications.....................................................106
Wago Connector Signals ...............................................................107
LCD Interface ...............................................................................108
Serial Communication Signals ......................................................108
PIO Parallel Port and Other Lines ................................................109
BL1100 Expansion Bus.................................................................109
Jumper Configurations ..................................................................110
Appendix C: Memory, I/O Map, and Interrupt Vectors 113
BL1100 Memory................................................................................114
Physical Memory .......................................................................... 114
Memory Management ................................................................... 114
How Dynamic C Uses the MMU ..................................................116
Control over Memory Mapping .................................................... 118
Extended Memory Code ...............................................................118
Extended Memory Data ................................................................119
Execution Timing .......................................................................... 119
Memory-Access Timing ................................................................120
Memory Map .....................................................................................122
Time/Date Clock ................................................................................126
Initialized Memory Locations .......................................................127
Interrupt Vectors ................................................................................127
Nonmaskable Interrupts .....................................................................129
Power-Fail Interrupts ....................................................................129
vi
Table of Contents BL1100
Jump Vectors ......................................................................................130
Interrupt Priorities..............................................................................131
Appendix D: EEPROM 133
Parameters..........................................................................................134
Library Routines ................................................................................135
Appendix E: Power Management 137
Power Consumption ...........................................................................138
Intermittent Operation........................................................................139
Appendix F: Opto 22 Support 141
Appendix G: Sample Analog Applications 149
Semiconductor Temperature Sensor ..................................................150
Thermocouple ....................................................................................151
4–20 mA Loop ...................................................................................152
Appendix H: PLCBus 153
Overview............................................................................................154
Allocation of Devices on the Bus ......................................................158
4-Bit Devices ................................................................................158
8-Bit Devices ................................................................................159
Expansion Bus Software ....................................................................159
Appendix I: Simulated PLCBus Connection 165
PIO Port Connections ........................................................................166
Standard Z-World Expansion Boards............................................166
Software Drivers ................................................................................167
Using Expansion Boards with PIO 1 Port A .................................167
General-Purpose Drivers ............................................................167
Relay Expansion Board Drivers .................................................168
D/A Converter Expansion Board Drivers ...................................169
Appendix J: Standalone Operation 171
Reliability...........................................................................................173
Program Life .................................................................................173
Speed.............................................................................................174
Data Space ....................................................................................174
Cost ...............................................................................................174
Ease ...............................................................................................174
Remote Downloading ........................................................................174
Table of Contents
viiBL1100
Appendix K: BL1100 Expansion Boards 179
Introduction........................................................................................180
Installation .........................................................................................180
Address Mapping for Multiple Cards ...........................................182
Subsystems.........................................................................................183
Digital I/O .....................................................................................185
Programmable Peripheral Interface (PPI)...................................185
Port A ....................................................................................... 186
Port B ....................................................................................... 186
Port C ....................................................................................... 186
Operating Modes ........................................................................189
Mode 0 ..................................................................................... 189
Mode 1 ..................................................................................... 189
Mode 2 ..................................................................................... 189
TTL Input Buffer ........................................................................189
Pulse Width Measurement.............................................................190
Clocks .........................................................................................193
Other Information .......................................................................193
Analog Multiplexer .......................................................................194
Instrumentation Amplifier .............................................................195
A/D Converter...............................................................................196
DGL96 ..........................................................................................199
Software .............................................................................................200
IOEXPAND.LIB ...........................................................................200
96IO.LIB.......................................................................................205
Sample Programs ..........................................................................207
Pulse Width Measurement ..........................................................207
Other Sample Programs ..............................................................209
PWM PAL Equations ....................................................................210
Board Layouts....................................................................................211
I/O Map..............................................................................................216
Jumper and Header Specifications.....................................................220
ADC, DGL, and MUX Expansion Board Signals.........................220
DGL96 Expansion Board Signals .................................................221
Jumper Configurations ..................................................................222
Appendix L: Backup Battery 223
Battery Life and Storage Conditions..................................................224
Replacing Soldered Lithium Battery..................................................224
Battery Cautions ................................................................................225
Index 227
Schematics
viii s Table of Contents BL1100
About This Manual
ixBL1100
ABOUT THIS MANUAL
This manual provides instructions for installing, testing, configuring, and
interconnecting any of the Dynamic C programmable controllers in the
BL1100 series. (The BL1100 was previously called the Little Giant.)
The term “BL1100” will be used generically throughout this manual when
referring to any controller in the BL1100 series. Where information
applies to a specific controller, the model number will be specified.
Models currently covered by this manual include the BL1100, BL1110,
and BL1120.
Instructions to get started using Dynamic C software programming
functions as well as complete C and Dynamic C references and program-
ming resources are referenced when necessary.
Assumptions
Assumptions are made regarding the user's knowledge and experience in
the following areas:
Ability to design and engineer a target system that a BL1100 will
control.
Understanding of the basics of operating a software program and
editing files under Windows on a PC.
Knowledge of the basics of C programming.
For a full treatment of C, refer to the following texts.
The C Programming Language by Kernighan and Ritchie
C: A Reference Manual by Harbison and Steel
Knowledge of basic Z80 assembly language and architecture.
For documentation from Zilog, refer to the following texts.
Z180 MPU User's Manual
Z180 Serial Communication Controllers
Z80 Microprocessor Family User's Manual
BL1100x s About This Manual
Acronyms
Table 1 lists and defines the acronyms that may be used in this manual.
Icons
Table 2 displays and defines icons that may be used in this manual.
Table 2. Icons
Icon Meaning Icon Meaning
$
Refer to or see
!
Note
(
Please contact
7L
S
Tip
Caution
High Voltage
)'
Factory Default
Table 1. Acronyms
Acronym Meaning
EPROM Erasable Programmable Read-Only Memory
EEPROM Electronically Erasable Programmable Read-Only Memory
LCD Liquid Crystal Display
LED Light-Emitting Diode
NMI Nonmaskable Interrupt
PIO Parallel Input/Output Circuit
(Individually Programmable Input/Output)
PRT Programmable Reload Timer
RAM Random Access Memory
RTC Real-Time Clock
SIB Serial Interface Board
SRAM Static Random Access Memory
UART Universal Asynchronous Receiver Transmitter
About This Manual s xiBL1100
Conventions
Table 3 lists and defines the typographical conventions that may be used in
this manual.
Pin Number 1
A black square indicates
pin 1 of all headers.
Measurements
All diagram and graphic measurements are in inches followed by millime-
ters enclosed in parenthesis.
Table 3. Typographical Conventions
Example Description
while
Courier font (bold) indicates a program, a fragment of a
program, or a Dynamic C keyword or phrase.
// IN-01…
Program comments are written in Courier font, plain face.
Italics
Indicates that something should be typed instead of the
italicized words (e.g., in place of filename, type a file’s
name).
Edit
Sans serif font (bold) signifies a menu or menu selection.
. . .
An ellipsis indicates that (1) irrelevant program text is
omitted for brevity or that (2) preceding program text may
be repeated indefinitely.
[ ]
Brackets in a C function’s definition or program segment
indicate that the enclosed directive is optional.
< >
Angle brackets occasionally enclose classes of terms.
a | b | c
A vertical bar indicates that a choice should be made from
among the items listed.
J1
Pin 1
BL1100xii s About This Manual
BL1100 Overview
13
CHAPTER 1: OVERVIEW
BL110014 s Overview
Overview
The BL1100 is a versatile, general-purpose controller. Numerous digital,
analog, and serial channels support complex data collection and control
applications. The BL1100 is programmed using Dynamic C, Z-Worlds
version of the C programming language designed for embedded control.
Figure 1-1 illustrates the BL1100 board layout.
Figure 1-1. BL1100 Board Layout
EPROM
RAM
Expansion
Connector
Crystal
CTC Output
LCD
Interface
Z180
KIO
J12
J10
J6
J31
Power Driver
U1
RS-232
U02
J8 J7J9
J14
J13
J18
J014
RP8
RP9
RS-485 Xmt
U10
U3
ADC
U5
Ref.
U6
J17
Op-Amp
U8
Op-Amp
U7
U011
U9U14
J15
J16
J19
J28
DAC
U12
Buffer
U19
EEPROM
U16
U15
PAL
U11
PAL
U17
RTC
U18
J22
J21
D1
J24
J25
Reset
Button
J1
J2
J3
J4
J5
U4
RN4
RN5
Power Jack
Heat Sink
Analog Input
Analog
Output / Input
RS-485
Power High-Current
Output
J010
Lithium Battery
MAX691
J11
Parallel
Port
Parallel
Port
5 Wago
connectors
Z1
J20
RS-485 Rcv
BL1100 Overview s 15
Features
The BL1100 includes the following features.
Compactnessdimensions of 5.6" × 4.8" (140mm × 120mm).
Serial channelstwo RS-232 and two RS-485/RS-422 serial ports.
Configurable I/O16 programmable TTL and CMOS compatible I/O
lines based on the 16-bit PIO on the Zilog KIO chip.
High-current digital outputs8 high-current digital outputs based on
the Sprague 5841 driver. Channels can be paralleled for more current.
The drivers are protected against inductive kickback with integral
diodes and are suitable for driving solenoids.
Analog inputseight-channel A/D converter with configurable inputs.
A built-in temperature sensor uses one of the inputs, leaving seven
analog inputs for use by the application. The A/D converter can have
10-bit resolution (LTC1094) or 12-bit resolution (LTC1294).
Optional factory-installed analog output12-bit digital to analog
converter (DAC) with output in the range of 0 V to 2.5 V. The Maxim
AD7543 DAC is used with a MAX400 buffer amplifier for a maximum
output of 2 mA.
LCD interfacestandard LCDs (such as Optrex part number
DMC20481) can be plugged directly into the 14-pin connector. Many
compatible displays are available in various formats (2 ×16 or 4 × 40).
Z180 microprocessor running at 9.216 MHz with a partial wait state.
Higher clock rates are available for better performance.
Power failure detection and warning. A nonmaskable interrupt takes
place when power drops below a certain level. The program has a few
milliseconds to shut down.
Watchdog timer. When enabled, the watchdog timer automatically
resets the board if the watchdog timer system is not regularly hit by
the program. This reliability feature helps a system to recover from
software or hardware failures.
32K EPROM, supports up to 256K. Accepts either 28- or 32-pin ROM.
32K battery-backed SRAM, supports up to 512K. Either 28- or 32-pin
RAM can be used. The lithium battery mounted on the board will last
about 10 years.
512 bytes of EEPROM. One-half of the EEPROM memory (256
bytes) can be write-protected. EEPROM is used to hold the baud rate
and other semipermanent calibration or setup constants. (Can be
expanded to 2048 bytes by using different components.)
BL110016 s Overview
Battery-backed Epson 72421 real-time clock runs up to 10 years on the
lithium battery.
Both linear and switching power regulators are present on the board.
Enclosures are available from different suppliers in table-top plastic
clamshell or wall-mounted industrial versions. For example, the
Hoffman Engineering Company (Anoka, Minn.) enclosure D-864DLB
and mounting plate A-8P6 provide a sturdy steel electrical box. This
box can be wall mounted and connected to electrical conduit.
The analog inputs, analog output, power, RS-485, and high-current
outputs are on Wago connectors that accept up to approximately #18
copper wire. The Wago connectors have spring loaded clamps that
make it easy to install and remove wires without special tools. The
entire BL1100 series is also available without Wago connectors so that
other connector types may be added instead.
A 60-pin expansion connector allows a line of expansion boards
designed exclusively for the BL1100 series to be connected to the
microprocessor bus. Selected standard Z-World expansion boards can
also be connected to the PIO header.
BL1100 Overview s 17
(
Table 1-1. BL1100 Series Features
Model Features
BL1100
9.216 MHz clock, 16 configurable I/O, 8 high-current
digital outputs, 8 ten-bit analog inputs, 2 RS-232 and 2
RS-485/RS-422 serial ports, expansion bus, switching
regulator
BL1120 BL1100 with linear regulator
BL1120 BL1100 with 12.288 MHz clock and linear regulator
Table 1-2. BL1100 Options and Upgrades
Option Description
12-bit digital-to-
analog converter
Adds one analog output channel rated 2 mA at 0 V to 2.5 V
10-bit to 12-bit
analog-to-digital
converter upgrade
Upgrades analog-to-digital converter resolution to 12 bits
Op-amp upgrade
Replaces LT1094 op-amps with LT1014 for improved
temperature drift and input offset characteristics
SRAM 128K or 512K SRAM factory installed
BL1120 switching
power regulator
Switching power regulator factory installed on BL1120
Standard Models
The Bl1100 series of controllers has three versions. Table 1-1 lists the
specialized features for these versions. All three versions are available
either with Wago connectors or without any connectors to enable a
customer to use a customer-selected connector.
Options and Upgrades
Table 1-2 lists the options and upgrades available for the BL1100 series.
For ordering information, or for more details about the various
options and prices, call your Z-World Sales Representative at
(530) 757-3737.
BL110018 s Overview
(
Table 1-3. Expansion Boards Used With the BL1100
Expansion Board Description
Standard Z-World Expansion Boards
SE1100 Four SPDT relays
XP8300 Six SPDT relays
XP8400 Eight DIP SPST relays
XP8500
Four 12-bit ADC inputs with signal conditioning and
seven 12-bit ADC inputs without signal conditioning
XP8600 Two DAC outputs
Exp-A/D12 Eight 12-bit ADC inputs
Expansion Boards Unique to BL1100
ADC
One 8-bit PIO, two 4-bit optically isolated PIOs, eight
TTL inputs, one PWM channel, one 20-bit ADC input,
one instrumentation amplifier, and one 4-channel analog
mux
DGL
*
Two 8-bit PIOs, two 4-bit optically isolated PIOs, and
eight TTL buffered inputs
DGL96
**
96 individual I/O points
MUX
One 8-bit PIO, one 6-bit PIO, two 4-bit PIOs, and one
4-channel analog mux
* Available with or without Wago connectors.
** Available in stacking or nonstacking versions. Cannot be
used with BL1120.
Expansion Boards
The BL1100 has a 60-pin expansion connector that allows selected
standard Z-World expansion boards and a line of expansion boards
designed exclusively for the BL1100 series to be connected to the micro-
processor bus. Table 1-3 lists these expansion boards.
Appendix H provides more information about connecting expansion
boards to the microprocessor bus. Appendix K provides detailed
information on the expansion boards unique to the BL1100. Refer to
the manuals on the individual tandard Z-World expansion boards for
more information on the standard expansion boards.
For ordering information, or for more details about the various
options and prices, call your Z-World Sales Representative at
(530) 757-3737.
$
BL1100 Overview s 19
Development and Evaluation Tools
The BL1100 is supported by a Developers Kit that includes everything
you need to start development with the BL1100.
Developers Kit
The Developers Kit includes these items.
Manual with schematics.
Programming cables and adapter.
9 V DC power supply.
128K SRAM.
Software
The BL1100 is programmed using Z-Worlds Dynamic C, an integrated
development environment that includes an editor, a C compiler, and a
debugger. Library functions provide an easy and robust interface to the
BL1100.
Z-Worlds Dynamic C reference manuals provide complete
software descriptions and programming instructions.
$
BL110020 s Overview
/