[Diao Ye learns programming] Arduino hands-on (196) --- Raspberry Pi Pico development board

The reference to 37 sensors and modules has been widely circulated on the Internet. In fact, there must be more than 37 sensor modules compatible with Arduino. In view of the fact that I have accumulated some sensor and actuator modules on hand, in accordance with the concept of true knowledge (must be hands-on), for the purpose of learning and communication, here I am going to try and do more experiments one by one. Whether it is successful or not, it will be recorded ——Small progress or unsolvable problems, I hope to be able to throw bricks and spark jade.

[Arduino] 168 kinds of sensor module series experiments (data code + simulation programming + graphics programming)
Experiment 196: Raspberry Pi Pico development board raspberry pi PICO dual-core RP2040 single-chip C++/Python programming entry-level controller

insert image description here
insert image description here

On January 21, 2021, the Raspberry Pi Foundation (Raspberry Pi Foundation) official website blog released the latest microcontroller development board: RaspBerry Pi Pico, which uses the first self-developed chip RP2040.

The RP2040 chip is manufactured by TSMC using a 40nm process. It adopts the Arm Cortex M0+ processor architecture with a running frequency of 133 MHz. It has 264K SRAM and 2MB onboard storage space, which largely solves the problems of analog input, low latency, and low power consumption. .

The Raspberry Pi Pico is based on the RP2040. According to the original design principles, PR2040 achieved three goals: first, high performance, especially for integer workloads; second, more flexible I/O, allowing communication with any external device; third, low cost.

insert image description here
Regarding the meaning of the RP2040 model number, RP stands for "Raspberry Pi", "2" is the number of cores, and "0" refers to the MCU core used (eg Cortex-M0+).

The last two digits are "4" and "0" Use the floor(log2(x/16k)) formula to calculate a number that represents the SRAM and non-volatile storage capacity inside the chip.

The RP2040 chip is packaged in 7×7mm QFN-56, and the specific functional block diagram is as follows:

insert image description here
Performance indicators of RP2040:

Dual-core Arm Cortex-M0+ @ 133MHz
264KB on-chip RAM, internal 6 independent RAM blocks, exchanged at the center of the bus, allowing the core and DMA to run in parallel without conflict Through the dedicated QSPI
bus, it can support up to 16MB off-chip Flash memory
DMA controller
Interpolator and integer divider peripherals
30 GPIO pins, 4 of which can be used for analog input
2 × UARTs, 2 × SPI controller, and 2 × I2C controller
16 × PWM channels
1 × USB 1.1 controller and PHY , support Host and Device
8 × Raspberry Pi programmable I/O state machine
USB storage boot mode and support UF2, can be programmed by dragging and dropping
7*7 56-pin QFN package

insert image description here
The RP2040 chip is designed and developed by the Raspberry Pi itself, using a 40 nm process technology and a 7×7 mm QFN-56 package. The design philosophy of the RP2040 is based on the strengths and weaknesses of Raspberry Pi products and other vendors' equipment used in projects over the years. It mainly has the following three key advantages:

1. Two fast CPU cores. The RP2040 features a pair of ARM Cortex-M0+ cores clocked at 133 MHz, providing ample integer performance. Users can use one core to run application code while the other core supervises the hardware; they can also use FreeRTOS or MicroPython to run application code on both cores.
2. Lots of RAM. The RP2040 has 264KB of RAM, which allows users to focus on implementing functionality without spending time and effort optimizing the size of the application. Among them, a fully connected switch connects the ARM core and DMA engine to six independent RAM banks, allowing users to take full advantage of the system's performance.
3. Flexible I/O. The RP2040 provides all common interfaces: hardware UART, SPI and I2C controllers, USB 1.1 and four-channel ADC. What sets the RP2040 apart is the programmable I/O (PIO) subsystem, which supports software-implemented protocols including SDIO, DPI, I2S, and even DVI-D.

All of this is packaged in a 2mm² 40nm chip.

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

Electrical schematic diagram of raspberry pie pico development board

insert image description here

Raspberry Pi pico pin diagram

insert image description here
insert image description here

List of Collected Raspberry Pi Pico Resources
The Raspberry Pi Pico is a low-cost, high-performance microcontroller board with a flexible digital interface.

Documentation
Getting Started - Official Pico getting started guide. https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf
Pico SDK C/C++ - Pico SDK C/C++ ± official Pico C/C++ SDK documentation. https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf
Pico SDK MicroPython - Pico SDK MicroPython - Official MicroPython SDK documentation. https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-python-sdk.pdf
Pico Doxygen - Pico Doxygen - The official "API level Doxygen documentation for Raspberry Pi Pico". https://www.raspberrypi.com/documentation/pico-sdk/
Pinout Diagram - Official pinout diagram of Raspberry Pi pico. https://datasheets.raspberrypi.com/pico/Pico-R3-A4-Pinout.pdf
Fritzing Diagram - Fritzing Diagram - Official Pico Fritzing Diagram.
Design Files - Design Files - Official Pico hardware design files.
Pico Datasheet - Pico Datasheet - Official Pico Datasheet. https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf
RP2040 Datasheet - RP2040 chip data - official RP2040 chip data sheet.
Hardware Design - Hardware Design - Official Hardware Design Reference Manual for RP2040.

Software & Tools
Pico Examples - Raspberry Pi Pico SDK examples. https://github.com/raspberrypi/pico-examples
Pico MicroPython Examples - Raspberry Pi Pico MicroPython examples. https://github.com/raspberrypi/pico-micropython-examples
Pico SDK Repo - Official Raspberry Pi Pico SDK repository. https://github.com/raspberrypi/pico-sdk
Pico C++ Setup Script - A BASH script to setup the Pico C++ toolchain on your device.
Picotool - Picotool is a tool for inspecting RP2040 binaries and interacting with RP2040 devices when in BOOTSEL mode.
Picoprobe - Use one Raspberry Pi Pico to debug another Pico. This is possible with picoprobe, an application that allows the Pico to act as a USB→SWD and UART converter.
Resetting Pico Flash Memory - Force clear the Raspberry pi pico flash memory space to empty.
Thonny IDE - Thonny IDE support for Pico. https://github.com/raspberrypi/thonny-pico
Pico-Stub - Python code insertion and autocompletion for Raspberry Pi pico from Visual Studio Code. https://github.com/cpwood/Pico-Stub
Pimoroni Pico - Pimoroni Pico library and examples with micropython and C/C++ support. https://github.com/pimoroni/pimoroni-pico

Resource Blog
Official Pico Announcement - First Raspberry Pi Pico Announcement.
MicroPython Book - New book to help you get started with MicroPython on the Raspberry Pi Pico.
NeoPixel Dithering - HackSpace Magazine's look at NeoPixels with a Raspberry Pi Pico.
Closer Look at RP2040 - Learn about the Raspberry Pi RP2040 Programmable I/O (PIO) in detail.

Books
MicroPython Pico - Start learning about raspberrypi pico development boards using micropython.

Community Project
Pico Tetris - Tetris on Raspberry Pi Pico installed on Pimoroni Pico Explorer.
Pico Display Color Change - Pico application using Pimoroni's display package.
Pico Lib for NeoPixels - A Raspberry Pi Pico library for using NeoPixels (WS2812b LED).
TensorFlow Lite Micro - TensorFlow Lite Micro library for Pico.
Rust Support Crate - Provides support for the Raspberry Pi's PIO architecture.
morse4pico - Very simple Morse code script in MicroPython for Raspberry Pi Pico.
picoLCD - picoLCD is a collection of features that make interfacing HD44780-based LCD screens on Raspberry Pi Pico easier.
Balloon Tracking Raspberry Pi Pico weather balloon tracking device. Code is at https://github.com/daveake/pico-tracker
Pico Snake - Raspberry Pi Pico Snake running in Pimoroni Pico Explorer.
Annoying Book Mark - A bookmark that counts the time elapsed since you last opened the book.

Tutorial
Control an LED - Raspberry Pi official setting document, using the micro python language to control the led light. https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico

Graphics programming
playpiper- a learning platform for beginners. https://make.playpiper.com/

The data link that comes with the board
Model: Raspberry Pi RP2 https://www.raspberrypi.org/documentation/rp2040/getting-started/

Guess you like

Origin blog.csdn.net/weixin_41659040/article/details/132148065