Endpreise in CHF – Versand inklusive Schweizer Unternehmen · 076 792 63 50 (WhatsApp/SMS)
Kurse › Raspberry Pi › Stufe 26
Raspberry Pi · Intermediate · Stufe 26 / 40

Pico C SDK and Programmable I/O

Write fast, deterministic firmware in C and build custom hardware interfaces with PIO.

Intermediate freischalten · CHF 19.90 Stufen 14–26, einmalig, kein Abo

10 Lektionen in dieser Stufe

  1. Setting Up the Pico C SDK Toolchain and CMake
    Install the compiler and SDK and build a project from the command line. · Lab: Build and flash the blink example from your Pi using CMake.
  2. C for Python Programmers: Types, Pointers and Headers
    Read and write the C constructs the SDK relies on. · Lab: Port a small MicroPython script to C with stdio output over USB.
  3. Interrupts, Alarms and Repeating Timers in C
    Schedule precise periodic work and keep interrupt handlers short. · Lab: Generate a 1 kHz tick and measure its jitter with a logic analyzer.
  4. PIO State Machines Explained Instruction by Instruction
    Describe the nine PIO instructions, shift registers and clock dividers. · Lab: Hand-trace a square-wave PIO program and predict its frequency before running it.
  5. Writing a PIO Program for WS2812 LEDs
    Generate tight timing waveforms that software loops cannot. · Lab: Drive an LED ring from PIO and verify bit timing on a logic analyzer.
  6. Counting Quadrature Encoders in PIO
    Capture fast inputs without losing counts. · Lab: Count a motor encoder at full speed and compare with a GPIO-interrupt counter.
  7. Moving Data with DMA
    Stream samples between peripherals and memory with no CPU involvement. · Lab: Capture a burst of ADC samples through DMA and print the buffer.
  8. Using Both Cores Safely
    Split work across two cores and share data without races. · Lab: Run the control loop on one core and communication on the other using a queue.
  9. Debugging over SWD with a Debug Probe and GDB
    Halt, step and inspect firmware on the chip. · Lab: Set a breakpoint in the control loop, inspect variables and catch a hard fault.
  10. Designing a Register-Style I2C Peripheral
    Make the Pico behave like a well-documented I2C chip. · Lab: Implement setpoint, speed and status registers and read them from the Pi with smbus2.

Abschlussprojekt

A motor-control co-processor: a Pico that counts a quadrature encoder in PIO, runs a 1 kHz speed loop in C and exposes setpoint and status registers to the Pi over I2C.

Teile für diese Stufe

  • 2 × Raspberry Pi Pico or Pico 2 with headers
  • 1 × Debug probe for SWD
  • 2 × Micro-USB cable
  • 1 × Breadboard and jumper wire set
  • 1 × Addressable RGB LED ring or strip (WS2812B)
  • 1 × DC gear motor with quadrature encoder
  • 1 × Dual H-bridge motor driver
  • 1 × USB logic analyzer 8-channel
  • 1 × Raspberry Pi 5 or Pi 4 set from Level 1 as build host

In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Raspberry Pi →

Voraussetzung: Level 25: Pico basics. Helpful: any earlier exposure to C syntax; the level introduces what it needs.

🔒 Sichere Zahlung · 3D Secure 🔐 SSL-verschlüsselt 🚚 Versand in die ganze Schweiz 🇨🇭 Schweizer Unternehmen