15. DIGITAL I/O
This page describes the Digital I/Os present on the JETBOX-FLOYD system.
Jetbox-Floyd provides 8 GPIOs optionally exposed on the front panel at connector EXP 2. Refer to Section 8.8 Digital I/Os (EXP 2) for connector pinouts.
The DIOs on the JETBOX-FLOYD is realized using I2C to GPIO expander.
The I2C GPIO expander can be addressed at 0x70 on on the bus /dev/i2c-0.
15.1 Digital I/O Specifications
The DIOs on Jetbox-Floyd are 3.3V output compliant & 5V input tolerant. The logic specifications are as follows:
Since the DIOs are realized with GPIO expanders, the DIOs do not provide any alternate functions but can only be used to drive logic high & logic low.
15.2 Software Commands
There are 3 commands to use the DIOs. They are as follows:
gpio_util setdir
This command configures the direction of a particular DIO. For example, to set DIO 3 as an input & DIO 4 as an output, follow the command as provided below:
2. gpio_util getdir
This command reads the direction of a particular DIO. For example, to read the direction of DIO 2 (earlier set as an input) & DIO 5 (earlier set as an output), use the command as follows:
3. gpio_util setval
This command configures the logic driven to an output. For example, to drive a logic 0 to DIO 2 & a logic 1 to DIO 5, use the command as follows:
4. gpio_util getval
This command reads the logic at an input pin. For example, to read the logic value at DIO 6, use the command as follows:
Last updated