Brainboxes AD-1200 H User manual

ADMUX Reference
ADMUX
AD1200 Relay
Multiplexer
Board
1.00 EDITION
MAY 1994
Intro-1

ADMUX Reference
Outline Contents.________________
Chapter 1. Analog Relay Multiplexer Terminal Board.
Chapter 1. Analog Relay Multiplexer Terminal Board._______________________________________________
Introduction. 1
The Relay Multiplexer Terminal Board. 2
Card Address DIP Switches. 5
AD1200 Input Channel Select Jumpers. 6
Relay Made Feedback Select Jumpers. 6
ADCLOCK Jumper. 7
Cold Junction Compensation. 8
Using The Cold Junction. 8
Calibrating The Cold Junction. 9
Resistors R1, R2, R3 and R4. 10
Jumpers W3 and W4. 10
Low Pass Filter, R15 and C28. 11
Gain Setting of Signal Amplifier. 11
Pull Up/ Pull Down- Open Circuit Detection. 12
AD1200 Register Resume. 13
The A/D Control Status Register. 13
Bit 7 A/D Done, Read Only. 14
The A/D Gain Channel Register. 15
The Digital Output Port Register. Write Only 15
The Digital Input Port Register. Read Only 15
Sample Programs. 16
Chapter 1 List Of Figures._______________________
Figure 1-1. AD1200 Card Layout. 3
Figure 1-2. AD1200 Card Layout. 4
Figure 1-3. ADMUX Factory Set Address DIPs. 5
Figure 1-4. ADMUX Board Addresses. 5
Figure 1-5. AD1200 Input Channel Select. 6
Intro-3

ADMUX Reference
Figure 1-6. Relay Made Feedback Jumper. 7
Figure 1-7. ADCLOCK Jumper. 7
Figure 1-8. Activating Cold Junction Compensation. 8
Figure 1-9. Gain Selection. 12
Figure 1-10. VOPT Selection. 13
Figure 1-11. AD1200 Register Map. 13
Figure 1-12. A/D Control Status Register. 14
Figure 1-13. DIGOUT Output Register. 15
Figure 1-14. DIGIN Output Register. 16
Figure 1-15. Sample Basic Program. 17
Figure 1-16. Relay Mux J1 & J2 Pin Outs. 18
Intro-4

Analog Relay Mux Board Reference
ANALOG RELAY
MULTIPLEXER
TERMINAL BOARD.
Introduction.____________
This manual explains the functions and features of the
Analog Relay Multiplexer Terminal Board for the AD1200 series
of cards. The Relay multiplexer card expands the input capability
of the AD1200 card from only 8 differential channels up to a
maximum of 1,920 Differential input channels. Each of these
channels is completely isolated from each other.
The original ADMUX Rev2 boards only provided the relays and
multiplexing functions.
The updated ADMUX Rev3 boards have two extra features:-
i) On board jumper selectable gain amp and isolation
amplifiers providing amplification of low level signals and
complete galvanic isolation between the selected input and
the AD1200 card in the PC. The input to the gain amp and
the isolating amp are both via any selected on board relay
and via the "CHAIN OUT" terminals.
ii) The selected input, switched through the relays, is output
via the last two pins of screw terminal connector next to
the IDC ribbon cables, the "CHAIN OUT" terminals.
External wires can connected these lines together so that
multiple relay boards may utilise the gain and iso amps on
one master ADMUX Rev3 card.
Thus the output from the relays boards are commoned up,
amplified and isolated before being input back to the
AD1200 card.
Note To upgrade the original cards to work with the newer
cards:- Remove the two jumpers from AD1200 channel select
header strip.
Connect two wires from this jumper strip to the unused pins on
the terminal block.
Page 1

Reference Analog Relay Mux Board
The first wire goes from (underneath side of the card ) the
square pad, pin 1, of the channel select header strip to the
square pad on the screw terminal strip.
The second wire goes from the pad next to the square pad, pin
3, of the channel select header strip to the pad next to the square
pad on the screw terminal strip.
The Relay Multiplexer Terminal Board.___________________________________
Each Relay Multiplexer board ADMUX has 16 Double
Pole Relays, switching a differential pair of input lines on to one
of the AD1200 input channels. Each board has a 4 way dip
switch allowing 15 different jumper selectable addresses for the
board, address 16 is used by the board hardware as an
unaddress, to completely degate any relays.
On board timing ensures that the previously chosen relay breaks
before the currently chosen relay makes, so maintaining complete
isolation between all the input channels.
Page 2

