beautypg.com

Input – B&K Precision 9171-9174 - Manual User Manual

Page 91

background image

79

INPUT

Digital input for representing logic high (1) is 5 V, and for logic low (0)
is 0 V.
Minimum voltage for logic high (1) must be at least 3.15 V.
Maximum voltage for logic low (0) must not exceed 1.35 V.

To setup any of the 8 pins (except pin 5) as input pins, the remote
command

GPIO:DIR is used. All pins (except pin 5) are represented

as 8-bits binary, according to Table 5 above. A “

1” represents

OUTPUT, and a “0” represents INPUT. When using the GPIO:DIR
command, the decimal representation of the 8-bits binary is used.

For example, to set pins 7, 4, 2 and 1 as

INPUT pins, their values

must be set to

0, and the rest 1. Send:


GPIO:DIR 212

212 is used to represent11010100 in binary. Only pins 7, 4, 2, and 1
have the value “

0”, which represents INPUT.

Pin

9

8

7

6

5

4

3

2

1

1

1

0

1

-

0

1

0

0


To check the status of the input pins to be either 5 V (1) or 0 V (0),
use the

GPIO? query command. It will return the decimal

representation of the 8-bits binary that represents all the pins. The
pins with bit value “

1” have 5 V at the input, and “0” for 0 V at input.

This manual is related to the following products: