EDH0162En1040 – 06/99
3.118
MM4005
SO — Set I/O output byte
Usage
IMM
PGM
MIP
Syntax
SOnn
Parameters
Description
nn
[int]
— I/O bit mask.
Range
nn
—
0
to
255.
Units
nn
— None.
Defaults
nn
Missing: 0.
Out of range: Error C.
Floating point: Decimal part truncated.
Description
This command sets all output bits of the I/O port. The
nn
parameter is the
mask to be used in setting the I/O output port. For example, if
nn
is 140, the
equivalent binary mask is 10001100 which means that I/O output bits num-
ber 3, 4 and 8 will be set and output bits number 1, 2, 5, 6 and 7 will be
cleared (remember that I/O bits are numbered from 1 to 8).
NOTE
Remember that having an open collector configuration, a set bit means a
conducting transistor. Using a pull-up resistor, a set output bit will mea-
sure a logic low, thus making the output port be the reverse logic type.
NOTE
For the hardware definition of the I/O port, please see Appendix,
Connector Pinouts, GPIO Connector.
Returns
None.
Errors
C
—
Parameter out of limits.
Rel. Commands
CB
—
Clear I/O outputs bits.
RO
—
Read I/O output.
SB
—
Set I/O output bits.
TG
—
Toggle I/O output bits.
Example SO224
|
Set I/O output port bits number 6, 7 and 8 and clear bits 1, 2, 3, 4
and 5.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com