GPIO
Encyclopedia
General Purpose Input/Output (a.k.a. GPIO) is a generic pin on a chip
Integrated circuit
An integrated circuit or monolithic integrated circuit is an electronic circuit manufactured by the patterned diffusion of trace elements into the surface of a thin substrate of semiconductor material...

 whose behavior (including whether it is an input or output pin) can be controlled (programmed) through software.

GPIO pins have no special purposes on themselves, and go unused by default. The idea is that sometimes the system integrator building a full system that uses the chip might find useful to have a handful of additional digital control lines, and having these available from the chip can save the hassle of having to arrange additional circuitry to provide them. For example, the Realtek ALC260 chips (audio codec) have 4 GPIO pins, which go unused by default. Some system integrators (Acer laptops) employing the ALC260 use the first GPIO (GPIO0) to turn on the amplifier used for the laptop's internal speakers and external headphone jack.

Usage

GPIOs are used in:
  • chips with pin scarcity: IC
    Integrated circuit
    An integrated circuit or monolithic integrated circuit is an electronic circuit manufactured by the patterned diffusion of trace elements into the surface of a thin substrate of semiconductor material...

    , SoC
    System-on-a-chip
    A system on a chip or system on chip is an integrated circuit that integrates all components of a computer or other electronic system into a single chip. It may contain digital, analog, mixed-signal, and often radio-frequency functions—all on a single chip substrate...

    , embedded and custom hardware, programmable logic devices (e.g., FPGAs)
  • multifunction chips: power managers, audio codecs, video cards

Capabilities

GPIO capabilities include:
  • direction: GPIO pins can be configured to be input or output
  • enable mask (aka GPIO mask): GPIO pins can be enabled/disabled
  • input values are readable (typically high=1, low=0)
  • output values are writable/readable
  • input values can often be used as IRQs
    Interrupt
    In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution....

     (typically for wakeup events)
  • can use DMA
    Direct memory access
    Direct memory access is a feature of modern computers that allows certain hardware subsystems within the computer to access system memory independently of the central processing unit ....

     to move large quantities of data efficiently into or out of the device


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

Some GPIOs have 5 V tolerant inputs: even on low supply voltages (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 treated as a single port.

See also

  • Programmed input/output
    Programmed input/output
    Programmed input/output is a method of transferring data between the CPU and a peripheral such as a network adapter or an ATA storage device....

  • SGPIO
    SGPIO
    SGPIO is an acronym for Serial General Purpose Input/Output which is a 4-signal bus used between a host bus adapter and a backplane; of the 4 signals, 3 are driven by the HBA and 1 by the backplane...

  • I2C
  • Serial Peripheral Interface Bus
    Serial Peripheral Interface Bus
    The Serial Peripheral Interface Bus or SPI bus is a synchronous serial data link standard named by Motorola that operates in full duplex mode. Devices communicate in master/slave mode where the master device initiates the data frame. Multiple slave devices are allowed with individual slave select ...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK