VMX-pi IO Map for FRC

IO Overview

This summary of VMX-pi IO configuration is sufficient for most FRC Programming uses; more detailed information is available in the VMX-pi Hardware Reference Manual.

This page also describes:

  • how WPI Channel Addresses map onto the VMX-pi Pins
  • certain limits on Quadrature Encoders and Counters

Details on the VMX-pi Communication Ports and associated WPI Channel Address Mapping are provided on the VMX-pi Digital Communication Port Map.

NOTE: if additional GPIO beyond that provided by VMX-pi is needed, the QWIIC-compatible GPIO Expander is a small, inexpensive option.

VMX-pi provides several different IO pin types.

Connection Type Connector Type Location
Flex DIO Connectors JST GH Connector Bottom-right
Flex DIO Header 3-pin PWM-style Header Left-side Top
High Current DIO Header 3-pin PWM-style Header Left-side mid
Analog Input Header3-pin PWM-style Header Left-side bottom
Comm DIO Connectors JST GH Connector Bottom-left

Click on the links in the table above for links to purchase necessary cables for VMX-pi Connectors. JST GH Breakout Boards are also available at the KauaiLabs Store.

FlexDIO Connectors

FlexDIO Connectors are a set of four locking JST GH connectors (4 pins each) with power, ground, signal A and signal B on each connector. 
FlexDIO Connectors are designed to support Quadrature Encoders, but may also be configured for use as Digital Inputs, Interrupts, Digital Outputs, PWM Generators or Counters.

FlexDIO Header

The FlexDIO Header provides 4 sets of power, ground, and a single signal channel on .1″ (2.54mm) pins.  The signals may be configured to support Quadrature Encoders, Digital Inputs, Interrupts, Digital Outputs, PWM Generation or Counters. Note that only 2 of the pins on this header support Quadrature Encoders, see below for details.

High Current DIO Header

The High-Current DIO Header provides 10 sets of power, ground, and a single signal channel on .1″ (2.54mm) pins.  The signals may be configured to support Digital Inputs, Interrupts, Digital Outputs including for Relays, or PWM Generation.

NOTE: The High-Current DIO Header may be configured in either Output or Input Direction, see below for details.

Analog Input Header

The Analog Input Header provides 4 sets of power, ground, and a single signal channel on .1″ (2.54mm) pins.  The signals may be configured to support Analog Accumulation and/or Analog-triggered Interrupts.

Comm DIO Connectors

The 3 CommDIO Connectors are three locking JST GH connectors (4 pins each) with different sets of power/ground/signals.  Each connector may be configured to communicate using the corresponding digital communication protocol.  Alternatively, the Input signals may be configured for use as Digital Inputs or Interrupts; Output signals may be configured for use as Digital Outputs or PWM.

Note: The SPI connector has 4 signal pins and does not provide power and ground.

Pin 1 Pin 2 Pin 3 Pin 4
I2C Ground Power (5 or 3.3V) SDA [OUTPUT] SCL [OUTPUT]
UART Ground Power (5 or 3.3V) TX [OUTPUT] RX [INPUT]
SPI SCK [OUTPUT] MOSI [OUTPUT] MISO [INPUT] CS [OUTPUT]

Output Voltage Selection

Either 5 or 3.3V power output for external devices (both power and signal level) may be selected for Flex, High Current and Comm DIOs and also for power pins on the Analog Input Header.

IMPORTANT NOTE: If any of the external devices connected to pins in any of these groups are not 5V tolerant, ensure the voltage selection jumper is set to 3.3V to avoid damage to the external device.

High Current DIO Direction configuration

The entire bank of High Current DIOs can be either all outputs (default), or all inputs.  Direction selection is performed in hardware via the High Current DIO Input/Output Jumper.  If the jumper is present, all High Current DIOs function as outputs, otherwise they function as inputs.

  • Output Configuration: 10 High Current DIO Pins are Digital Outputs
  • Input Configuration: 10 High Current DIO Pins are Digital Inputs

NOTE: The High Current Direction setting impacts the behavior of PWM, Relay and Digital IO Channels, described further below. Therefore this setting is one of the first things to verify in case of improper operation of the High Current DIO Channels.

Recommendation: Use the default Direction (Output) unless your configuration requires more digital inputs.

FRC WPI Library Channel Addressing – High Current DIO OUTPUT DIRECTION (Default)

When programming a FRC Robot application on VMX-pi, the various WPI Library Channel types (Analog Input, PWM, Relay, Digital IO) must be addressed as described in this section.

NOTE: If the High Current DIO Direction is set to INPUT, see the special section below, which documents how this impacts WPI Library Channel addressing.

WPI Library Analog Input Channel Addressing

4 Analog Input Channels are available.

WPI Library PWM Channel Addressing

28 PWM Channels are available. Note that these channels are not dedicated, since they can be configured for other purposes.

High Current DIO Header WPI LIbrary PWM Channel Addressing (Direction == OUTPUT)
Flex DIO Connector WPI Library PWM Channel Addressing
Flex DIO Header WPI Library PWM Channel Addressing
Comm DIO Channel WPI Library PWM Channel Addressing

WPI Library Digital I/O (DIO) Channel Addressing

30 Digital I/O Channels are available. Note that these channels are not dedicated, since they can be configured for other purposes. Note also that only FlexDIO pins are direction-selectable in software.

Comm DIO Header WPI Library Digital I/O Addressing

Comm DIO Header WPI Library Digital I/O Addressing

High Current DIO Header WPI Library Digital Out Addressing (Direction == OUTPUT)

Note: When configured in the OUTPUT Direction, the High Current DIO Pins only have Output Capability.

Comm DIO Connectors WPI Library Digital Input or Output Addressing

Note: Each CommDIO Pin is either an Output or an Input.  See the diagram above for details regarding which Pins have Output or Input Capability.

Relay Channel Addressing

4 Relay Channel sets – each with a forward direction pin and a reverse direction pin – are available. Note that these channels are not dedicated, since they can be configured for other purposes.

High Current DIO Header WPI Library Relay Channel Addressing (Direction = OUTPUT)

Quadrature Encoder Configuration

Up to 5 Quadrature Encoders are supported. Quadrature Encoders A & B Inputs must be connected to adjacent pairs of FlexDIO Digital Input Channels; the following FlexDIO Digital Input Channel pairs may be used for Quadrature Encoders:

DI 0 and 1

DI 2 and 3

DI 4 and 5

DI 6 and 7

DI 8 and 9

The lower-numbered channel of each pair should be connected to Quadature Encoder Channel A, and the higher-numbered channel should be connected to Quadrature Encoder Channel B.

Counter Configuration

Up to 6 Counters are supported. Each Counter is internally connected to a adjacent pairs of FlexDIO Digital Input Channels. The following FlexDIO Digital Input Channel pairs may be used for Counters:

Counter Input
Channel Pair
Supported WPI Library Counter Modes
DI 0 & 1kTwoPulse *, kSemiPeriod, kExternalDirection
DI 2 & 3kTwoPulse *, kSemiPeriod, kExternalDirection
DI 4 & 5kTwoPulse *, kSemiPeriod, kExternalDirection
DI 6 & 7kTwoPulse *, kSemiPeriod, kExternalDirection
DI 8 & 9kTwoPulse *, kSemiPeriod, kExternalDirection
DI 10 & 11kTwoPulse * , kSemiPeriod

Counter Limitations

NOTE (*): kTwoPulse mode using two separate input signals (e.g., one “Up” input signal and a separate “Down” input signal) are not supported. However, a single input configured as both “Up” and “Down” is supported.

NOTE: kPulseLength mode is not supported on any VMX-pi Counter. By extension, this implies that the “Direction Sensitive” mode of the WPI Library’s “Geartooth” class is not supported on VMX-pi.

NOTE: If configuring a counter to use one input channel (e.g., kTwoPulse or kSemiPeriod modes), the unused input channel in that Counter’s Channel Pair may be configured in software for other uses (including Digital Input, Interrupt, Digital Output), although it may not be configured for PWM Generation or PWM Capture.

High Current DIO INPUT DIRECTION (ADVANCED FEATURE)

When the High Current DIO Direction Jumper is set to INPUT, the WPI Library Channel Addressing is impacted as follows:

WPI Library PWM Channels 0-9 are NOT PRESENT in INPUT MODE.

WPI Library Relay Channels are NOT PRESENT in INPUT MODE.

WPI Library Digital IO Channels on the HiCurrDIO Header are in INPUT MODE ONLY in INPUT MODE, as shown below: