This shows you the differences between two versions of the page.
eap:laboratoare:01 [2024/07/15 19:16] jan.vaduva |
eap:laboratoare:01 [2024/07/17 11:51] (current) jan.vaduva |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Intro to Raspberry Pico ===== | + | ===== Intro to RP2040 ===== |
==== Microcontroller ==== | ==== Microcontroller ==== | ||
Line 120: | Line 120: | ||
The R02040 has three peripherals that control the GPIO pins: | The R02040 has three peripherals that control the GPIO pins: | ||
- | - Pads - control the actual physical pin or pad that the processor has outside. This control the electrical parameters, like maximum current or pull up and pull down resistors | + | - **Pads** - control the actual physical pin or pad that the processor has outside. This control the electrical parameters, like maximum current or pull up and pull down resistors |
- | - IO Bank0 - connects and multiplexes the peripheral's pins to the output pads. Several peripherals use the same output pad to communicate with the exterior. For example, in the image below, GPIO0 can be used either for: | + | - **IO Bank0** - connects and multiplexes the peripheral's pins to the output pads. Several peripherals use the same output pad to communicate with the exterior. For example, in the image below, **GPIO0** can be used either for: |
- | - SIO - the GPIO function | + | * **SIO** - the **GPIO** function |
- | - SPI_RX - the receive pin for the SPI peripheral | + | * **SPI_RX** - the receive pin for the **SPI** peripheral |
- | - I2C0_SDA - the data pin for the I2C0 peripheral | + | * **I2C0_SDA** - the data pin for the **I2C0** peripheral |
- | - UART0_TX - the transmit pin for the UART0 (serial port 0) peripheral | + | * **UART0_TX** - the transmit pin for the **UART0** (serial port 0) peripheral |
- | - SIO - that controls the interior MCU's pins. This is the peripheral that developers use to read and write the value of the pins. | + | - **SIO** - that controls the interior MCU's pins. This is the peripheral that developers use to read and write the value of the pins. |
+ | {{ :eap:laboratoare:marble-pico-pinout.png?nolink&600 |Marble Pico board}} | ||
+ | [[https://github.com/GroundStudio/GroundStudio_Marble_Pico/blob/main/Documentation/REV0.0.3/RLJDMV_GS%20REV0.0.3%20GroundStudio%20Marble%20Pico%20Pinout%20REV%201.1.pdf | Marble Pico pinout]] | ||
==== Wowki simulator ==== | ==== Wowki simulator ==== | ||
Wokwi is a web-based platform that allows you to simulate and prototype electronic circuits with microcontrollers. It provides a visual interface where you can drag and drop components, connect them with virtual wires, and write code to control their behavior. Wokwi currently supports popular microcontroller boards like: | Wokwi is a web-based platform that allows you to simulate and prototype electronic circuits with microcontrollers. It provides a visual interface where you can drag and drop components, connect them with virtual wires, and write code to control their behavior. Wokwi currently supports popular microcontroller boards like: | ||
Line 138: | Line 139: | ||
==== Exercises ==== | ==== Exercises ==== | ||
- Create a program in Wowki to blink an LED connected to a Raspberry Pi Pico (RP2040) microcontroller. | - Create a program in Wowki to blink an LED connected to a Raspberry Pi Pico (RP2040) microcontroller. | ||
+ | * [[https://wokwi.com/projects/403560205017402369|You can start from this template project]] | ||
- Design and implement a program for a Raspberry Pi Pico (RP2040) microcontroller that increments a counter from 0 to 9 and displays the current count on an 7-segment display. The program should also include a reset button that, when pressed, resets the counter back to 0. | - Design and implement a program for a Raspberry Pi Pico (RP2040) microcontroller that increments a counter from 0 to 9 and displays the current count on an 7-segment display. The program should also include a reset button that, when pressed, resets the counter back to 0. | ||
- | - Write a program for a Raspberry Pi Pico to communicate with another device via UART. The program will set up the UART with desired settings, send a predefined message, receive incoming data, and process it (like printing or storing). | + | * [[https://wokwi.com/projects/403561096139405313|Use this as starting project]] |
==== References ==== | ==== References ==== | ||
Line 146: | Line 148: | ||
- [[https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf|Raspberry Pi Pico datasheet]] | - [[https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf|Raspberry Pi Pico datasheet]] | ||
- [[https://www.raspberrypi.com/documentation/microcontrollers/c_sdk.html|Pico-SDK]] | - [[https://www.raspberrypi.com/documentation/microcontrollers/c_sdk.html|Pico-SDK]] | ||
+ | - [[https://www.raspberrypi.com/documentation/pico-sdk/hardware.html#ga71d35b29e897b9bb4fc881b587b08cab|Pico-SDK Documentation]] |