Z-World PK2100 Series User manual

2900 Spafford Street Davis CA 95616 USA Tel: +916.757.3737 Fax: +916.753.5141 www.zworld.com Revision: A
Introduction
The PK2100 Series of C-programmable controllers is based on
the Zilog Z180 microprocessor. The PK2100 includes analog,
digital, serial, and high-current switching interfaces. The stan-
dard PK2100 includes a rugged enclosure with 2x20 LCD and
2x6 tactile keypad.
With the PK2100 Series you can detect contact closures, count
pulses, measure temperature, speed and pressure, control motor
speed, control proportional valves, switch fairly large currents,
and drive solenoids and external relays directly.
The PK2100 has a PLCBusTM expansion port, allowing you to
connect several Z-World expansion boards (such as the XP8100
or XP8300) if you need extra I/O.You can build networks of
controllers and communicate with modems. With Dynamic C
software and the PK2100’s LCD and keypad, you can easily
build operator interfaces.
The following PK2100 Series controllers are available:
PK2100 With enclosure, 2x20 LCD, and 2x6 keypad.
Operates at 24V nominal.
PK2110 With enclosure, 2x20 LCD, and 2x6 keypad.
Operates at 12V nominal.
PK2120 No enclosure, LCD, or keypad.
Operates at 24V nominal.
PK2130 No enclosure, LCD, or keypad.
Operates at 12V nominal.
The following PK2100 Series options are available:
•9.216 MHz clock upgrade. (6.144 MHz standard)
•128K flash (32K EPROM standard)
•128K or 512K RAM (32K standard)
• Backlit LCD (with PK2100 or PK2110)
Specifications
Board Size 5.5″ × 6.82″ × 0.78″.
Enclosure Size 5.5″ × 7.0″ × 1.6″.
Operating Temp. –40°Cto +70°C. With LCD, 0°Cto 50°C.
Humidity 5% to 95% non-condensing.
Input Power 18–35VDC, 220 mA, linear supply [24V]
Processor Z180
Clock 6.144 MHz [9.216 MHz optional]
Power Consumption 5.5W
Features
• Battery-backed static RAM, up to 512K bytes.
•EPROM, up to 512K bytes, or flash memory to 256K bytes.
• Battery-backed real-time clock (RTC).
• Lithium backup battery, rated at 560 mA-hours. Since the
RTC and full 512K RAM draw about 16 µA, the battery will
sustain the RTC and RAM for about 4years [35,000 hours].
• Watchdog timer.
• Power failure warning interrupt.
•EEPROM, standard 512 bytes. Holds calibration constants for
the (2) DAC channels, among other data.
•LCD. The standard screen has 2lines of 20 characters. Other
displays can be installed on special order.
• Keypad, 2rows of 6keys, for a total of 12 keys. The internal
interface provides for possible expansion to 24 keys using a
4row x 6column matrix.
• Beeper with high- and low-volume.
PK2100 or PK2110, with enclosure, LCD, and keypad
PK2120 or PK2130, board-only
C-Programmable Controller
PK2100 Series

PK2100 Series
Z-World 530-757-3737 2
References
Please refer to
•Z-World PK2100 schematic
• Z-World PLCBus data sheet
• Z-World Dynamic C data sheet
•Zilog Z180 MPU User’s Manual
•Zilog Z180 Serial Communication Controllers
•Zilog Z80 Microprocessor Family User’s Manual
Contents
Introduction ........................................... 1
Specifications ........................................ 1
Features ................................................. 1
The Interface ......................................... 3
The Terminals........................................ 3
Using the PK2100 ................................. 4
Real-Time Clock ................................... 6
U1
U2
U3
U4
U5
U6
Universal
Inputs
A/D–
A/D+
High
Gain
Input
O1
O2
O3
O4
O5
O6
O7
K
•
•
•
•
•
•
•
•
•
•
O8
O9
O10
+24V
UEXP
DAC
DAC Output
D1
D2
D3
D4
D5
D6
D7
LCD
C2B–
C2B+
C1
C1
C2
NC1
com1
NO1
Relay1
NC2
com2
NO2
Relay2
Digital
Input
Counter
Inputs
High-Current
Output
Z180
RAM
EPROM
EEPROM
Real-Time Clock
Battery
PLCBus
Rx–
Rx+
Tx–
Tx+
RS485/
RS422
Beeper
0
1
2
3
4
5
6
7
High-Current
Output
Keypad
RS232
Jack
Serial I/O ............................................... 6
LCD ....................................................... 7
Keypad................................................... 7
Beeper.................................................... 7
I/O Map ................................................. 7
EEPROM ............................................... 8
Heatsinking............................................ 9
Expansion Bus....................................... 9
Power Failure Interrupts........................ 9
12–Volt Version ..................................... 9
Programming with Dynamic C ............. 9
Parts List.............................................. 10
Jumpers and Headers........................... 11
Dimensions.......................................... 12
Figure 1. PK2100 Block Diagram

