Jump to content

General-purpose input/output

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Lambtron (talk | contribs) at 13:45, 7 June 2018 (clarified lede; computer board→electronic circuit board). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Male GPIO pins

A general-purpose input/output (GPIO) is an uncommitted digital signal pin on an integrated circuit or electronic circuit board whose behavior—including whether it acts an input or output—is controllable by the user at run time.

GPIO pins have no predefined purpose, and go unused by default.[1][2] The idea is that sometimes a system integrator who is building a full system might need a handful of additional digital control lines—and having these available from a chip avoids having to arrange additional circuitry to provide them. For example, the Realtek ALC260 chips (audio codec) have 8 GPIO pins, which go unused by default. Some system integrators (Acer Inc. laptops) use the first GPIO (GPIO_0) on the ALC260 to turn on the amplifier for the laptop's internal speakers and external headphone jack.

Usage

Raspberry Pi Zero with headerless GPIO array along the top

Manufacturers use GPIOs in:

Capabilities

GPIO capabilities may include:[2]

  • GPIO pins can be configured to be input or output[4]
  • GPIO pins can be enabled/disabled
  • Input values are readable (typically high or low)
  • Output values are writable/readable
  • Input values can often be used as IRQs (typically for wakeup events)

GPIO peripherals vary widely. In some cases, they are simple—a group of pins that can switch as a group to either input or output. In others, each pin can be set up to accept or source different logic voltages, with configurable drive strengths and pull ups/downs. Input and output voltages are typically—though not always—limited to the supply voltage of the device with the GPIOs, and may be damaged by greater voltages.

A GPIO pin's state may be exposed to the software developer through one of a number of different interfaces, such as a memory mapped peripheral, or through dedicated IO port instructions. Some GPIOs have 5 V tolerant inputs: even when the device has a low supply voltage (such as 2 V), the device can accept 5 V without damage.

Ports

A GPIO port is a group of GPIO pins (typically 8 GPIO pins) arranged in a group and controlled as a group.[4]

See also

References

  1. ^ White, Jon, ed. (2016). Raspberry Pi - The Complete Manual (7 ed.). Imagine Publishing. p. 36. ISBN 978-1785463709.
  2. ^ a b "General Purpose Input/Output". Oracle® Java ME Embedded Developer's Guide (8 ed.). Oracle Corporation. 2014.
  3. ^ "GPIO - Raspberry Pi Documentation". Raspberry Pi Foundation. Retrieved 3 November 2016.
  4. ^ a b Balachandran, Sasang (2009). General Purpose Input/Output (GPIO) (PDF). Michigan State University College of Engineering.