Programmable input/output
From Wikipedia, the free encyclopedia
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 language[1] (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
See also
- Freescale 683XX, which has a Timing Processor Unit (TPU)