Analog Relay Mux Board Reference
Figure 1-1. AD1200 Card Layout._____________________________
Original Version Without ISO122 Amp.
STACK
æ
RELAY 0
æ
RELAY 15
ROD
æ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿æ
STACK ROD
ÚÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ¿
³
ÛÛ
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛÛ ³
³
æ
W34
³
³
þþ ³
³ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿
æ
J1
æ
J2
³
³³
0
³³
1
³³
2
³³
3
³³
4
³³
5
³³
6
³³
7
³³
8
³³
9
³³
A
³³
B
³³
C
³³
D
³³
E
³³
F
³þþ
CH0
ÚÄ¿ÚÄ¿ ³
³ÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙþþ
CH1
³
³³
³³
³
AD1200
þþ
CH2
³
C
³³
C
³³
³
þþ
CJC R1
ÚÄÄÄÄ¿
INPUT
þþ
CH3
³
A
³³
A
³³
³
å
JUMPERS R2
³
1234
³
CHANNEL
þþ
CH4
³
B
³³
B
³³
³
R3
³æåæå³
SELECT
þþ
CH5
³
L
³³
L
³³
³
ÛÛÛÛ
R4
ÀÄÄÄÄÙ
þþ
CH6
³
E
³³
E
³³
³
å
POT R23
å
CARD
þþ
CH7
³
³³
³³
³
ADDRESS
ÀÄÙÀÄÙ ³
³
RELAY
þþ ³
³
MADE
þþ
ADC
þþ ³
³
FEEDBACK
þþ
AUTO
å³
³
ÛÛ
INPUT BIT
þþ
ÛÛ
CLOCK
³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
å
STACKING ROD STACKING ROD
å
Page 3

Reference Analog Relay Mux Board
Figure 1-2. AD1200 Card Layout._____________________________
Updated Version With ISO122 Amp.
STACK
æ
RELAY 0
æ
RELAY 15
ææ
CHAIN OUT
ROD
æ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿æ
STACK ROD
ÚÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ¿
³
ÛÛ
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛÛ ³
³
æ
W34
³
³
þþ ³
³ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿ÚÄ¿
æ
J1
æ
J2
³
³³
0
³³
1
³³
2
³³
3
³³
4
³³
5
³³
6
³³
7
³³
8
³³
9
³³
A
³³
B
³³
C
³³
D
³³
E
³³
F
³þþ
CH0
ÚÄ¿ÚÄ¿ ³
³ÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙÀÄÙþþ
CH1
³
³³
³³
³
AD1200
þþ
CH2
³
C
³³
C
³³
³
þþ
CJC R1
ÚÄÄÄÄ¿
INPUT
þþ
CH3
³
A
³³
A
³³
³
å
JUMPERS R2
³
1234
³
CHANNEL
þþ
CH4
³
B
³³
B
³³
³
R3
³æåæå³
SELECT
þþ
CH5
³
L
³³
L
³³
³
ÛÛÛÛ
R4
ÀÄÄÄÄÙ þþ
þþ
CH6
³
E
³³
E
³³
³
å
POT R23
å
CARD
å
ADCLOCK
þþ
CH7
³
³³
³³
³
ADDRESS
ÀÄÙÀÄÙ ³
³
þþ þþ
RELAY
þþ ³
³
å
GAIN
å
VOPT MADE
þþ ³
³
FEEDBACK
þþ ³
³
ÛÛ
INPUT BIT
þþ
ÛÛ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
å
STACKING ROD STACKING ROD
å
The Analog Screw Terminal Board converts from the 50
IDC ribbon cable to screw terminals, making all the AD1200
pinouts easily accessible. The screw terminals can take wire up
to 2.5mm, 0.1 inch, in diameter. Each of 50IDC entry is a
latching connector. The four plastic mounting feet may be
removed and the terminal board used as a screw mounted panel.
The ATB has been designed to provide the following
features:-
a) Individual board address range 0-14.
b) Jumper selectable channel made signal Feedback to
AD1200 card via digital input port.
c) Jumper enabled channel made signal Feedback to AD1200
card via A/D clock input allowing next A/D conversion to
be automatically triggered.
d) Provision for cold junction compensation circuitry, CJC, for
thermocouple inputs, jumper switched via relay 0.
e) Twin 50 way D connector ribbon cables allows for easy
daisy chaining of multiple boards.
Page 4

Analog Relay Mux Board Reference
f) Twin 50 way D connector ribbon cables allows for easy
daisy chaining of multiple boards.
Card Address DIP Switches._________________________
The Card Address DIP switches t jumpers determine to
which channel on the PC A/D card the output of the relays is
routed.
Figure 1-3. ADMUX Factory Set Address DIPs._________________________________________
DIP 1-4 Mux Board Address select
ÚÄÂÁÂÄ¿
³ý³ý³ý³
å
on
ÚÄÄÄÄ¿
³åååå³
æ
off
³
1234
³
ÀÄÄÄÄÙ
Factory Set Address= 0 Hex, 0 Decimal
Relays chosen by putting 00-0F Hex, 0-15 decimal on Digital out port.
Figure 1-4. ADMUX Board Addresses._________________________________
BOARD DIP DIP DIP DIP SWITCH Relays Addressed By_____ ___ ___ ___ ___ ______ ___________________
ADDRESS 1234
DO7 DO6 DO5 DO4
0 OnOnOnOn
åååå
00-0F Hex 0 -15 Dec Default
1 Off On On On
æååå
10-1F Hex 16 -31 Decimal
2 On Off On On
åæåå
20-2F Hex 32 -47 Decimal
3 Off Off On On
ææåå
30-3F Hex 48 -63 Decimal
4 On On Off On
ååæå
40-4F Hex 64 -79 Decimal
5 Off On Off On
æåæå
50-5F Hex 80 -95 Decimal
6 On Off Off On
åææå
60-6F Hex 96 -111 Decimal
7 Off Off Off On
æææå
70-7F Hex 112-127 Decimal
8 OnOnOnOff
åååæ
80-8F Hex 128-143 Decimal
9 Off On On Off
æååæ
90-9F Hex 144-159 Decimal
10 On Off On Off
åæåæ
A0-AF Hex 160-175 Decimal
11 Off Off On Off
ææåæ
B0-BF Hex 176-191 Decimal
12 On On Off Off
ååææ
C0-CF Hex 192-207 Decimal
13 Off On Off Off
æåææ
D0-DF Hex 208-223 Decimal
14 On Off Off Off
åæææ
E0-EF Hex 224-239 Decimal
15 Off Off Off Off
ææææ
Do Not Use!
Page 5

Reference Analog Relay Mux Board
AD1200 Input Channel Select Jumpers.__________________________________
The AD1200 input channel select jumpers determine to
which channel on the PC A/D card the output of the relays is
routed. The A/D conversion are then performed with this channel
selected on the PC AD1200 card. Since the relays are switching
differential signals two jumpers are used to select A/D input
channel, the Channel and its return line. In differential mode
there are 8 possible input channels for the A/D converter.
Figure 1-5. AD1200 Input Channel Select.____________________________________
JUMPER LABEL ADC Channel Selected______ _____ ____________________
ÚÄÄ¿
³ÛÛ³
ADCH00 Channel 0 DEFAULT
³þþ³
ADCH01 Channel 1
³þþ³
ADCH02 Channel 2
³þþ³
ADCH03 Channel 3
³þþ³
ADCH04 Channel 4
³þþ³
ADCH05 Channel 5
³þþ³
ADCH06 Channel 6
³þþ³
ADCH07 Channel 7
ÀÄÄÙ
Relay Made Feedback Select Jumpers._________________________________
The ADMUX board has break before make circuitry. There
is a time delay after outputting the address on the digital output
port before the previously made relay breaks and the newly the
selected relay makes and the analog input is switched through to
the AD1200 channel. To ensure that sufficient time elapses
before the A/D conversion is taken a relay made signal can be
fed back from the ADMUX board on to one of the bits of the
AD1200 digital input port. Software should poll this port waiting
for the correct bit to go LOW before the A/D conversion is
triggered. Only place one jumper on these pins.
The legend on the ADMUX board is incorrect in labelling the
line CH0, CH1 etc. They should be labelled DI0, DI1 for Digital
Page 6

