fbpixel
Tags: ,

The Raspberry Pi Pico is a development board based on the RP2040 microcontroller. Its dual-core Arm Cortex M0+ microprocessor makes it an inexpensive and powerful board. It can be programmed in C++ and Python. The W version can also connect to WiFi.

Some card features

  • Energy-saving “sleep” mode
  • 2 × SPI, 2 × I2C, 2 × UART, 3 × analog inputs
  • 16 × controllable PWM channels (all GPIOs can send a pwm)
  • Integrated clock and timer
  • Internal temperature sensor
  • 8 × input state machines
raspberry-pi-pico Raspberry Pi Pico microcontroller overview

Microcontroller features

The Raspberry Pi Pico microcontroller uses the Dual ARM Cortex-M0+ microprocessor. This processor operates at a clock frequency of 133 MHz. It has 264 kB RAM memory and 2000 kB Flash memory (for programming and data logging).

  • CPU Dual ARM Cortex-M0+
  • Voltage : 5V
  • Flash : 2000 kB
  • RAM : 264 kB
  • Clock speed : 133MHz
  • WiFi : Yes(W)
  • Bluetooth : No
  • SD : No
raspberry-pi-pico-overview Raspberry Pi Pico microcontroller overview

Power supply

The Raspberry Pi Pico microcontroller operates over a voltage range of 1.8-5.5V, thanks to its on-board voltage regulator, while the microprocessor operates at 3.3V. In normal operation, the microcontroller consumes up to 90mA (if no power is supplied) and can accept a maximum current of 16mA on each of its IO pins.

Pinout

  • Analog I/O : 3 (26, 27, 28)
  • Digital I/O : 26 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 26, 27, 28)
  • PWM pins: 16 (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
  • Communication Serial: 2 ((0, 1), (4, 5))
  • I2C communication: 2 ((4, 5), (2, 3))
  • SPI communication: 2 ((5, 2, 4, 3), (9, 10, 12, 11))
raspberry-pi-pico-pinout Raspberry Pi Pico microcontroller overview

Basic C-code and pin identification

#include <Arduino.h>

const int analogPin=A0; // broches A0,A1,A2 ou 26,27,28 
//(29=A3 Temperature sensor) 
const int digitalInPin=2; // broches 0-22,26-28
const int digitalOutPin=4; 
const int pwmPin=3; //2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17

int analogVal=0;
int digitalState=LOW;
int pwmVal=250;

void setup() {
  Serial.begin(115200);
  
  pinMode(analogPin,INPUT_PULLUP); // Argument OUTPUT, INPUT, INPUT_PULLUP
  pinMode(digitalInPin,INPUT);
  pinMode(digitalOutPin,OUTPUT);
  pinMode(pwmPin,OUTPUT);
}

void loop() {
 analogVal=analogRead(analogPin); // return int
 Serial.print("Analog read : ");Serial.println(analogVal);
 digitalState=digitalRead(digitalInPin); // return boolean
 Serial.print("Digital read : ");Serial.println(digitalState);
 
 digitalWrite(digitalOutPin,HIGH); // valeur LOW(0) ou HIGH(1)
 analogWrite(pwmPin,pwmVal);// valeur 0-255 en fonction de analogWriteResolution();
}

Summary of features

Microcontrôleur
Nom: RaspberryPiPico
Marque: RaspberryPi
Caractéristiques
CPU: Dual ARM Cortex-M0+
Tension d’alimentation : 1.8-5.5V
Tension logique: 5V
E/S digitales: -1
Entrées analogiques: 0
Flash: 2000kB
SRAM: 264kB
EEPROM: NCkB
Fréquence d’horloge: 133 MHz
Wifi: Yes(W)
Bluetooth: No
SD card: No
Touch: No
UART/SPI/I2C/I2S: Yes/Yes/Yes/No

Where to start

Sources