110425
OPERATIONS MANUAL PCM-UIO48B
8
WRITE_BIT
– Writes a
1
or
0
to an I/O Pin
Syntax
void write_bit(int bit_number, int value);
Description
This function takes two arguments:
bit_number – a value from 1 to 48 specifying the I/O
pin to be acted upon.
value - is ether 1 or 0.
This function allows for writing of a single bit to either
a
0
or a
1
as specified by the second argument. There
is no return value and other bits in the I/O port are not
affected.
SET_BIT
– Sets the specified I/O Pin
Syntax
void set_bit(int bit_number);
Description
This function takes a single argument:
bit_number – a value from 1 to 48 specifying the I/O
pin to be set.
This function sets the specified I/O port bit. Note that
setting a bit results in the I/O pin actually going low.
There is no return value and other bits in the same I/O
port are unaffected.
CLR_BIT
– Clears the specified I/O Pin
Syntax
void clr_bit(int bit_number);
Description
This function takes a single argument:
bit_number – a value from 1 to 48 specifying the I/O
pin to clear.
This function clears the specified I/O bit. Note that
clearing the I/O bit results in the actual I/O pin going
high. This function does not affect any bits other than
the one specified.