Raspberry Pi 4 GPIO Pinout has 40 pins: 26 GPIO pins, two 5V pins, two 3V3 pins, and 7 ground pins (0V). GPIO pins of RPI 4 are capable of generating PWM output and the board supports SPI, I2C, and UART serial communication protocols.The Raspberry Pi 4 Model B is the latest board launched by the Raspberry Pi Foundation in June 2019. This model has the latest high-performance quad-Core 64-bit Broadcom 2711Cortex A72 processor clocked at 1.5GHz speed.

Raspberry Pi 4 Specs

  • Broadcom BCM2711 chip consist of Quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
  • 2GB, 4GB, and 8GB of LPDDR4 SDRAM (depending on the version of the board)
  • Dual-channel 2.4/5.0 GHz IEEE 802.11ac wireless, Bluetooth 5.0, BLE
  • Gigabit Ethernet
  • Two USB 3.0 ports and two USB 2.0 ports.
  • Raspberry Pi standard 40 pin GPIO header
  • Two micro-HDMI ports (support up to 4kp60 resolution)
  • 2-lane MIPI DSI display port
  • 2-lane MIPI CSI camera port
  • 4-pole stereo audio and composite video port
  • 265 (4k@60 decode), H264 (1080@60 decode and 1080@30 encode)
  • OpenGL ES 3.0 graphics
  • Micro-SD card slot for loading operating system and data storage
  • 1V/3A DC via USB-C connector
  • Power over Ethernet (PoE) enabled (requires PoE HAT board)
  • Operating temperature: 0 – 50oC

R-Pi 4 Global Input/Outputs pins:

A pin that can be set as an input or output and is controlled in run time is called a GPIO pin.

A GPIO pin set as input allows the signal transmitted by any external device (connected to this pin) to be received by the Raspberry Pi.

Input voltage between 1.8V and 3.3V is read as HIGH by the Raspberry pi. And when the input voltage is lower than 1.8V, it is read as LOW.

SPI (Serial Peripheral Interface) is a type of serial communication protocol. It is used by the Raspberry Pi for master-slave communication to quickly communicate between one or more peripheral devices.

5 pins are required for SPI communication

  • GND: Connect the GND pin from all the slave components and the Raspberry Pi 4 board together.
  • SCLK: Clock for SPI communication.
  • MOSI: It stands for Master Out Slave In. This pin is used to send data from the master to a slave.
  • MISO: It stands for Master In Slave Out. This pin is used to receive data from a slave to the master.
  • CE: It stands for Chip Enable. We need to connect one CE pin per slave (or peripheral devices) in our circuit. By default, we have two CE pins but we can configure more CE pins from the other available GPIO pins.

Ways to program the Raspberry PI 4 Board:

You can control the Raspberry Pi 4 GPIO pins using many programming languages. Some of the popular languages along with learning material is given below: