Article · Wikipedia archive · Last revised May 30, 2026

Programmable input/output

In embedded systems and other computers, a programmable input/output is a piece of hardware that manages input/output pins without requiring the constant attention of the CPU – essentially one that performs bit-banging in place of the CPU. Its behavior is determined by a program uploaded to the PIO chip by the CPU. It communicates with the CPU using interrupts.

Last revised
May 30, 2026
Read time
≈ 2 min
Length
506 w
Citations
13
Source

In embedded systems and other computers, a programmable input/output (programmable IO, PIO) is a piece of hardware that manages input/output pins (such as GPIO) without requiring the constant attention of the CPU – essentially one that performs bit-banging in place of the CPU. Its behavior is determined by a program uploaded to the PIO chip by the CPU. It communicates with the CPU using interrupts.

Embedded systems

Some microcontrollers include a PIO module to improve I/O performance. Two classic examples of embedded PIO include the PIO of Raspberry Pi Pico (RP2040; 2021)1 and the FlexIO from NXP (KL43; 2010s).2

Much has been written about the PIO module of the RP2040 because of its low cost and educational focus. The RP2040 has two PIO modules, each of which has four hardware state machines, a RX FIFO, a TX FIFO, and a pair of shift registers. These state machines are programmed using a special assembly language1 (or equivalently, a syntactical transliteration from MicroPython).3 The PIO modules can access GPIO pins (only digitally), set/unset IRQ, and perform direct memory access. PIO can be used for UART serial communication,1 MIDI,4 and even send-only 10BASE-T and 100BASE-T ethernet.5

The FlexIO from NXP predates the RP2040 PIO. It consists of 4 32-bit shifters, 4 16-bit timers, 8 bidirectional digital I/O pins, a number of configuration registers for each shifter and timer, and multiplexers for the input, timer, and output. It is programmed by setting the configuration registers so that the components chain together into the desired behavior.6 Official documentation is available for emulating UART, SPI, I2C, and I2S.2

Industrial systems

Industrial programmable I/O controllers are available, but they generally represent more complex systems than an embedded PIO. They commonly capable of analog I/O, RS-232, and RS-485. For example:

  • A EN 50155 PIO designed for railcar use contains its own CPU, an NXP Vybrid VF50N.7
  • An industrial "remote IO module" contains an Atmel SAM4E16E (Cortex-M4). It provides Ethernet access.8
  • A IEC 61131-3 PIO is described as functioning as a "local microcontroller".9

FPGA

There are dedicated PIO modules to be used with FPGA chips. These modules contain their own FPGA chip so they can perform the task in place of the main module.10

See also

See also

References

References

  1. "Raspberry Pi Pico Serial Communication Example(MicroPython)". Electrocredible. 2023-01-24. Archived from the original on 2023-06-03. Retrieved 2023-06-10.
  2. Krenek, Pavel (2015). "Emulating UART by Using FlexIO" (PDF). NXP. Archived (PDF) from the original on 2022-10-05. Retrieved 2023-06-10.
  3. "Programmable IO — MicroPython latest documentation". docs.micropython.org.
  4. McKinney, Josh (2022-11-05). "Programmable IO (PIO) for MIDI with the Rasberry Pi Pico". joshka.net. Archived from the original on 2023-04-04. Retrieved 2023-06-10.
  5. Markgraf, Steve (2 April 2026). "steve-m/Pico-100BASE-TX: Bit-banged 100 MBit/s Fast Ethernet transmitter and UDP framer for Raspberry Pi RP2040/RP2350".
  6. "Understanding FlexIO". NXP Community. 16 June 2015.
  7. "PC2610 - PC2 Configurable I/O Controller". www.duagon.com.
  8. "Programmable I/O Controller Module". IEN.EU - Industrial Engineering News Europe.
  9. "MX programmable IO modules - MX". Leroy Automation.
  10. "Simulink® Programmable I/O modules | Speedgoat". www.speedgoat.com.
External links