
S1S60000 Technical Manual
Rev.1.5
EPSON
33
(1)
GPIO access
When controlling GPIO, designate “GPIO” as the target, the GPIO port number as the destination and data to be
output to the port.
The designation format and data/return value are the same as those of control from the network.
Tables 5.3 and
5.4 indicate the designation form when GPIO access is performed on a 16-port basis, and the data/return value
states, respectively.
Only a specific GPIO can be operated by setting the bits corresponding to the target GPIO as “1”, otherwise “0”
in the mask designation.
To specify 16 digits (i.e. when mask, output value and return value are designated),
the upper order is GPIO15 followed by lower order GPIO0.
[ Example 1 ]
Outputting HIGH to GPIO0
Designated data:
GPIO<space>/00?1<return>
Return value: 1<CR><LF>
[ Example 2 ]
Referring to GPIO1 I/O setting and input status
Designated data:
GPIO<space>01<return>
Return value: L<CR><LF>
[ Example 3 ]
Outputting LOW to GPIO0 and HIGH to GPIO4
Designated data:
GPIO<space>0X?W&0000000000010001&0000000000010000<return>
Return value: LLLLPPPPLLL1PLL0<CR><LF>>
[ Example 4 ]
Referring to GPIO15 I/O setting and input status from GPIO0
Designated data:
GPIO<space>0X<return>
Return value: LLLLPPPPLLL0PLL0<CR><LF>
(2)
I2C
When controlling I2C master functions, designate “I2C” as the target and control data strings as the data.
No
destination setting is required for the I2C master.
For control data strings, the value to be output to the I2C bus, restart timing, timing to receive input from the I2C
bus and its number of bytes can be designated.
The control data strings and return values must be written
similarly to when controlling from the network as indicated in Tables 5.5 and 5.6.
When the return value is a hexadecimal number and the bytes designated in “LN” are more than 2 bytes, the
bytes received by I2C earlier becomes the upper order and those received later become the lower order of the
string.
Access examples are indicated as follows (examples when the device used interprets an address
designation data as an index).
[ Example 1 ]
Writing 2-byte data (01h, 02h) from index 0 of the 7-bit slave address 02 device
Designated data:
I2C<space>04000102<return>
Return value: OK<CR><LF>
[ Example 2 ]
Reading out 3-byte data from index 0 of the 7-bit slave address 02 device
Designated data:
I2C<space>0400SR05LN03<return>
Return value: 000001<CR><LF>
[ Example 3 ]
Reading out 3-byte data from index 0 of the 10-bit slave address 234 device
Designated data:
I2C<space>F43400SRF5LN03<return>
Return value: 000001<CR><LF>