Knowledge (XXG)

General-purpose input/output

Source 📝

143: 244: 256: 127: 268: 159: 232: 329:
magnitude of the process control signal. For example, when controlling light intensity, the light may be dimmed by reducing the GPIO duty cycle. Some analog processes require an analog control voltage. In such cases, it may be feasible to connect a GPIO, which is operated as a PWM output, to an RC filter to create a simple, low cost
294:(or mechanical or solid-state relay), a GPIO may be used to control high-power devices such as lights, solenoids, heaters, and motors (e.g., fans and blowers). Similarly, an input buffer, relay or opto-isolator is often used to translate an otherwise incompatible signal (e.g., high voltage) to the logic levels required by a GPIO. 59:
GPIOs have no predefined purpose and are unused by default. If used, the purpose and behavior of a GPIO is defined and implemented by the designer of higher assembly-level circuitry: the circuit board designer in the case of integrated circuit GPIOs, or system integrator in the case of board-level
328:
Although GPIOs are fundamentally digital in nature, they are often used to control analog processes. For example, a GPIO may be used to control motor speed, light intensity, or temperature. Usually, this is done via PWM, in which the duty cycle of the GPIO output signal determines the effective
185:
Like IC-based GPIOs, some boards merely include GPIOs as a convenient, auxiliary resource that augments the board's primary function, whereas in other boards the GPIOs are the central, primary function of the board. Some boards, which are classified usually as multi-function I/O boards, are a
115:
In some ICs, particularly microcontrollers, a GPIO pin may be capable of other functions than GPIO. Often in such cases it is necessary to configure the pin to operate as a GPIO (vis-à-vis its other functions) in addition to configuring the GPIO's behavior. Some microcontroller devices (e.g.,
297:
Integrated circuit GPIOs are commonly used to control or monitor other circuitry (including other ICs) on a board. Examples of this include enabling and disabling the operation of (or power to) other circuitry, reading the states of on-board switches and configuration shunts, and driving
142: 341:
GPIO interfaces 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
68:
Integrated circuit (IC) GPIOs are implemented in a variety of ways. Some ICs provide GPIOs as a primary function whereas others include GPIOs as a convenient "accessory" to some other primary function. Examples of the former include the
286:
GPIOs are used in a diverse variety of applications, limited only by the electrical and timing specifications of the GPIO interface and the ability of software to interact with GPIOs in a sufficiently timely manner.
353:
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.
107:
ICs usually include GPIOs. Depending on the application, a microcontroller's GPIOs may comprise its primary interface to external circuitry or they may be just one type of I/O used among several, such as
317:(SPI) bus; these are usually used to facilitate serial communication with ICs and other devices which have compatible serial interfaces, such as sensors (e.g., temperature sensors, pressure sensors, 213:, or combinations of these, may be used to buffer and condition the GPIO signals and to protect board circuitry. Also, higher-level functions are sometimes implemented, such as input 182:
Many circuit boards expose board-level GPIOs to external circuitry through integrated electrical connectors. Usually, each such GPIO is accessible via a dedicated connector pin.
243: 302:(LED) status indicators. In the latter case, a GPIO can, in many cases, supply enough output current to directly power an LED without using an intermediate buffer. 158: 346:. Input and output voltages are usually, but not always, limited to the supply voltage of the device with the GPIOs, and may be damaged by greater voltages. 325:. Taken to the extreme, this method may be used to implement an entire parallel bus, thus allowing communication with bus-oriented ICs or circuit boards. 290:
GPIOs usually employ standard logic levels and cannot supply significant current to output loads. When followed by an appropriate high-current output
186:
combination of both; such boards provide GPIOs along with other types of general-purpose I/O. GPIOs are also found on embedded controller boards and
255: 126: 267: 116:
Microchip dsPIC33 family) incorporate internal signal routing circuitry that allows GPIOs to be programmatically mapped to device pins.
449: 309:
communication interface. For example, two GPIOs may be used to implement a serial communication bus such as Inter-Integrated Circuit (
231: 120:(FPGA) extend this ability by allowing GPIO pin mapping, instantiation and architecture to be programmatically controlled. 117: 577: 349:
A GPIO pin's state may be exposed to the software developer through one of a number of different interfaces, such as a
357:
A GPIO port is a group of GPIO pins (often 8 pins, but it may be less) arranged in a group and controlled as a group.
330: 314: 523: 492: 572: 394: 222: 74: 187: 404: 299: 169: 165: 82: 149: 478: 441: 45: 148:
A "versatile interface adapter", which combines 20 GPIOs with other general-purpose interfaces (
445: 350: 274: 41: 343: 322: 210: 205:
Board-level GPIOs are often given abilities which IC-based GPIOs usually lack. For example,
468: 56:) board which may be used as an input or output, or both, and is controllable by software. 552: 527: 472: 206: 104: 49: 547: 437: 291: 53: 566: 371: 318: 109: 199: 537: 429: 306: 218: 98: 542: 532: 195: 133: 70: 381: 557: 214: 520: 433: 191: 94: 97:
ALC260 IC, which provides eight GPIOs along with its main function of
310: 86: 17: 399: 249:
GPIO interface for Hewlett-Packard Series 80 computers (HP 82940A)
90: 27:
User-controllable digital signal pin on an integrated circuit
364:GPIO pins can be configured to be input or output 305:Multiple GPIOs are sometimes used together as a 261:Ethernet interface to 48 GPIOs (Sensoray 2410) 237:Network router with three GPIOs (Banana Pi R1) 112:I/O, counter/timer, and serial communication. 313:), and four GPIOs can be used to implement a 8: 474:Oracle Java ME Embedded Developer's Guide 416: 227: 122: 209:inputs, high-current output drivers, 7: 463: 461: 132:Parallel bus interface to 24 GPIOs ( 493:"GPIO – Raspberry Pi Documentation" 377:Output values are writable/readable 370:Input values are readable (usually 40:) is an uncommitted digital signal 426:Raspberry Pi – The Complete Manual 380:Input values can often be used as 93:. An example of the latter is the 25: 367:GPIO pins can be enabled/disabled 73:, which interfaces 24 GPIOs to a 266: 254: 242: 230: 157: 141: 125: 469:"General Purpose Input/Output" 273:Color coded GPIOs (top) on an 118:Field-programmable gate arrays 81:ICs, which interface GPIOs to 1: 360:GPIO abilities may include: 48:or electronic circuit (e.g. 34:general-purpose input/output 384:(usually for wakeup events) 331:digital-to-analog converter 315:Serial Peripheral Interface 594: 533:FreeBSD gpio(3) API manual 521:GPIO framework for FreeBSD 168:with 29 remappable GPIOs ( 538:FreeBSD gpioctl(8) manual 553:Linux Kernel Doc on GPIO 526:5 September 2017 at the 424:White, Jon, ed. (2016). 64:Integrated circuit GPIOs 497:Raspberry Pi Foundation 395:Programmed input/output 558:LinuxTV GPIO Pins Info 543:FreeBSD gpio(4) manual 223:pulse-width modulation 188:Single board computers 77:bus, and various GPIO 75:parallel communication 548:ALSA Development List 405:Special input/output 300:light-emitting diode 170:Microchip Technology 83:serial communication 578:Integrated circuits 166:PIC microcontroller 150:MOS Technology 6522 479:Oracle Corporation 442:Imagine Publishing 46:integrated circuit 351:memory-mapped I/O 323:motor controllers 275:Asus Tinker Board 211:optical isolators 178:Board-level GPIOs 16:(Redirected from 585: 508: 507: 505: 503: 489: 483: 482: 465: 456: 455: 428:(7th ed.). 421: 270: 258: 246: 234: 161: 145: 129: 21: 593: 592: 588: 587: 586: 584: 583: 582: 563: 562: 528:Wayback Machine 517: 512: 511: 501: 499: 491: 490: 486: 467: 466: 459: 452: 423: 422: 418: 413: 391: 339: 284: 277: 271: 262: 259: 250: 247: 238: 235: 221:detection, and 207:Schmitt-trigger 180: 173: 162: 153: 146: 137: 130: 105:Microcontroller 66: 28: 23: 22: 15: 12: 11: 5: 591: 589: 581: 580: 575: 573:Computer buses 565: 564: 561: 560: 555: 550: 545: 540: 535: 530: 516: 515:External links 513: 510: 509: 484: 477:(8 ed.). 457: 451:978-1785463709 450: 444:. p. 36. 438:United Kingdom 415: 414: 412: 409: 408: 407: 402: 397: 390: 387: 386: 385: 378: 375: 368: 365: 344:pull ups/downs 338: 337:Implementation 335: 319:accelerometers 283: 280: 279: 278: 272: 265: 263: 260: 253: 251: 248: 241: 239: 236: 229: 225:(PWM) output. 179: 176: 175: 174: 163: 156: 154: 147: 140: 138: 131: 124: 85:buses such as 65: 62: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 590: 579: 576: 574: 571: 570: 568: 559: 556: 554: 551: 549: 546: 544: 541: 539: 536: 534: 531: 529: 525: 522: 519: 518: 514: 498: 494: 488: 485: 480: 476: 475: 470: 464: 462: 458: 453: 447: 443: 439: 435: 431: 427: 420: 417: 410: 406: 403: 401: 398: 396: 393: 392: 388: 383: 379: 376: 373: 369: 366: 363: 362: 361: 358: 355: 352: 347: 345: 336: 334: 332: 326: 324: 320: 316: 312: 308: 303: 301: 295: 293: 288: 281: 276: 269: 264: 257: 252: 245: 240: 233: 228: 226: 224: 220: 216: 212: 208: 203: 201: 197: 193: 189: 183: 177: 171: 167: 160: 155: 151: 144: 139: 135: 128: 123: 121: 119: 113: 111: 110:analog signal 106: 102: 100: 96: 92: 88: 84: 80: 76: 72: 63: 61: 57: 55: 51: 47: 43: 39: 35: 30: 19: 500:. Retrieved 496: 487: 473: 425: 419: 359: 356: 348: 340: 327: 304: 296: 289: 285: 204: 200:Raspberry Pi 184: 181: 114: 103: 78: 67: 58: 37: 33: 31: 29: 430:Bournemouth 372:high or low 307:bit banging 219:signal edge 172:PIC24FJ256) 99:audio codec 567:Categories 502:3 November 411:References 196:BeagleBone 134:Intel 8255 71:Intel 8255 524:Archived 389:See also 217:, input 215:debounce 190:such as 79:expander 481:. 2014. 434:England 192:Arduino 95:Realtek 60:GPIOs. 448:  321:) and 292:buffer 198:, and 44:on an 400:SGPIO 282:Usage 91:SMBus 504:2016 446:ISBN 382:IRQs 89:and 54:MPUs 50:MCUs 38:GPIO 18:GPIO 311:I²C 87:I²C 42:pin 569:: 495:. 471:. 460:^ 440:: 436:, 432:, 333:. 202:. 194:, 164:A 101:. 32:A 506:. 454:. 374:) 152:) 136:) 52:/ 36:( 20:)

Index

GPIO
pin
integrated circuit
MCUs
MPUs
Intel 8255
parallel communication
serial communication
I²C
SMBus
Realtek
audio codec
Microcontroller
analog signal
Field-programmable gate arrays
Parallel bus interface to 24 GPIOs (Intel 8255)
Intel 8255
A "versatile interface adapter", which combines 20 GPIOs with other general-purpose interfaces (MOS Technology 6522)
MOS Technology 6522
A PIC microcontroller with 29 remappable GPIOs (Microchip Technology PIC24FJ256)
PIC microcontroller
Microchip Technology
Single board computers
Arduino
BeagleBone
Raspberry Pi
Schmitt-trigger
optical isolators
debounce
signal edge

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.