Analog Relay Mux Board Reference
Input Bit 0 etc.
Figure 1-6. Relay Made Feedback Jumper._____________________________________
JUMPER LABEL LABEL FEEDBACK BIT______ _____ _____ ____________
ÚÄÄ¿
INCORRECT RIGHT
³ÛÛ³
CH0 DI0 Digital Input Port Bit 0 DEFAULT
³ùù³
CH1 DI1 Digital Input Port Bit 1
³ùù³
CH2 DI2 Digital Input Port Bit 2
³ùù³
CH3 DI3 Digital Input Port Bit 3
³ùù³
CH4 DI4 Digital Input Port Bit 4
³ùù³
CH5 DI5 Digital Input Port Bit 5
³ùù³
CH6 DI6 Digital Input Port Bit 6
³ùù³
CH7 DI7 Digital Input Port Bit 7
ÀÄÄÙ
ADCLOCK Jumper.__________________
The AD1200 series cards have an external clock input line
EXT CLOCK, that can be used to strobe A/D conversions when
the card is in mode 3. The EXT CLOCK line must be driven by
a high to low going edge. The ADMUX card’s relay made feed
back signal can be used to drive this input so allowing the A/D
converter to automatically start an A/D conversion as soon as the
relays have switched through the input signal. The ADMUX
card’s line is tristated and so several boards can all be jumpered
onto the AD1200 input, each board driving it as it is selected.
Figure 1-7. ADCLOCK Jumper.____________________________
JUMPER FUNCTION______ ________
ÚÄÄ¿
³ùù³
NOT DRIVING AD1200 EXTERNAL CLOCK INPUT DEFAULT
ÀÄÄÙ
ÚÄÄ¿
³ÛÛ³
DRIVING AD1200 EXTERNAL CLOCK INPUT - AUTO CLOCKING
ÀÄÄÙ
Page 7

Reference Analog Relay Mux Board
Cold Junction Compensation.__________________________
The ADMUX card has on board cold junction compensation
circuitry. When the two jumper links are connected the Cold
Junction Circuit is connected to Relay 0 on the ADMUX board.
When the two jumper links are removed then Relay 0 is free for
use as a normal input. Do not wire any other inputs to Relay 0
on those boards where the CJC circuitry has been activated. The
jumpers connect Relay 0 input to the cold junction circuit and
Relay 0 return line to ANALOG ground.
The Cold Junction Compensation jumpers are located on the
middle left hand side of the ADMUX board and are labelled
CJC TO REL00 ENABLE.
Figure 1-8. Activating Cold Junction Compensation._____________________________________________
ÚÄÄ¿
³þþ³
CJC Circuit Unused. Relay 0 free for normal use.
ÀÄÄÙ
FACTORY DEFAULT.
ÚÄÄ¿
³ÞÞ³
CJC Circuit Activated On Relay 0.
ÀÄÄÙ
Using The Cold Junction.
The cold junction, like thermocouples, is usually used in
Differential Input mode. The cold junction circuitry is connected
by jumpers W1 and W2 to the Analog Input Channel 0 and
Channel 0 Return lines. R26, need not be inserted when the CJC
circuitry is in use. When jumpers are not placed across the W1
and W2 shorting headers the cold junction compensation
circuitry does not effect the analog terminal board or the
AD1200 card at all.
The CJC circuitry produces 0.5mVolts per degree Centigrade,
thus by performing an A/D conversion on channel 0 the
temperature of the thermocouples cold junction is known and the
apparent temperature measured by the thermocouple can be
adjusted so that the true temperature of the thermocouple is
known.
Page 8

