13
2.
How to read or set the value of the gpio
GPIO0~7 (IO number)
a)When the software configures the IO port as input, (Negative trigger).
Configuration command: gpiocontrol read [gpio number]
For example: Setting gpio 0 as the input state, and read the input level
diamond:/ # gpiocontrol read 0
diamond:/ #
Trigger voltage: The logic level is ‘0’, 0~1.5V.
Non-trigger voltage: The logic level is ‘1’, the input IO is floating, or beyond 2.5V, but
the maximum input voltage must be less than 50V.
b)When the software configures the IO port as output, it is an open-drain output.
Configuration command: gpiocontrol [gpio number] set [output state]
For example: Set gpio 0 as output state and output high level
diamond:/ # gpiocontrol 0 set 1
diamond:/ #
When the output IO is enabled, the logic level is ‘0’, and the IO voltage is less than
1.5V.
Summary of Contents for PC-701 Pro
Page 1: ...Embedded Computer User Manual...
Page 15: ...15 3 2 3 3...