For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

Digital I/O Specifications

Device

TCA9538

Number of Lines

8

Direction

Programmable bit by bit

Logic levels

3.3V nominal outputs, 5V tolerant inputs

Pull resistors

10K ohms +/-1%; Jumper-selectable pull-up/down

Input voltage

Logic 0:

-0.5V min, 0.66V max

Logic 1

2.64V min, 5.5V max

Output Voltage

Logic 0:

0.0V min; 0.7V max @ 10mA output current

Logic 1

2.8V min @ -10mA output current; 3.3V max

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:

  1. 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

Was this helpful?