Analog Relay Mux Board Reference
Example:
AD1200 card jumper set range of 0-10 Volts unipolar.
Gain of 1000 is selected for Channel 0
Ambient temperature of 18 degrees Centigrade
Thus CJC circuit gives a voltage of 18 x 0.5 mV = 9mV.
9mV input Channel 0 at gain of 1000 equivalent to 9 Volts
9 Volts on 0-10V i/p range is 9*4096/10= 3686= E66hex
To convert a reading into a temperature in degrees Centigrade
use the following formula:-
Temp in C = (ADC Reading * Input Span In Volts)_______________________________
(4096 * Gain * 0.5mV per C)
where the 0.5mV per degree C is 0.5/1000 Volts per degree C.
Thus for the above ADC reading of 3686 decimal, with a 10Volt
span in the input range and a Gain of 1000.
Temp in C= ( 3686 * 10)__________
(4096 * 1000 * 0.5/1000 )
Temp in C= ( 36860) = 18 degrees] Centigrade._______
(2048 )
Calibrating The Cold Junction.
The cold junction compensation circuit can be calibrated simply
in the following manner. Place a precision voltmeter across the
CJC TO REL0 ENABLE jumper pins. Adjust potentiometer R23
with a screw driver so that the voltmeter reads 0.5mV times the
ambient temperature. Thus if the room temperature is 20 degree
C, R23 should be adjusted till the voltmeter reads exactly
10mVolts.
Page 9

Reference Analog Relay Mux Board
Resistors R1, R2, R3 and R4._________________________
There is provision for adding four optional resistors to the
ADMUX card.
R1 Precision 250 Ohms resistor. Diff Current Input Only!
Fit this when using the ADMUX card with 4-20m Amp
differential current inputs. Omit for thermocouple use.
R2 Nominally 10k Ohms
Fit with 10k nominal resistor to provide differential return
path to analog ground. This reference the Differential Input
signal to the ground on the AD1200 card. Omit when using
with the ISO122 isolation amplifier.
R2 Precision 250 Ohms Single Ended Current Inputs only!
When using the relays for switching single ended current
input signals fit 250 Ohm precision resistor for 4-20m Amp
current to voltage conversion.
R3 Nominally 100M Ohms
This is for thermocouple break detection. When this resistor
is fitted, if the thermocouple breaks or if an open circuit
input is switched in the input line is pulled up to +2Volts.
See also VOPT jumpers and R14 below.
R4 Precision 250 Ohms Single Ended Current Inputs only!
Fit this when using the ADMUX card with 4-20m Amp
differential current inputs. is the current to voltage shunt
Omit for thermocouple use.
Jumpers W3 and W4.___________________
Jumpers W3 and W4 should be left in place when using the
relays to switch differential inputs through to the AD1200 card.
Jumper W3 connects the system ground, SYS GND, to the
ANALOG ground. Single Ended inputs normally have a return
path via analog ground and this jumper connects the analog
ground to SYS GND.
Page 10

Analog Relay Mux Board Reference
Jumper W4 connects the AMPLOW to the ANALOG ground.
Pseudo differential inputs are referenced to AMPLOW. This
jumper can be used in conjunction to W3 to connect AMP LOW
to the system ground SYS GND.
Low Pass Filter, R15 and C28.__________________________
The input to the programmable gain amp passes through a
low pass filter formed by R15 and C28. The nominal value of
these is R15 1k2 = 1200 Ohms, and C28 = 1.0uF. This produces
a time constant of approx 1/1000 second, cutting off signal
above 1kHz. To disable this remove C28 and short out R15.
R15 and C28 are located between the NMH1215 DC/DC
converter and the PGA202 amplifier. Just to the right of the
VOPT jumpers.
Gain Setting of Signal Amplifier._____________________________
The PGA202 provides 4 jumper selected amplifications for
the signal before passing to the isolation amplifier.
The two GAIN jumpers are located in the centre of the
ADMUX card. The gain is the factor by which the input signal
from the on board relays or the CHAIN IN connection is
amplified by before isolation. The on board CJC compensation
produces a voltage of approx 10mV at room temperature, with a
gain of 100 jumper selected a 1 Volt signal is will be passed on
to the isolation amp and thence to the AD1200 card.
Page 11

