IT lexicon › Hardware › PIO (programmable I/O)

PIO (programmable I/O)

Hardware På svenska → Updated: 2026-11-04

Tiny state machines sitting next to the RP2040's cores, running their own little programs against the pins so the CPU doesn't have to bit-bang protocols it has no hardware for.

Most microcontrollers come with a fixed menu of peripherals: this many UARTs, that many SPI and I²C ports. Anything off the menu means the CPU toggling GPIO by hand and hoping no interrupt wrecks the timing. With the RP2040 in 2021, Raspberry Pi tried something else: two PIO blocks with four state machines each, a shared 32-instruction program memory per block, and an instruction set of exactly nine instructions.

Every instruction takes one clock cycle and can also set pins and insert a delay, so timing is cycle-exact. Data moves through FIFOs that DMA can keep fed. People have since built WS2812 drivers, VGA, DVI and even Ethernet on them. The RP2350 (2024) got a third block, which tells you how that experiment went.

← Back to the lexicon