Unit content
General-purpose digital input and output
A GPIO pin is a microcontroller pin that software can configure for general-purpose digital input or output.
As an output, firmware drives a logical state that the electrical pin represents as a voltage level. As an input, firmware reads whether the observed voltage falls within the hardware's defined low or high range.
GPIO configuration commonly includes direction, output value and electrical options. Many pins are multiplexed: the same physical pin can be connected internally either to GPIO logic or to a peripheral such as UART, SPI or a timer output.
Changing an output register can control LEDs, enables or simple digital actuators. Reading an input can observe switches, digital sensors or external logic.
A GPIO pin is not an unlimited power source. Voltage limits, current limits and the electrical characteristics of the connected circuit still apply.
GPIO is the simplest programmable boundary between firmware state and physical digital signals.