Reference Analog Relay Mux Board
Figure 1-9. Gain Selection._______________________
GAIN Gain Selected______ ____________
ÚÄÄ¿
³ÛÛ³
Gain 1 DEFAULT
ÀÄÄÙ
ÚÄÄ¿
³þÛ³
Gain 10
ÀÄÄÙ
ÚÄÄ¿
³Ûþ³
Gain 100
ÀÄÄÙ
ÚÄÄ¿
³þþ³
Gain 1000
ÀÄÄÙ
Pull Up/ Pull Down- Open Circuit Detection._______________________________________
Open circuit inputs can be detected by the installation of
resistors to pull the differential input lines to a known state
The two VOPT jumpers can pull the INPUT+ line, via a 100k
resistor R13, to isolated grounds or to the isolated +15volt
supply. To disconnect this pull up/down remove both jumpers.
Resistor R14 pull the INPUT- line to the isolated ground level in
the event of floating inputs. To disconnect this pull down
remove R14.
Page 12

Analog Relay Mux Board Reference
Figure 1-10. VOPT Selection.__________________________
VOPT Connection Of INPUT+ line.______ _________________________
ÚÄÄ¿
³þÛ³
R13, 100k, pulls up to isolated +15volts.
ÀÄÄÙ
ÚÄÄ¿
³Ûþ³
R13, 100k, pulls down to isolated Ground.
ÀÄÄÙ
ÚÄÄ¿
³þþ³
R13 Disconnected, No open circuit detect on INPUT+.
ÀÄÄÙ
AD1200 Register Resume._______________________
The register of the AD1200 card are now quickly listed as
an aide to explaining the sample program.
Figure 1-11. AD1200 Register Map._______________________________
ÚÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³
ADDRESS
³ý
DEFAULT
ý³ý
REGISTER
ýýýýýýýýýý
ýý³
³
OFFSET
ýýýý³ý
ADDRESS
ý³
ýýýýýýýýýýýýý
ýýý
READ
ýýý
WRITE
ýý³
ÃÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ý
0000
ý
R/W
ý³ý
0218
ý
Hex
³
A/D CONTROL STATUS REGISTER
ý
ADCSR ADCSR
ý³
³ý
0001
ý
R/W
ý³ý
0219
ý
Hex
³
A/D GAIN CONTROL REGISTER ADGCR
ý
ADGCR
³
³ý
0002
ý
R/W
ý³ý
021A
ý
Hex
³
A/D, DAC0 LOW BYTE
ýýýý
ý
DAC0LO ADCLO
ý³
³ý
0003
ý
R/W
ý³ý
021B
ý
Hex
³
A/D, DAC0 HIGH BYTE
ýýýý
ý
DAC0HI ADCHI
ý³
³ý
0004
ýýý
W
ý³ý
021C
ý
Hex
³
DAC1 LOW BYTE
ýýýý
ý
DAC1LO
ý³
³ý
0005
ýýý
W
ý³ý
021D
ý
Hex
³
DAC1 HIGH BYTE
ýýýý
ý
DAC1HI
ý³
³ý
0006
ý
R/W
ý³ý
021E
ý
Hex
³
DIGITAL I/O PORT
ýý
ý
DIGIN
ý
DIGOUT
ý³
³ý
0007
ý
R/W
ý³ý
021F
ý
Hex
³
TIMER CONTROL, EXTENDED MODE TIMERXM TIMERXM
³
ÃÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ý
Note: Registers Do Not Always Read Back What Has Been Written
ý³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
The A/D Control Status Register._____________________________
The most important register in the AD1200 series of cards
is the control status register. It is the primary control register for
the AD Converter, it holds the A/D Busy and A/D Done bits
which indicate whether an A/D conversion is in progress or
Page 13

