HP 61010A Owner's Manual page 56

Digital i/o
Table of Contents

Advertisement

SET.NUM.BITS(Zabe/,b/fc) • lets you specify the number of
bits that will be used for data transactions on either the
Digital Input or the Digital Output. The number of bits
used are counted from the LSB (start bit) and proceed to
the MSB. If the start bit is not specified, (see
SET. ST ART. BIT) the software will default to bit 0 as the
start bit. The variable bits is a variable that must be set to
one of the following reserved variable names: Rl, R2, R3,
R4, R5, R6, R7, R8, R9, RIO, Rll, R12, R13, R14, R15, or
R16. These variable names let you specify any number of
bits from 1 to 16. For the Digital Output, unspecified
output bits will be set low if the logic sense is positive, or
high if the logic sense is negative.
Example:
1010 CALL SET.NUM.BITS(DIG.OUT.01,R8)
This example specifies eight output bits. Because a
SET.START.BIT statement has not been programmed, the
start bit of this data byte is bit 0. Therefore, output bits 0
through 7 are specified.
SET,START.BITf/«ibe/,hff) - lets you specify the start bit
(LSB) of the data field that you specified by the
SET.NUM.BITS statement on either the Digital Input or
the Digital Output. To prevent programming errors, you
should always program the SET.NUM.BITS statement
before you program the SET.START.BIT statement. The
SET.START.BIT statement can only be programmed if the
number of bits of the specified data field is less than the
default value of 16 bits. The variable bit is a variable that
must be set to one on the following reserved variable
names: RO, Rl, R2, R3, R4, R5, R6, R7, R8, R9, RIO, Rll,
R12., R13, R14 or R15. These variable names let you specify
any start bit from bit 0 to bit 15.
Example:
1010 CALL SET.NUM.BITS(DIG.OUT.01,R8)
1020 CALL SET. START. BIT (DIG. O UT. 01, R8)
5-8
Programming With BASIC

Advertisement

Table of Contents
loading

Table of Contents