Data Sheet

iolinker Family Data Sheet
Address Function
0x7f Status register
Table 6: Register addresses
4.7.4 REA Read pin states
Function Read the state of pin range x to y
Command byte 0xC7
Argument list First pin address to read, last pin address to read
Reply argument list Current pin states
Example arguments 0x01 0x00 | 0x7f 0x00 (Read pins P1 to P127 )
To read pin states, use the first and the last pin address as parameters.
If the last pin number equals 0, only one pin state will be read. For pins that are not set
as input pin, the state will always be returned as low.
The current pin states will be returned in
pin_count
7
bytes, and, if the pin count is not
a multiple of 7, filled up with 0 bits on the LSB side.
4.7.5 SET Set output states
Function Sets pin range to high (= 1) or low (= 0) state
Command byte 0x83
Argument list First pin address to set, last pin address to set, binary state of
the write out
Example arguments 0x01 0x00 | 0x00 0x00 | 0x40 (set output pin P1 to high state)
If the last pin number equals 0, only one pin state will be changed. Pins that are not of
output type are skipped.
The binary state of the outputs is encoded in 1 byte per 7 pins. If the number of pins
being set is not a multiple of 7, unused bits in the last byte are filled up with zeros from the
LSB side.
Note that PWM output is only active for output pins in high state, i.e. this command can
also be used to turn PWM on and off.
c
2017 jInvent. The specifications and information herein are subject to change without notice.
www.jinvent.de Page 10 iolinker introduction