Reference Analog Relay Mux Board
finished, its A/D Error and Clear Error bits are used to detect
and service A/D overrun or triggering mistakes. The DMA and
Interrupt enable bits are used to decide whether the A/D Done
bit causes a DMA read or system interrupt. Finally its Mode bits
determine whether single shot or continuous A/D conversions are
performed and what initiates the repetitive conversions and at
what rate they occur.
Figure 1-12. A/D Control Status Register.____________________________________
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ýýýýý
ADCSR A/D Control Status Register.
ýýýýýýýýýýýýýýýýýý³
ÃÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄ´
³
³ý
BIT
ý
7
ý³ý
BIT
ý
6
ý³ý
BIT
ý
5
ý³ý
BIT
ý
4
ý³ý
BIT
ý
3
ý³ý
BIT
ý
2
ý³ý
BIT
ý
1
ý³ý
BIT
ý
0
³
ÃÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄ´
³
0218
³ý
A/D
ýý³ý
A/D
ýý³ý
A/D
ýý³ý
CLEAR
ý³ý
DMA
ýý³ý
INT
ýý³ý
MODE
ýý³ý
MODE
ý³
³ý
Hex
³ý
DONE
ý³ý
ERROR
ý³ý
BUSY
ý³ý
ERROR
ý³ý
ENABLE
³ý
ENABLE
³
BIT 1
ý³ý
BIT 0
³
³ýýýý³ý
Read
ýý³ý
Read
ýý³ý
Read
ýý³ý
Write
ý³ý
R/W
ýýý³ý
R/W
ýýý³ý
R/W
ýýý³ý
R/W
ýý³
ÀÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÙ
Bit 7 A/D Done, Read Only.________________________
This bit is indicates that the A/D converter has a reading
ready.
Set By: The A/D converter when it has finished converting an
analogue input.
If Bit 3, DMA Enable, of the ADCSR is also set then
a DMA cycle will be generated when this bit is set by
the ADC.
If Bit 2, Interrupt Enable, of the ADCSR is also set,
but not Bit 3, then an interrupt will be generated when
this bit is set by the ADC.
Reset By:Reading the ADC data high byte at Register 3.
This bit is automatically cleared at power up.
Page 14

Analog Relay Mux Board Reference
The A/D Gain Channel Register.____________________________
The A/D Gain Channel Register, ADGCR, is used to select
the input channel to the A/D converter and the gain applied to
the input signal by the programmable gain amplifier.
When in Mode 0, single conversion mode, then writing to the
A/D Gain Channel Register forces the A/D Converter to start its
next conversion.
The Digital Output Port Register. Write Only_____________________________ __________
The Digital Output Port Register, DIGOUT, is an 8 bit
write only register. The bit values written correspond exactly
with the on/off logic state of the 8 TTL output lines. Thus bits
set true force the corresponding DIGOUT line high, those bits
set false force the DIGOUT line low.
Figure 1-13. DIGOUT Output Register.__________________________________
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ýýýýý
DIGOUT Digital Output Port Register.
ýýýýýýýýýýýýýýýý
ýý³
ÃÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄ´
³
³ý
BIT
ý
7
ý³ý
BIT
ý
6
ý³ý
BIT
ý
5
ý³ý
BIT
ý
4
ý³ý
BIT
ý
3
ý³ý
BIT
ý
2
ý³ý
BIT
ý
1
ý³ý
BIT
ý
0
³
ÃÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄ´
³
021E
³
DIGOUT
³
DIGOUT
³
DIGOUT
³
DIGOUT
³
DIGOUT
³
DIGOUT
³
DIGOUT
³
DIGOUT
³
³ý
Hex
³ý
7
ý³ý
6
ý³ý
5
ý³ý
4
ý³ý
3
ý³ý
2
ý³ý
1
ý³ý
0
ý³
³ýýýý³ý
Write
ý³ý
Write
ý³ý
Write
ý³ý
Write
ý³ý
Write
ý³ý
Write
ý³ý
Write
ý³
Write
³
ÀÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÙ
Writing 0FFhex to the DIGOUT register forces all lines
high, writing 00hex forces lines low. Writing 01hex forces only
DIGOUT bit 0 high, all the rest are low.
TTL output logic level low is 0.0 ~0.8 Volts.
TTL output logic level high is 2.4 ~5.0 Volts.
The Digital Input Port Register. Read Only____________________________ __________
The Digital Input Port Register, DIGIN, is an 8 bit read
only register. The bit values read represent the logic levels
present on the 8 TTL input lines. Thus lines that are high cause
the corresponding DIGIN bit to read high, those lines that are
Page 15