PK2100 Series
Z-World 530-757-3737 3
The Interface
A PK2100 Series controller has the following as its interface:
1Six universal inputs. Universal inputs can be used as
(A) digital inputs. With a single threshold (in software or
hardware) the input channel yields a digital 1when the input
voltage is above threshold and 0otherwise.
(B) digital inputs with two thresholds. Z-World software re-
turns a digital 1when the input voltage is above a high
threshold, a 0when voltage is below a low threshold, and re-
ports ‘no change’otherwise. It is a simple and logical exten-
sion to write software that handles several thresholds.Thus,
the universal inputs can be used as...
(C) analog inputs (with Z-World software).
The universal inputs accept 0–10V with 10-bit resolution,
and are protected against overloads in the range ±48 volts.
2One high-sensitivity (high-gain) differential analog input.
Normally, the high-gain input range is 0–1volt, but you can
change resistors (R5, R11, RP5) on the operational amplifier.
It has 10-bit resolution.
If you don’t use the high-gain channel, a seventh universal
input is available.
3Seven protected digital inputs, with a 2.5volt threshold.
Three of the inputs also function as counter inputs.
4Two counter channels capable of counting pulses at up to
600 kHz or more. The counter inputs can also be used to
measure pulse width and other pulse timing characteristics.
The counters use DMA hardware.
5Two on-board relays, rated for 3A at 48V, with NO, NC, and
COM terminals for each.You can install MOVs to protect re-
lay contacts.
6Ten high-current outputs suitable for driving relays or sole-
noids. These outputs can sink approximately up to 500 mA
at voltages up to 48V (when used individually) subject to to-
tal heat dissipation restrictions for the driver chips (1.25W).
7One analog output (DAC) which can be either a 0–10V volt-
age output or 0–20 mA current output. A second analog volt-
age output (UEXP), normally used by software to drive the
universal inputs, is available when the universal inputs have
a fixed hardware threshold. The DACs have 10-bit resolution.
8An RS422/RS485 serial port and an RS232 serial port with
two handshaking lines operate at up to 38,400 baud. A sec-
ond RS232 port can be configured as a substitute for the
RS485 port by changing board jumpers. It has no handshak-
ing lines.
9A 26-pin expansion bus (PLCBusTM) for Z-World PLCBus de-
vices or customer-designed devices. Refer to the PLCBus
data sheet.
TheTerminals
There are 50 screw terminals used for input, output, and power
connections. There are two connectors on the sides of the unit:
a RJ12 “phone jack” for the RS232 port, and a 26-pin connector
for the expansion bus.
The signal names of the screw connectors are shown below.
Signal Meaning
+10V Ref Output from U11, analog reference voltage.
+5V Output from 5V regulator
GND Ground
U1–U6 Universal inputs
D1–D7 Digital inputs
C1A, C1B Counter 1 inputs
C2A Counter 2 input
C2B+, C2B– Counter 2 inputs, differential
TX–,TX+ RS485 Transmit
RX–, RX+ RS485 receive
+24V External power
KProtection for high-current outputs O1–O7
O1–O10 High-current outputs
A/D– Negative side of high-gain input
A/D+(1) Positive side of high-gain input, or
(2) the seventh universal input
DAC DAC output, 0–20 mA or 0–10 volts.
UEXP Internal DAC, output is 0–10V.
NC, COM, NO Relay contacts for relays 1and 2
+10V ref
+5V
GND
U1
U2
U3
U4
U5
U6
GND
D1
D2
D3
D4
D5/C1A
D6/C1B
D7/C2A
GND
GND
Tx–
Tx+
Rx–
Rx+
C2B+
C2B–
+24V
K
GND
O1
O2
O3
O4
O5
O6
O7
O8
O9
O10
GND
A/D–
A/D+
DAC
UEXP
NC
COM
NO
NC
COM
NO
GND
Universal
Inputs Digital
Inputs
Digital
Outputs
Relay1 Relay2
RS485 /
RS422/
High-Gain Input DAC Output
Diff.
Counter
DC In
For 12-volt versions of the PK2100,
• The connector labeled “+10V ref” is +7volts.
• The connector labeled “+24V” is +12 volts.
•DAC output (either channel) is not 0–10V, but 0–7V.
• Universal input range (any) is not 0–10V, but 0–7V.
• The high-gain channel is not 0–1V, but 0–0.7V.
• Relay coil voltage is 12V. Relay rating is 5A/120V.
Figure 2. PK2100 Signals

PK2100 Series
Z-World 530-757-3737 4
Using the PK2100
Universal Inputs
Figure 3below shows the six universal inputs and the high-gain
input. A seventh universal input is available if you do not use
the high-gain channel. (Note that the high-gain input is channel
6and that the “spare” universal input is channel 7.)
Each input channel has a comparator that yields a 1when the
input level is greater than a threshold, and 0otherwise.
By placing a jumper at J9, you can (1) choose the fixed hard-
ware threshold (1.6V by default) or (2) use the internal DAC to
generate a threshold. When software generates the thresholds
using the DAC, you can compare inputs against as many thresh-
olds as you like. Z-World software compares against 1or 2
thresholds for digital input; it compares against several thresh-
olds for analog input (using successive approximation).
Channel 5(labelled U6) can be 4-20 mAcurrent loop if you
connect pins 7and 8of H5.
The internal DAC channel usually generates the reference volt-
age for the inputs. However, if you connect the fixed hardware
reference at jumper J9, this DAC channel is available at UEXP
on the screw terminals.
High-Gain Analog Input
This input is useful for devices requiring higher input sensitiv-
ity, for example, thermistors or RTDs in a bridge. The input
range is 0–1.0V with 10-bit resolution. The gain at the plus and
minus inputs is 10 when jumper H7 is installed. If H7 is re-
moved, then the gain of the plus input becomes higher: 11. The
calibration gain and offsets are stored in the EEPROM.
The gain, when H7 is connected is
y = a1
×
(x1+ a0) – b1
×
x2[1]
where
a1is the positive side scale.
a0is the positive side offset.
b1is the negative side scale.
x1is the positive side input.
x2is the negative side input.
Note that b1= a1– 1(with H7 not connected). If the negative
input x2is tied to ground, then the equation becomes
y = a1
×
(x1+ a0)[2]
or, solving for x1,
x1= y/a1– a0[3]
This equation returns the input voltage, given the reading.
Solving equation 1for (x1–x2) in terms of yand x1yields
(x1–x2) = y/b1– (a1/b1– 1)
×
x1– a0
×
a1/b1[4]
If you want to change the gain of the high-gain input, change
R5, R11, and possibly RP5. These are factory set to 47K, 47K,
and 470K for a factory gain of 10 (or 11, if H7 is removed).
When differential inputs are desired, it is preferable to operate
with H7 removed, since the scaling difference between the
+10 volt reference
430Ωresistor, 4–20 mA loop,
channel 5 (U6) only. Connect H5:7–8
0.01µ
+
–
4.7K
comparator
LM339A
RP4
UINx 10K
3.3K
reading to U8 or U9
+
–
10K reading to U9
Channels 0–5,
labelled U1–U6
Channel 6, high-
gain, not labelled
comparator
LM339A
RP6 b
10K
+
–
100 pF
RP5 a
470K SOUT
RP5 b
AIN+
AIN–
R11
47K
470K
R5
47K
10K
+
–
10K reading to U30
0.01µ
R23
comparator
LM339A
22K
+
–
DAC
U22
DACI0
DAV/R
RR
V/EXP UEXP
10K
5.1K
J9
1.6V
22K
Channel 7,
labelled AD+
IO address is UINP bit 6
I/O address is DREG2, bit 7
I/O address is UINP bits 0–5
RP6 a
RN6
R28
op-amp
LM324A
op-amp
LM324A
H1
H7
Jumper H4 to H6 to pull up
Jumper H5 to H6 to pull down
+10 volt ref
. . . . .
Figure 3. Universal Inputs and High-Gain Channel

PK2100 Series
Z-World 530-757-3737 5
positive and negative inputs will be exactly 1and will not de-
pend on a balance between resistors, making the output 5volts
when both differential inputs are 5volts.
If the gain is increased, it becomes necessary to use an opera-
tional amplifier with a more stable offset voltage than the
LM324, which has considerable drift over temperature. The
Linear Technology LM1014 is suitable for gains up to 100 or
more. The negative input has a low input impedance compared
to the positive input (when H7 is removed). If R5 is decreased
to increase the gain, this impedance becomes even lower. When
a bridge is used, the finite impedance of the negative input has
the effect of changing the gain slightly.
Digital Inputs
The 7digital inputs accept an input voltage with a digital
threshold at approximately 2.5volts. The inputs are protected
against overload over the range of –48 to +48 volts.
+5V
0.01 µFDigital Input
22k
Input
10k
low-pass
filter
These inputs are convenient for detecting contact closures or
sensing devices with open collector transistor outputs. Logic
level outputs can also be detected if they are supplied from
CMOS logic outputs which are guaranteed to swing to at least
3.5volts. Three of the digital inputs (D5–D7) also function as
inputs to the high speed counters.
Counter Inputs
Three of the digital inputs also serve as counter inputs. There
is, in addition, a special differential counter input. The counter
inputs are arranged as shown here:
+
–Differential receiver
+5V
C1A
+5V
C1B
+5V
C2A
C2B+
C2B– C2B
/DREQ0
/DREQ1
CKA1
Counter 1
Counter 2
J8:7-8
J8:9-10
U34
The counters sense negative edges. The differential receiver in-
put can be used as a digital input by attaching one side of it to
the desired threshold voltage. It can be used as a true differen-
tial input for such devices as inductive pickups. It has a com-
mon mode voltage range from –12 to +12 volts with an input
hysteresis of 50 millivolts. An internal jumper can connect the
signal CKA1 which is controlled by the serial port hardware. It
can be set to various speeds from 600 kHz down to 300 Hz.
The counters use the DMA channels of the Z180. The maximum
counting speed is approximately 600 kHz. The DMA channel
can be programmed to store a byte from an I/O port to memory
for each count, if desired. This byte can be the least significant
byte of the internal programmable counter (PRT) which allows
the count edge to be localized in time. This feature can also de-
termine the exact time, within a few microseconds, at which an
event occurs by programming the DMA channel to store one
byte and then interrupt. The interrupt routine can read the most
significant part of the PRT counter and any software extension
of this counter. In general, the maximum count is 65,536 which
can be extended by software to larger counts if the counting
speed is not higher than about 10 kHz.
The capabilities of the counter are summarized as follows:
1 Measure the time at which a negative edge occurs with a
precision of a few microseconds. The measurement can be
repeated hundreds of times per second. A minimum time
must occur between successive events to allow for interrupt
processing.
2 Measure the width of a pulse by counting (up to 65,536) at a
rates from 600 kHz to 300 Hz.
3 Count negative-going edges for each two channels. The
maximum count for high-speed counting (5 kHz to 600 kHz)
is 65,536. For low speed counting, the maximum count not
limited by hardware.
Analog Output
One analog output (named DAC) is provided. The output can be
either a 0–10V (connect jumper J7:2-3) voltage output or a 0–20
mA current output (connect J7:1-2) suitable for driving 4–20
mA current loops. It will drive 20 mAup to 470 ohms. The
resolution is 10 bits.
259
U31
DAC8, U29
OUT
8
+
–
324
BIT[9-2]
MSB
1640K
820K
3.9K
273
U24
8
D[0–7]
A[0–2]
D0
U27C
+
–
324
U27B
470K
470K 10K
100p
10
J7
Current
Voltage
DAC
10K
BITS
BIT[0]
LSB
BIT[1]
100p
An 8-bit DAC chip, a network of resistors, and LM324 op-amps
produce the output. Software writes the 10-bit output value to
three registers:
DAC UEXP Which bits
0x90 0x88 Bits 9–2
0xA2 0xA0 Bit 1
0xA3 0xA1 Bit 0
Another 10-bit analog output channel (UEXP) is available if it is
not used to provide reference voltage for the universal inputs. It
produces 0–10V with 10-bit resolution.
+
–
324
3.9K
U27A
100p
UEXP
259
U31
DAC8, U22
OUT
8
BIT[9-2]
MSB
1640K
820K
273
U28
8
D[0–7]
A[0–2]
D0
BITS
BIT[0]
LSB
BIT[1]
Note that UEXP is not identical to the first DAC channel.

PK2100 Series
Z-World 530-757-3737 6
High-Current Switching Outputs
There are 10 high-current outputs O1–O10 available at external
terminals. Seven of the outputs belong to one high-current
driver (U26) and three belong to another (U35).
Outputs O1–O7 use a common connector (“K”) for the protec-
tive diodes. All loads connected to the same driver chip must
use the same power supply so the diodes can return inductive
spikes to the same power supply.
your
inductive
load
A digital output
channel, O1–O7
K
your external power
supply, e.g. 48V
If you use the PK2100’s on-board power supply (+24V or +12V
nominal) for your load, you should route Kto it by connecting
jumper H11, as shown:
your
inductive
load
A digital output
channel, O1–O7
K
H11
+24V+24V
The diodes for outputs O8–O10 use the on-board power supply
directly.
The driver used is the ULN2003 (Texas Instruments). Each
driver chip can dissipate a maximum of 1.25 watts when the
ambient temperature is 60°C. Each output consumes power, de-
pending on the current, as follows:
100 mA 0.10 watt
200 mA 0.25 watt
350 mA 0.50 watt.
This limits the maximum current to approximately 150 mA per
output if all outputs are turned on at the same time continu-
ously. The maximum current for any single output is 500 mA.
Relay Outputs
There are two SPDT relays rated at 3A, 48 volts. The three con-
tacts for each relay have terminals (NC, NO, COM on the termi-
nal strips).You have the option to install MOVs on the board to
protect the relay contacts.
M4
C1
NO1
M5
M2
C2
NO2
M3
NC1 NC2
Battery-Backed Real-Time Clock
The real-time clock stores a representation of time and date,
and runs independently. The RTC can be programmed to inter-
rupt the processor periodically through the INT2 interrupt line.
Please refer to the Toshiba TC8250 data book for detail.
The Serial Ports
The Z180 has two independent, full-duplex asynchronous serial
channels, with a separate baud rate generator for each channel.
The baud rate can be divided down from the microprocessor
clock, or from an external clock for either or both channels.
microprocessor internal bus
ASCI
Control
Transmit Data
Reg:TDR0
Transmit Shift
Reg:TSR0
Receive Data
Reg:RDR0
Receive Shift
Reg: RSR0
Control Register A:
CNTLA0
Control Register B:
CNTLB0
Status Register:
STAT0
Transmit Data
Reg:TDR1
Transmit Shift
Reg:TSR1
Receive Data
Reg:RDR1
Receive Shift
Reg: RSR1
Control Register A:
CNTLA1
Control Register B:
CNTLB1
Status Register:
STAT1
interrupt request
Baud Rate Gen. 0
Baud Rate Gen. 1
CKA
1
CKA
0
TXA
0
RXA
0
RTS
0
CTS
0
DCD
0
TXA
1
RXA
1
CTS
1
The serial ports have a multiprocessor communications feature
that can be enabled. When enabled, an extra bit is included in
the transmitted character (where the parity bit would normally
go). Receiving processors can be programmed to ignore all re-
ceived characters except those with the extra multiprocessing
bits enabled. This provides a 1-byte attention message that can
wake up a processor without the processor having to monitor
(intelligently) all traffic on a shared communications link.
The serial ports can be polled or interrupt-driven. Normal serial
options are available: 7or 8data bits, 1or 2stop bits, odd, even
or no parity, and parity, overrun, and framing error detection.
Port 0
Port 0is RS232; its connector is the RJ12 jack. It has CTS and
RTS handshaking lines. Port 0is constrained by hardware to
have the CTS (clear to send) pulled low by the RS232 device
with which it is communicating.
If the device with which the port is communicating does not
support CTS and RTS, the CTS and RTS lines on the PK2100
side can be tied together to make communication possible.
Port 1
Port 1is RS485 normally, with transmit and receive lines on the
screw terminals.You can use port 1as an RS232 port, but it has
no CTS/RTS handshaking.

PK2100 Series
Z-World 530-757-3737 7
Baud Rates
The Z180 serial ports can generate standard baud rates. When
the clock is 6.144 MHz, rates range from 150 to 38.4kHz. When
the clock is 9.216 MHz, rates range from 75 Hz to 19.2kHz.
LCD
The 2×20 LCD used with the PK2100 can come from one of sev-
eral vendors. All the LCDs are identical in operation, electrical
connections, and dimension. They may differ in timing.
An LCD can take up to 1600 µs to carry out an operation.
Therefore it provides a busy flag, which you may read at ad-
dress LCDRD (0xD0). It is an error to send other commands or
data to an LCD while it is busy.
To communicate with the LCD, send commands to address
LCDWR (0xD8). Command values are built into the command.
To write data to the LCD, use address LCDWR+1. To read data
from the LCD, except for the busy flag, use address LCDRD+1.
Refer to any of the LCD manufacturers’ data sheets for infor-
mation regarding LCD operations.
The LCD connector is a 2×7header, P2.
Keypad
To read the 2×6matrix keypad, you “drive” the row or rows
you wish to sample, then read the columns. Any or all keys
may be sensed.
There are four keypad “rows” at addresses KEYR1–KEYR4
(0x86, 0x81, 0x85, 0x87 respectively) and six keypad columns
readable as bits 2–7of DREG1 (0x81).
The PK2100 can address four keypad rows, but presently there
is support only for 2 keypad rows.
Jumper block J4 uses keypad signals (/KH2, and KV1–KV3) for
operation mode settings.
Beeper
The on-board beeper has two volume levels. Alternately send 1
then 0to make it oscillate. Write to BEEPH (0x83) for high vol-
ume. Write to BEEPL (0x98) for low volume.
I/O Map
The internal Z180 I/O registers occupy the first 64 (0x40) ad-
dresses of the I/O space. Refer to the Z180 MPU User’s Manual.
The following I/O addresses control the PK2100 devices which
are external to the Z180 processor.
Write Registers
Addr Bit Symbol Function
0x80 0 SDA_W EEPROM data, write.
0x81 0 KEYR2 Keypad drive row 2. Open collector, “1”
drives low.
0x82 0 ENB485 Enable RS485 channel
0x83 0 BEEPH Beeper, high-voltage drive. “1” drives
beeper.
0x84 0 SCL EEPROM clock.
0x85 0 KEYR3 Keypad drive row 3. Open collector, “1”
drives low.
0x86 0 KEYR1 Keypad drive row 1. Open collector, “1”
drives low.
0x87 0 KEYR4 Keypad drive row 4. Open collector, “1”
drives low. Also, tenth high-current output
(DRV10) if key row not used.
0x88 0–7 UEXP Internal DAC, bits 9-2. See also UEXPA and
UEXPB below.
0x90 0–7 DAC External DAC, bits 9-2. See also DACA and
DACB below.
0x98 0 BEEPL Beeper, low-voltage drive drive. “1” drives
the beeper.
0x99 0 DRV1 Digital output 1. “1” drives output.
0x9A 0 DRV2 Digital output 2. “1” drives output.
0x9B 0 DRV3 Digital output 3. “1” drives output.
0x9C 0 DRV4 Digital output 4. “1” drives output.
0x9D 0 DRV5 Digital output 5. “1” drives output.
0x9E 0 DRV6 Digital output 6. “1” drives output.
0x9F 0 DRV7 Digital output 7. “1” drives output.
0xA0 0 UEXPA Internal DAC, bit 1.
0xA1 0 UEXPB Internal DAC, bit 0.
0xA2 0 DACA External DAC, bit 1.
0xA2 0 DACB External DAC, bit 0.
0xA4 0DRV8 Digital output 8. “1” drives output
0xA5 0DRV9 Digital output 9. “1” drives output
0xA6 0RLY1 “1” enables relay 1.
0xA7 0RLY2 “1” enables relay 2.
0xC8 0–7 BUSADR0 Expansion bus, first address byte
0xCA 0–7 BUSADR1 Expansion bus, second address byte
0xCC 0–7 BUSADR2 Expansion bus, third address byte
0xCE 0–7 BUSWR Expansion bus write to port
0xD8 0–7 LCDWR LCD write register, control
0xD9 0–7 LCDWR+1 LCD write register, data
OxE0 0–3RTRW Real time clock, read/write data registers
0xF0 0–3 RTALE Real time clock, write address latch
Read Registers
Addr Bit Symbol Function
0x80 0–7 UINP Bits 0–6are universal inputs 0–5and the
high-gain analog input (bit 6). Bit 7is PR, a
user-programmable jumper (J8 pins 11-12)
and is low when the jumper is installed.
0x81 0–7 DREG1 Bit 0is EEPROM data bit. Bit 1is NMI inter-
rupt line (power fail line). Bits 2–7are key-
pad columns 0–5.
0x88 0–7 DREG2 Bits 0–6are digital inputs 0–6. Bit 7is the
universal input channel fed through AD+ (or
universal input channel 8).
0x98 — WDOG Reading this location “hits” the watchdog
timer.
0xC0 0–7 BUSRD0 First read, data port of expansion bus
0xC2 0–7 BUSRD1 Second read, data port of expansion bus
0xC4 0–7— Unused bus read address
0xC6 — BUSRESET Read this location to reset all devices on the
expansion bus.
0xD0 0–7 LCDRD LCD read register, control
0xD1 0–7 LCDRD+1 LCD read register, data

PK2100 Series
Z-World 530-757-3737 8
Interrupt Vectors
Most of the interrupt vectors can be altered under program con-
trol. These are the suggested and default vectors:
Addr Name Description
0x00 INT1_VEC Expansion bus attention INT1 vector.
0x02 INT2_VEC INT2 vector, can be jumpered to output of
the real-time clock for periodic interrupt.
0x04 PRT0_VEC PRT timer channel 0
0x06 PRT1_VEC PRT timer channel 1
0x08 DMA0_VEC DMA channel 0
0x0A DMA1_VEC DMA channel 1
0x0C CSIO_VEC Clocked serial I/O
0x0E SER0_VEC Asynchronous Serial Channel 0
0x10 SER1_VEC Asynchronous Serial Channel 1
JumpVectors
Instead of loading the address of the interrupt routine from the
interrupt vector, the following interrupts cause a jump directly
to the address of the vector, which will contain a jump instruc-
tion to the interrupt routine. For example,
0x66 non-maskable power-failure interrupt
0x08 INT0, mode 0
0x38 INT0, mode 1
Interrupt Priorities from Highest to Lowest
InternalTrap(Illegal Instruction)
External NMI (non maskable interrupt, power failure)
External INT0 (non-maskable, level 0)
External INT1 (non-maskable, level 1, expansion bus at-
tention line)
External INT2 (non-maskable, level 2)
Internal PRT timer channel 0
Internal PRT timer channel 1
Internal DMA channel 0
Internal DMA channel 1
Internal Clocked serial I/O
Internal Serial Port 0
Internal Serial Port 1
EEPROM
The parameters given here apply to the standard 24-volt
PK2100. See The 12-Volt PK2100 (page 9) for changes relating
to the12-volt version.
Addr. Definition
0x000 Startup Mode. If 1, enter programming mode. If 8, execute
loaded program at startup.
0x001 Baud rate in units of 1200 baud.
0x100 Unit “serial number.” BCD time/date with the following for-
mat: second, minutes, hours, day, month, year.
0x106 Required power voltage. This value is 24 for standard
PK2100s and 12 for the 12-volt version.
0x107 Software test version (times 10). For version 1.2, this is 12.
0x108 Microprocessor clock speed in units of 1200 Hz (16-bits).
For 6.144 MHz clock speed, this value is 5120.
0x10C Bus address for networking. 16 bits.
0x10E Analog voltage reference units of 1millivolt. 16 bits. 10300
for 10.300 volts.
0x110 Excitation resistor values for universal inputs 1–6. These are
the pull-up resistors to the +10V reference. Six integers in
units of 0.5ohm. 6600 for 3.3K resistors.
0x11C Pull-down resistor values for universal inputs 1–6. Six inte-
gers in units of 0.5ohm. 9400 (4.7K ohms).
0x128 4–20 mAload resistor. Resistance in units of 1/2 ohm. The
nominal value is 780 (2counts/ohm x 390 ohms). This rep-
resents the combined resistance of the load resistor and the
pull-down resistor in parallel.
0x12A Reserved
0x130 11 values relating to internal DAC. First value is output volt-
age when nominal output is zero. Additional values are out-
put voltage increment (above offset) when input value is 1,
2, 4... 256, 512. Stored as integers expressed in 0.5millivolt
units.
0x146 11 values relating to external DAC. First value is output volt-
age when nominal output is zero. Additional values are out-
put voltage increment (above offset) when input value is 1,
2, 4... 256, 512. Stored as integers expressed in 1/2 millivolt
units.
0x15C For the standard PK2100, this is current in units of 0.001 mA
corresponding to voltage output of 2.000V when is set for 0-
20 mAoutput into nominal 392 ohm load resistor. Typically,
near 4000. For the 12-volt PK2100, the output range is 0-15
mA.
0x15E For the standard PK2100, this is current in units of 0.001 mA
corresponding to voltage output of 10.000 volts when is set
for 0-20 mAoutput into nominal 392 ohm load resistor. For
the 12-volt PK2100, the output range is 0-15 mA.
0x160 With shorting jumper H7 connected, these are 16-bit num-
bers a0 and a1 high-gain plus-side inputs in the gain for-
mula y= a1 x (x1 + a0)
with the minus side grounded. If the minus side is not
grounded, the formula is
y= a1 x ( x1 + a0 ) – b1 x x2.
where b1 is the minus-side gain and can be computed from
the calibration constants stored at location 0x164. The value
yis the output of the high-gain amplifier read with universal
input channel 7. The value x1 is the plus-side input read
with universal input channel 8and x2 is the minus-side in-
put.
The coefficient a0 is signed and is in units of 0.01 mV. The
coefficient a1 is the unsigned dimensionless gain expressed
in units such that a gain of 10 is equal to 2000.
0x164 With shorting jumper H7 removed, these are 16-bit numbers
a0 and a1 high gain plus-side input in the gain formula
y= a1 x (x1 + a0)
with the minus side grounded. If the minus side is not
grounded, the formula is
y= a1 x ( x1 + a0 ) – b1 x x2.
where b1 is the minus-side gain and can be computed as
a1–1.
0x168 Reserved
0x16A Resistance of excitation resistor for high-gain plus input in
ohms. Nominal value 10K.An unsigned integer.
0x16C Long coefficient relating speed of microprocessor clock
relative to speed of real-time clock. Nominal value is
107,374,182 which is 1/40 of a second microprocessor clock
time on the scale where 232 is 1second. This requires 4
bytes of EEPROM, stored least byte first.

PK2100 Series
Z-World 530-757-3737 9
Heat Sinking
A PK2100 Series controller has two power supply regulators.
The aluminum enclosure provides the heat sink. In the board-
only version, the mounting rails provide the heat sink. The +5V
regulator dissipates the most heat and transfers heat to the case
or side rails via two mounting “pem” nuts. Maximum heat dis-
sipation by this regulator is 10W when the ambient temperature
is 50°C. If an attempt is made to dissipate more heat because of
a combination of high input voltage or excessive current draw
on the +5V supply, the regulator will shut down protectively.
Power dissipation is given by the formula:
P= (VIN – 5) ×(I+ 0.15)
VIN = input voltage
I= current, in amperes, drawn from +5V supply by external
accessories on bus or from VCC terminal.
EnvironmentalTemperature Constraints
No special precautions are necessary over the range of
0–50°C(32–122°F). For operation at temperatures much below
0°C, the PK2100 should be equipped with a low temperature
LCD which is specified for operation down to –20°C. The heat-
ing effect of the power dissipated by the unit (about 5 watts)
may be sufficient to keep the temperature above 0°C, depend-
ing on the insulating capability of the enclosure used. The LCD
storage temperature is 20°Clower than its operating tempera-
ture, which may protect the LCD in case the power should fail,
removing the heat source. The LCD unit is specified for a maxi-
mum operating temperature of 50°C. Except for the LCD, which
fades at higher temperatures, the PK2100 can be expected to op-
erate at 60°C, or more, without problem.
Expansion Bus
The PLCBus,TM is a general purpose expansion bus for Z-World
controllers. Z-World currently sells the following expansion de-
vices. The list may change:
Device Description
XP8100 Several options of 16 or 32 protected digital I/O lines. Some
versions have optical isolation.
XP8200 16 “universal inputs,” 6high-current switching outputs
XP8300 Six SPDT power relays
XP8400 Contains eight DIP relays, each SPST, NO.
XP8500 11 12-bit A/D converters (4 with signal conditioning)
XP8600 2 DACs
XP8700 1 full-duplex RS232 channel
XP8800 Stepper motor controller (based on PCL-AK)
Multiple expansion boards may be daisy-chained together and
connected to a Z-World controller to form an extended system.
For details, refer to the PLCBus data sheet.
Power Failure Interrupts
The following events occur when power fails:
1The power-failure NMI (non-maskable interrupt) is triggered
when the unregulated DC input voltage falls below approxi-
mately 15.6 volts (subject to the voltage divider R9/R33).
[7.8V on 12V systems]
2A system reset is triggered when the regulated +5V supply
falls below 4.5volts. The reset remains enabled as the volt-
age falls further. At some point, the chip select for the SRAM
is forced high (for standby mode). The time/date clock and
SRAM are switched to the lithium backup battery when VCC
falls below the battery voltage of approximately 3volts.
The 12-Volt PK2100
The following are changes for the 12-volt PK2100. Note that
R40 and U12 are absent on the 12V board, and R9 is 14K, not
22K. The 12V board has 12V relays, nominally 5A,120V.
Subsystem Effect
External DAC The external DAC voltage output (when J7 con-
nects pins 2–3) is reduced to 0–7volts. The current
output (J7 connects pins 1–2) is now 0–15 mA.
Internal DAC The internal DAC voltage output (UEXP) is re-
duced to 0–7volts. This directly affects the univer-
sal input channels, since the incoming value is
compared against the UEXP output.
Universal Inputs Because of the change in the internal DAC (UEXP)
output, the universal input channels read a nomi-
nal range of 0–7V.
High-Gain Input The effective input range to 0–700 mV.
EEPROM changes for the 12V system
Addr Meaning
0x106 Required power. This value is 12 for the 12-volt version.
0x15C For the 12-volt PK2100, this is current in units of 0.001 mA
corresponding to voltage output of 2.000V.
0x15E For the 12-volt PK2100, this is current in units of 0.001 mA
corresponding to voltage output of 10.000 volts.
Other EEPROM values remain unchanged.
Reference Voltage
The reference voltage (marked +10V on the terminal connector)
is nominally +7volts. This affects all subsystems using this
value as a reference, as described below.
Programming
Developers program a PK2100 Series controller by connecting it
to the serial port of an IBM PC running Z-World’s Dynamic C
development system. Serial communication for programming
takes place at 19,200 baud or at 38,400 baud. While a program is
undergoing development, the controller normally remains con-
nected to the PC and Dynamic C.
Once program development is complete, the completed pro-
gram can reside in one of the following places:
• Battery-backed RAM.
•ROM which is written on a separate ROM programmer and
then substituted for the standard Z-World ROM.
• Flash memory which may be programmed or reprogrammed
without removing it from the controller.
Programmers generally use Dynamic C function libraries. Dy-
namic C libraries support direct I/O and virtual I/O (which is
easier but slightly less efficient). The virtual driver is a system
function that monitors the PK2100 I/O lines, every 25 millisec-

PK2100 Series
Z-World 530-757-3737 10
onds. The programmer reads and writes to virtual registers as
variables, and does not contend with the hardware details.
Initial PK2100 Setup
When the PK2100 powers up, it consults its board jumpers, the
keypad if any, and the contents of the EEPROM to determine its
mode of operation. The modes of operation are the following:
• Run a program stored in battery-backed RAM.
• Prepare for Dynamic C programming at 19.2K baud using
the RS232 port (“phone” jack).
• Prepare for Dynamic C programming at 38.4K baud using
the RS232 port.
If your controller has a keypad, you can use it to select the op-
eration mode. Hold down the menu/setup key and one other
key simultaneously (field/run, up/pgm 19.2, or down/pgm 38.4).
The unit will beep to acknowledge the change of operating
mode. In unusual instances, you might also need to cycle
power while holding the key combination.
If the keypad is not available, or you want to override the key-
pad, use the jumper block J4.
Connecting the PK2100 to your PC & Dynamic C
1 Connect the red-tagged lead from your 24V (or 12V) power-
supply to the +24V screw connector. Connect the other
power supply lead to the GND screw connector.
2 Plug the serial programming cable into the PK2100 jack and
connect it to a PC serial port.
3 Plug the PK2100’s power supply into a wall socket. Start Dy-
namic C.
Software Drivers
Z-World software includes the functions listed here.
Digital Input/Output
• void up_setout( int channel, int value )
• void up_digin( int channel )
Analog Output
• void up_daccal( int value )
• void up_dacout( int rawval )
• void up_expout( int rawval )
• void up_dac420( int current )
Analog Input
• void up_adcal( int channel )
• void up_in420()
• void up_adrd( int channel )
• void up_adtest( int channel, int testval )
• void up_uncal( int calval )
• void up_docal( int calval )
• float up_higain( int mode )
High Speed DMA Counter
• void DMA0Count( uint count )
• void DMA1Count( uint count )
• uint DMASnapShot( byte channel, uint *counter )
EEPROM Read / Write
• int ee_rd( int address )
• int ee_wr( int address, char data )
• int eei_rd( int address )
Flash EPROM Write
• int WriteFlash( ulong addr, char* buf, int num )
Parts List
Listed are major parts. Resistors, capacitors and other small
parts may be found on the schematic.
B3 Battery, 3V, 560 mA-H
BZ1 Buzzer
H1 1x9 Header, .100″
H4 1x6Header, .100″
H5 1x8Header, .100″
H6 2x6Header, .100″
H7 1x9Header, .100″
H8 2x3Header, .100″
H9 1x9Header, .100″
H11 2x1Header, .100″
J1 1x14 Header, .100″
J3 1x3Header, .100″
J4 1x8Header, .100″
J7 1x9Header, .100″
J8 2x7Header, .100″
J9 1x3Header, .100″
J11 1x3Header, .100″
JP1 Phone Jack RJ12
JP2 Terminal strip 25x
JP3 Terminal Strip 25x
K1 Keypad flex connecter
P1 2x13 Header for PLCBus
P2 2x7 Header, .100″
SW1 2x1 Header, .100″
U1 EPROM and socket, 32K
U2 SRAM, 32K, 70ns
U3 Octal 3-state transceiver, 74HC245
U4 Octal 3-state transceiver, 74HC245
U5 EEPROM, 512, 24C04
U6 PAL (for PK2100)
U7 Dual decoder 2:4, 74HC139
U8 Quad 2:1mux, 74HC257
U9 Quad 2:1mux, 74HC257
U10 Watchdog, 691
U11 Adjustable Reg, 723, 150mA
U12 Linear Reg, 7805, 15V, TO-220
U13 Switching Reg, 7662
U14 8-bit addressable latch, 74HC259
U15 Real-Time Clock, Toshiba 8250
U16 Z180
U17 Hex inverter, open drain, 74HC05
U18 Quad 2-in OR, 74HC32
U19 Quad 2-in OR, 74HC32
U20 Linear Reg, 7805, 5V, TO-220
U21 Comparator, 339
U22 8-bit DAC

PK2100 Series
Z-World 530-757-3737 11
U23 8-bit addressable latch, 74HC259
U24 Octal FF w clear, 74HC273
U25 Diff. Bus transceiver, 75176A
U26 7-chan sinking HC driver, 2003
U27 Opamp, 324
U28 Octal FF w clear, 74HC273
U29 8-bit DAC
U30 Octal 3-state buffer, 74HC244
U31 8-bit addressable latch, 74HC259
U32 Comparator, 339
U33 RS232 driver 1488
U34 Diff. Receiver, 75175
U35 7-chan sinking HC diver, 2003
X1 12.288 MHz crystal for 6.144 MHz system]
X2 32,768 Hz crystal
Z1 Linear reg, 79L05, –5V
Jumpers and Headers
Headers and jumpers are shown in the drawing below. Pin 1po-
sitions are indicate by “+” markers.
H1 When connected, a 10K excitation resistor RP6A is connected
between the +10V reference and the high-gain input AD+.
H5 7-8Connect to engage 4–20 mA load resistor (430 ohm) from
universal input 6to ground.
H6 For universal input n(1–6), connect H6-nto H4-nto engage
excitation resistor (3.3K) to +10 volt reference. Connect H6-n
to H5-nto engage pull-down resistor (4.7K).
H7 Connect jumper to cause differential inputs AD+ and AD– to
be balanced in gain. If H7 is disconnected, the gain is greater
on the AD+ side so that if both inputs are set to 5volts, the
output of the operational amplifier is 5volts. Use this feature
for accepting input from bridges where the taps are nominally
at +5V.
H8 1-2Connect to enable a second RS232 output (at the expense
of RS485 output) The output pin will be TX–. The RS232
input will be RX–. RX+ must be tied to ground.
3-4, Connect these positions to enable the termination
5-6and bias resistors for RS485 communications.
H9 When installed, this connects the on-board battery to relay 1
N.O. contact. Use H9 when a battery self-test circuit is to be
implemented by connecting a switched load to the battery.
H11 Normally installed. Connects “K” to +24V power supply. Dis-
connect only if a separate power supply is to be used for
high-current outputs O1–O7. In that case, Kmust be con-
nected to that power supply.
J1 1-2 Connect if using 32K RAM or 128K RAM
2-3 Connect for 256K or 512K RAM
4-5 Connect if using 32K, 64K, or 128K EPROM
5-6 Connect for 512K or 256K EPROM
7-8 Connect for other than 32K EPROM
8-9 Connect for 32K EPROM
12-13 Connect for 64K, 128K, 256K flash EPROM
13-14 Connect for 512K (non-flash) EPROM
J4 This is the operation mode jumper. By software convention,
position 7-8means “enter programming mode at 19.2K baud.”
Position 6-7means “run the program in memory.” Position 2-3
means “enter programming mode at 38.4K baud.” J4 overrides
the keypad when a readable jumper is installed.
Z180
RS485
OR
U18
U16 U13
PAL
J7
J11
U34
REL2 REL1
Relay
LED
Relay
U25
RS232
U33 JP1
H8
Buffer
U30 OR
U19
MUX
U7
SW1
X1
691
U10
U28
Flip Flops
U24
DAC
U22
Op-Amps
U27
DAC
U29
HC Driver
U35
Latch
U31
HC Driver
U26
Latch
U23
PLCBus
U3
PLC Bus
U4 J1 J8
U11
U6
MUX
U9
Comp.
U32
Comp.
U21 NOT
U17
MUX
U8 Latch
U14
RTC
U15
Keypad Conn.
Beeper
U12
P2
P1
H1
K1
H5
H6
H4 J4
Flip Flops
Phone
Jack
U5
J3
J9
U20
Battery
F1
JP2
JP3
EE
Reg.
PLC Bus Connector
LCD
H7
H9
H1
EPROM
U1
RAM
U2
D2
D1
Z1
28- / 32-pin positions
28- / 32-pin positions
Figure 4. Parts
Locations

