Skip to Content

Types of Pins

A typical microcontroller board will have the following types of pins:

GPIO Pins

General Purpose Input Output (GPIO) pins are used for connecting and exchanging data or signals with other components and boards. GPIO pins only work with digital signals, with two voltage levels, HIGH (representing a logical 1) and LOW (representing a logical 0).

Within the GPIO pins there are pins that serve a dual function:

If you do not need these pins for their specific functions, you can use them for regular digital input/output, but otherwise keep them free for their specific functions. The pin function, and whether it will function as an input or output pin is set programmatically in the microcontroller code.

  • Serial Communication (RX and TX): Two pins are generally reserved for serial communication with the computer the board is connected to for uploading code and exchanging data. If you use these pins to connect a component the component has to be disconnected if code needs to be uploaded.

  • PWM Pins: Pulse Width Modulation is a technique that generates a simulated analog signal using digital values. The ~ prefix on the pin label indicates that the pin supports PWM.

  • Interrupt Supported Pins: Sensors or other input components can send what is referred to as an interrupt to the board to let it know it has some data to share. This is more efficient that the board continuously checking with the sensor. The * suffix on the pin label indicates that the pin supports interrupts.

  • UART Pins: Two pins are made available for Universal Asynchronous Receiver-Transmitter (UART) Communication. These are similar to the RX and TX pins used for data exchange with the computer but can be used for UART (serial) comunication with components or other boards.

  • SPI Pins: Four pins (designated as COPI, CIPO, CS, and SCL) are made available for Serial Peripheral Interface (SPI) Communication.

  • I2C Pins: Two pins (designated as SDA and SCL) are made available for Inter-Integrated Circuit (I2C) Communication.

Analog Input Pins

Analog input pins can receive any value of input voltage between 0 and the operating voltage (5V or 3.3V), in contrast to digital input pins than can only receive two values, HIGH (3.3 or 5V) or LOW (0V). Boards have an Analog to Digital Converter (ADC) connected to these pins which convert the analog input into integer values between 0 and 1023. These pins cannot work as analog output pins but can be used as digital input/output pins similar to a GPIO pin.

Power Out Pins

One pin will be the positive power supply voltage (VCC) and another pin will be the ground (GND). Boards may have one VCC pin supplying either 5V or 3.3V, or two VCC pins, one supplying 5V and one 3.3V. These pins can be used to supply power to connected components.