Product description
QT Py 2040 is a compact development board from Adafruit based on the Raspberry Pi RP2040 microcontroller. Measuring only 20 × 17.5 mm, it features castellated edges for surface mounting and delivers solid performance with a dual-core 32-bit ARM Cortex-M0+ running at 120 MHz, 8 MB SPI Flash, and 264 kB RAM.
The board supports HID, MIDI, USB serial, and can even act as a USB mass storage device thanks to native USB support.
QT Py 2040 includes a STEMMA QT connector, compatible with SparkFun’s Qwiic system, enabling quick plug-and-play prototyping with sensors, displays, and other I2C devices—no soldering required.
Features:
- USB-C connector
- Dimensions: 20 × 17.5 mm
- 13 GPIO pins (11 via 2.54 mm holes, 2 via STEMMA QT)
- 4 × 12-bit ADC
- 2 × I2C (1 available via QT connector)
- SPI and UART
- PWM on all I/O pins
- 3.3 V regulator, max 600 mA (short duration)
- 12 MHz crystal for precise timing
- Reset and bootloader buttons for easy flashing
- Unassembled pin headers included for breadboard use
About PIO:
The RP2040 includes two programmable I/O (PIO) blocks, each with four state machines, capable of handling timing-sensitive tasks without CPU intervention. PIO can independently monitor pins and prepare data for when the processor needs it.
At clock speeds up to 133 MHz, communication with slower peripherals can be inefficient. PIO offloads protocol handling, allowing the CPU to focus on computation while PIO manages I/O. This is ideal for obscure or custom protocols—for example, unusual displays—where PIO can "bit-bang" signals without interpreting the actual protocol.
- Access to all GPIO pins
- Operates from 2 kHz to 133 MHz
- Reads/writes pins, manages FIFO, increments counters
- Can generate clock signals, control servos, dim LEDs, and more
PIO is programmed using the assembler-like language pioasm, consisting of only nine instructions. It's an excellent starting point for low-level programming in a well-documented and limited environment.