PK2100 Series
Z-World 530-757-3737 12
J7 Connect 2-3for voltage output on the DAC channel (factory
setting). Connect 1-2for 20 mA current output.
J8 1-2Enable switching power supply
3-4Connects timer output T0 to processor /INT2.
Can generate periodic interrupts.
5-6Connects universal input 1to processor /INT0.
Not recommended.
7-8Connect processor I/O CKA1 to digital input 6.
9-10 Connect processor I/O CKA1 to digital input 7.
11-12 Processor-readable jumper. By convention, install
whenever 13-14 is installed.
13-14 Install jumper to enable watchdog timer.
J3 1-2Protect EEPROM against writes at addresses 256–511.
This is the factory setting.
2-3Allow EEPROM writes at addresses 256–511.
J9 1-2The comparators used for the universal inputs are
connected to the voltage divider RR which has a
value of 1.6volts. This causes the universal inputs to
have a threshold fixed at this value.
2-3Factory setting, where the internal DAC is connected
to the comparators used for the universal inputs.
J11 1-2 Connect to enable CTS on the RS232 port (0).
2-3 Connect to use the CTS line as a board reset line. CTS
high will reset the PK2100 board.
Board Dimensions
The drawing below shows board dimensions, mounting hole lo-
cations and sizes, all the jumpers and headers, pin 1positions
for important headers, and the positions of resistors that affect
the universal inputs and the high-gain input. Mounting holes
are (0.225,0.7) from the extreme corners of the board. Resistors
R5, R11, and resistor pack RP5 affect the high-gain channel. Re-
sistor R28 (5.1 kΩ) is part of a resistor divider that gives the op-
tional fixed hardware reference voltage for the universal inputs.
Maximum height of components above the board is 0.65″ap-
proximately.Overall height is 0.78″approximately.
0.7 typ
0.91 typ
~0.
6
~0.
7
0.4 typ
6.82
0.225 typ
4.5
5.5
6.53
0.53
1.77
J11
J3
J1
J7
LED
JP1
H8
SW1
J8
to keypad (flex cable)
P2
P1
H11
K1
J9
JP2
JP3
to LCD
H7
H9
H1
J4
H4
H6
H5
(0.53, 2.66)
(1.19, 4.13)
2.73, 0.68)
0.17 dia mounting holes, 4x
0.25 dia
0.16 dia
“Phone
Jack”
U27
R28
R11
R5
RP5
Figure 5. Board Dimensions

PK2100 Series
Z-World 530-757-3737 13
menu
setup
item field
run
up down help
init
F2 F3 addF4 delF1
D3
D4
D5/C1A
D6/C1B
D7/C2A
GND
GND
Tx–
Tx+
Rx–
Rx+
C2B+
C2B–
D2
D1
GND
U6
U5
U4
U3
U2
U1
GND
+5V
+10V ref
DIGITAL
INPUTS
UNIVERSAL
INPUTS RS485/
422
0.75
0.22
0.55
0.2
0.2 typ
5.5
4.01
2.5
7.0
0.31 typ
1.52
2.02 1.6
2
4
1
365 87 109 1211 1413 1615 1817 2019 2221 2423 2625
GND
D7X
D5X
D3X
D1X
LCDX
A0X
GND
GND VCC (+5V)
attention /AT +24V
strobe /STBX GND
A3X GND
A2X GND
A1X
/RDX
(+5V) VCC
D0X
/WRX
D4X
D2X
D6X
1
2
3
4
5
6
7
8
9
10
KV0
KV1
KV2
KV3
KV4
KV5
/KH3
/KH1
/KH2
/KH0
Keypad columns
Keypad rows
2
4
1
365 87 109 1211 1413
A0X
VCC
D6X D7X
D4X D5X
D2X D3X
D0X D1X
/WRX LCDX
VLC
GND
1
2
3
4
5
6
RTS0
GND
/TXD0
/RXD0
CTS0
Figure 8. P1,
PLCBus connector
Figure 7. K1,
Keypad Connector
Figure 5. P2,
LCD Connector
Figure 6. JP1,
Phone Jack
Figures 5–8below show the inportant headers.
Enclosure Dimensions
Figure 9below shows the size of the aluminum enclosure and
the location of the PLCBus port and phone jack.
Figure 9. Enclosure Dimensions
This manual suits for next models
4
Table of contents
Other Z-World Controllers manuals