Raspberry Pi Pico : The microcontroller from Pi

 Posted by Ashutosh Kumar

on Jan. 21, 2022

Tags: microcontroller RaspberryPi Pico



Raspberry Pi Pico is a microcontroller board built on silicon designed by Raspberry Pi. Microcontrollers are computers stripped back to their bare essentials. It does not require monitors or keyboards, but program them to take their input from and send their output to the input/output pins.

The ultra-light, ultra-small Raspberry Pi Pico microcontroller board is ideal for embedding inside digital projects. Raspberry Pi Pico represents two major firsts for Raspberry Pi: it’s the first microcontroller development board from Raspberry Pi; it’s also the first device to use a silicon chip designed by Raspberry Pi’s in‑house Application-Specific Integrated Circuit (ASIC) team.

Raspberry Pi Pico is a development board built around this powerful yet low-cost RP2040 microcontroller.It offers a wealth of connectivity for external hardware – and enough processing power to handle complex tasks.

Raspberry Pi Pico specifications

 

  • 21 mm × 51 mm form factor
  • RP2040 microcontroller chip designed by Raspberry Pi in the UK
  • Dual-core Arm Cortex-M0+ processor, flexible clock running up to 133 MHz
  • 264KB on-chip SRAM
  • 2MB on-board QSPI Flash
  • 26 multifunction GPIO pins, including 3 analogue inputs
  • 2 × UART, 2 × SPI controllers, 2 × I2C controllers, 16 × PWM channels
  • 1 × USB 1.1 controller and PHY, with host and device support
  • 8 × Programmable I/O (PIO) state machines for custom peripheral support
  • Supported input power 1.8–5.5V DC
  • Operating temperature -20°C to +85°C
  • Castellated module allows soldering direct to carrier boards
  • Drag-and-drop programming using mass storage over USB
  • Low-power sleep and dormant modes
  • Accurate on-chip clock
  • Temperature sensor
  • Accelerated integer and floating-point libraries on-chip

 

 

RP2040: The all-new microcontroller

RP2040 is a low-cost microcontroller device, with the same focus on quality, cost, and simplicity that characterises the ‘big’ Raspberry Pi. Microcontrollers interact with the hardware of a board much like an application processor does in a larger device.

 

RP2040 is supported by both C/C++ and MicroPython cross-platform development environments, including easy access to runtime debugging. It has a built-in UF2 bootloader enabling programs to be loaded by drag-and-drop. The built-in USB can act as both device and host. Meanwhile, floating-point routines are baked into the chip for ultra-fast performance. It has two symmetric processor cores and high internal bandwidth, making it useful for signal processing and video applications. The chip has a relatively large amount of internal RAM but uses external flash storage, allowing one to choose how much memory you need.

Besides, the theory behind name RP2040 is:

 

Arduino vs Raspberry Pi Pico

Arduino is an open-source electronic prototyping platform enabling users to create interactive electronic objects. The first Arduino board was introduced in 2005 and, since then, millions have been sold and a huge ecosystem has arisen. Before the Raspberry Pi Pico arrived, there was a sharp distinction between the Raspberry Pi and Arduino ecosystems. The Pi is a Linux computer that boots up into a full operating system and the Arduino is  a microcontroller that just runs one program at a time. With the arrival of the Raspberry Pi Pico, which is itself a microcontroller, and the new RP2040 SoC, the distinction has blurred.

Let's compare these two microcontrollers on various parameters :

SoC of Raspberry Pi Pico vs Arduino

The older and more popular Arduino boards are powered by Atmel chips such as the ATMega328P but the later boards now feature Arm CPUs.

Arm chips are becoming more common with microcontrollers, Adafruit, Seeed and SparkFun have all developed boards with Arm chips. Microcontrollers do not necessarily need multiple cores and fast speeds as they are typically used for a single part of a process.

The RP2040 used in the Raspberry Pi Pico is a level above a typical microcontroller. First of all, we have a dual core Arm Cortex M0+ running at up to 133 MHz, much faster than an UNO’s 16 MHz 328P. SRAM on the RP2040 is 264KB, again much more than the Uno’s 2KB. With only 32KB of flash storage the Uno again falls short of the 2MB found on the Pico.

 

Functionality and GPIO of Raspberry Pi Pico vs Arduino

The Raspberry Pi Pico introduces a new form factor to the Raspberry Pi ecosystem, a 40 pin ‘DIP’ style PCB.

The Raspberry Pi Pico GPIO offers plenty of digital IO, three analog inputs and multiple I2C, SPI and UART connections. But what the Pico also offers are a series of programmable IO (PIO) pins which can be configured to simulate other interfaces / protocols such as WS2812 “NeoPixels”, they can also be used to offload complex tasks to a background process.

 

Coding Raspberry Pi Pico vs Arduino 

The Arduino IDE is the go to editor for Arduino projects. It has improved over the years and now we see built in features such as multiple board management and a means to search and install libraries of packages for add-ons and accessories.

In Raspberry Pi Pico, it has  two officially supported languages, C and MicroPython. If Python is your preferred language, then you are in luck as the Raspberry Pi Pico supports MicroPython, a version of Python 3 for microcontrollers.

 

Conclusion: Raspberry Pi Pico or Arduino?

With an impressive selection of GPIO pins, ease of use and great documentation, the Raspberry Pi Pico is the best board for microcontroller projects. MicroPython is the best bet to quickly get up and running with your Pico. For such a small amount of money, you get official hardware and know that it will work as expected, unlike other clone boards.

 

Final thoughts on Pico

 

At a price of INR350 (approx) per unit and with all the support and documentation provided by the Raspberry Pi Foundation, Pico seems to be very promising. Due to the accessibility of datasheets, development tools, examples, and beginner-friendly manuals, working with a Pico is quite enjoyable. It is not restricted to experienced developers; it can be used to teach kids and students.

 

Here is link to documentation of Raspberry Pico:

Getting Started with RP2040 – Raspberry Pi