
Sensoray Model 626 Instruction Manual
10
9.2 Writing to the Digital Outputs
There are 3 digital output registers used to write to the outputs. The format of the data to be written to
each register is shown below.
Table 5 Writing to Digital Outputs
Offset Output Channel Number
(Hex)
Register
Name
Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
48 DOUTA 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
58 DOUTB 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
68 DOUTC 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
Writing a “0” to a bit in the output register will cause the corresponding output to turn off and thus give
an output of 5V. When a ‘1’ is written then the output transistor is turned on causing the output channel
to give an output of 0V.
When an I/O channel is to be used as an input then a ‘0’ must be written to the corresponding bit of that
channels output register. This is to prevent high currents caused if the output transistor is turned on
while a 5V input signal is being applied to the input.
9.2.1 Digital Outputs 0-5 used as Counter Overflows
Digital outputs 0-5 can be setup to pull the corresponding output load low for a short pulse (500nsec)
when the counters overflow.
9.3 Reading the Digital Inputs
There are three digital input registers used to read the inputs. The format of the data returned by each
register is shown in the table below.
Table 6 Reading Digital Inputs
Offset Input Channel Number
(Hex)
Register
Name
Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
40 DINA 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
50 DINB 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
60 DINC 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
Each digital input has a 10K Ohm pull-up resistor to +5V. With a 5V input or no input connected a ‘0’
will be read from the digital input register. Pulling the input to ground will cause a ‘1’ to be read from
the digital input register. The corresponding output register must have “0” written to it before it can be
used as an input.
Kommentare zu diesen Handbüchern