Programming And Reading Registers; Programming Enable Registers; 16-Bit Status Register - Keithley 2303 User Manual

High speed
Hide thumbs Also See for 2303:
Table of Contents

Advertisement

Programming and reading registers

Programming enable registers

The only registers that can be programmed by the user are the enable registers. All other reg-
isters in the status structure are read-only registers. The following explains how to ascertain the
parameter value for the various commands used to program enable registers. The actual com-
mands are covered later in this section (see Tables 7-2 and 7-5).
A command to program an event enable register is sent with a decimal parameter value that
determines the desired state (0 or 1) of each bit in the appropriate register. The bit positions of
the register (see Figure 7-2) indicate the parameter value in binary format. For example, if you
wish to sets bits B4, B3 and B1, the binary value would be 11010 (where B4=1, B3=1, B2=0,
B1=1, B0=0 and all other bits are 0). The decimal equivalent of binary 11010 is 26. Therefore,
the parameter value for the enable command is 26.
Another way to determine the decimal value is to add up the decimal weights for the bits that
you wish to set. Note that Figure 7-2 includes the decimal weight for each register bit. To set bits
B4, B3 and B1, the parameter value would be the sum of the decimal weights for those bits
(16+8+2 = 26).
Figure 7-2

16-bit status register

A) Bits 0 through 7
Bit Position
Binary Value
Decimal Weights
B) Bits 8 through 15
Bit Position
Binary Value
Decimal Weights
Reading registers
Any register in the status structure can be read by using the appropriate query (?) command.
The specific query commands are covered later in this section (see Tables 7-2 through 7-5).
The response message to the query command is a decimal value. To determine which bits in
the register are set, convert that decimal value to its binary equivalent. For example, the binary
equivalent of decimal 41 is 101001. This binary value indicates that bits B5, B3 and B0 are set.
B7
B6
B5
0/1
0/1
0/1
128
64
32
7
6
5
(2
)
(2
)
(2
)
B15
B14
B13
0/1
0/1
0/1
32768
16384
8192
15
14
13
(2
)
(2
)
(2
)
B4
B3
B2
0/1
0/1
0/1
16
8
4
4
3
2
(2
)
(2
)
(2
)
B12
B11
B10
0/1
0/1
0/1
4096
2048
1024
12
11
10
(2
)
(2
)
(2
)
Status Structure 7-5
B1
B0
0/1
0/1
2
1
1
0
(2
)
(2
)
B9
B8
0/1
0/1
512
256
9
8
(2
)
(2
)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

2303b2303-pj

Table of Contents