Reference Analog Relay Mux Board
low cause the corresponding DIGIN bit to read low. If on
reading the DIGIN register a value of 0FFhex is obtained then
all the TTL input lines where true. A reading of 00hex means
that all lines were low. A reading of 01hex means that only
DIGIN line 0 was high, all the rest are low.
TTL output logic level low is 0.0 ~0.8 Volts.
TTL output logic level high is 2.4 ~5.0 Volts.
Figure 1-14. DIGIN Output Register.________________________________
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ýýýýý
DIGIN Digital Input Port Register.
ýýýýýýýýýýýýýýýý
ý
ý³
ÃÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄ´
³
³ý
BIT
ý
7
ý³ý
BIT
ý
6
ý³ý
BIT
ý
5
ý³ý
BIT
ý
4
ý³ý
BIT
ý
3
ý³ý
BIT
ý
2
ý³ý
BIT
ý
1
ý³ý
BIT
ý
0
³
ÃÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄ´
³
021E
³
DIGIN
³
DIGIN
³
DIGIN
³
DIGIN
³
DIGIN
³
DIGIN
³
DIGIN
³
DIGIN
³
³ý
Hex
³ý
7
ý³ý
6
ý³ý
5
ý³ý
4
ý³ý
3
ý³ý
2
ý³ý
1
ý³ý
0
ý³
³ýýýý³ý
Read
ý³ý
Read
ý³ý
Read
ý³ý
Read
ý³ý
Read
ý³ý
Read
ý³ý
Read
³ý
Read
ý³
ÀÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÙ
Sample Programs.________________
The sequence for selecting different relay inputs is as
follows.
Output FF hex to Digital output port to ensure all mux boards
are not addressed. Note Must do this EVERY time we change
relays.
Output address of relay we require. This starts the break before
make circuitry.
Wait till time delay over, or BETTER wait for feedback line to
go low.
Force A/D conversion on PC AD1200 by writing to ADGCR,
the channel that the mux board is driving. When ADDONE bit
set in ADGSR read ADCLO register first, then ADCHI register
next to retrieve the data.
Page 16

Analog Relay Mux Board Reference
Figure 1-15. Sample Basic Program._______________________________
10 BASE=&H218: REM AD1200 BASE ADDRESS
11 W=2500: REM DELAY Time
12 ADCSR=BASE :ADGCR=BASE+1 :ADCLO=BASE+2 :ADCHI=BASE+3
13 DIGIN=BASE+6 :DIGOUT=BASE+6: REM Digital i/o ports at same address
14 FEED=&H1 :REM Relay Made Feedback Jumper Set To Bit 0 DEFAULT
15 :
16 :
20 FOR RELAY = 0 TO 15
25 OUT DIGOUT,&HFF: REM UNADDRESS ALL BOARDS
27:
30 OUT DIGOUT,RELAY: REM ADDRESS CHOSEN RELAY
35:
40 GOSUB 1000: REM Wait For FeedBack=Relay Closed
50:
60 FOR C=1 TO W :NEXT: REM Delay To Prevent Us Wasting RELAY’s Life
70 NEXT RELAY
80 :
90 END
99 :
100 REM FEEDBACK signal goes LOW when new relay made also on &H21E
1000 REM wait for feed back
1010 PRINT"Select Relay "RELAY " ";
1060 F=INP(DIGIN): REM Read Digital Input Port
1070 IF ( (F AND FEED)<>0) THEN GOTO 1060
1100 REM got feedback
1110 PRINT"Feedback Signal Received!";
1120:
1130:REM PERFORM A/D CONVERSION HERE
1140 OUT ADGCR,0: REM Select Channel Force Conversion
1150 IF ( (INP(ADCSR) AND 128)<>128) THEN GOTO 1150: REM Wait for AD
DONE
1160 LO=INP(ADCLO): REM Always Read Low Byte First
1170 HI=INP(ADCHI): REM And High Byte Last
1180 ADIN=HI*256 + LO: PRINT TAB(65)"A/D In="Hex$(ADIN)
1190:
1200 RETURN
5999 END
6000 SAVE "admux",A
Page 17
This manual suits for next models
4
Table of contents