Actions

KAmod RP2040: Difference between revisions

From Kamamilabs.com - Wiki

Created page with "__jzpdf__ ==== Description ==== <b>KAmod RP2040 - Miniature Module with Raspberry RP2040 Microcontroller and 16MB Flash</b><br> A miniature board with the RP2040 microcontroller used in the Raspberry Pi Pico, equipped with two ARM Cortex-M0+ cores clocked at up to 133 MHz and 264 KB of onboard SRAM. The microcontroller is connected to a QSPI flash memory chip with a capacity of 16 MB, the maximum supported by the RP2040. The USB-C connector allows for powering the modu..."
 
(No difference)

Latest revision as of 11:22, 17 October 2025

Description

KAmod RP2040 - Miniature Module with Raspberry RP2040 Microcontroller and 16MB Flash

A miniature board with the RP2040 microcontroller used in the Raspberry Pi Pico, equipped with two ARM Cortex-M0+ cores clocked at up to 133 MHz and 264 KB of onboard SRAM. The microcontroller is connected to a QSPI flash memory chip with a capacity of 16 MB, the maximum supported by the RP2040. The USB-C connector allows for powering the module and programming the microcontroller in the Arduino environment and beyond.


Basic Specifications

  • RP2040 microcontroller designed by Raspberry Pi
  • Two ARM Cortex-M0+ cores clocked up to 133 MHz
  • RAM: 264 kB
  • USB 1.1 Host/Device
  • RTC
  • 3.3 V 250 mA voltage regulator
  • 16 MB external flash memory
  • Built-in USB Type-C connector for powering and programming
  • Reset and Boot buttons
  • Drag&Drop programming in USB mass storage mode
  • WS2812 LED
  • 15 GPIO pins
  • Extensive communication interfaces: 2 x SPI, 2 x I2C, 2 x UART
  • 4 x 12-bit ADC
  • PWM outputs, max 13 channels
  • I2C Qwire connector, JST SH 4-pin 1 mm (compatible with Qwiic / STEMMA QT)
  • Dimensions: 18 x 22 mm



Standard Equipment

Code Description
KAmod RP2040

Assembled and powered-up module
2 x straight 8-pin goldpin header, 2.54 mm pitch


Schematic



Pinout description



Built-in RGB LED

The KAmod RP2040 module includes a WS2812 RGB LED, which is connected to the microcontroller's GPIO16 pin (GPIO16 is not available on the module's connectors).



I2C Qwire Connector

The KAmod RP2040 module features an I2C Qwire connector (JST SH 1 mm) compliant with the Qwiic / STEMMA QT standard. It allows for quick connection and expansion of I2C-equipped modules without the need for soldering. Qwire is controlled via the I2C1 interface, available on the GPIO23 (SDA) and GPIO22 (SCL) lines.




BOOT and RST Buttons

The KAmod RP2040 module is equipped with two buttons that simplify programming the RP2040 microcontroller. Thanks to the RST button, the user does not need to disconnect and reconnect the USB cable to reset the microcontroller. The BOOT button performs the same function as on the Raspberry Pi Pico – it launches the bootloader, which allows programming.



Dimensions

The dimensions of the KAmod RP2040 board are 18 x 22 mm.


Test Program

The test program was written in the Arduino environment.

//Need: BOARDS MANAGER -> Arduino Mbed OS RP2040 Boards
//Board: "Raspberry Pi Pico"
//Need: NeoPixelConnect.h

#include <NeoPixelConnect.h>
#include <Wire.h>
#include <SparkFun_Qwiic_Button.h>

//WS2812
#define WS2812_PIN      16
#define NUM_OF_LEDS     1

NeoPixelConnect  WSpixel(WS2812_PIN, NUM_OF_LEDS);

//I2C
#define I2C_SDA         22
#define I2C_SCL         23
#define I2C_FREQ        100000
#define BUTTON_ADDR     0x6F

QwiicButton button;
MbedI2C iic1(I2C_SDA, I2C_SCL);


int i;
int dir;
int ws_r;
int ws_g;
int ws_b;

void setup() {
  Serial.begin(115200);
  delay(2000);

  Serial.println("KAmodRP2040 Test");
  
  iic1.begin();
  button.begin(BUTTON_ADDR, iic1);
  
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);

  pinMode(25, OUTPUT);
  pinMode(26, OUTPUT);
  pinMode(27, OUTPUT);
  pinMode(28, OUTPUT);
  pinMode(29, OUTPUT);

  i = 0;
  dir = 0;
  ws_r = 0;
  ws_g = 0;
  ws_b = 0;
  WSpixel.neoPixelClear();
}

void loop() {
  WSpixel.neoPixelSetValue(0, (ws_r & 0xFF), (ws_g & 0xFF), (ws_b & 0xFF), true);
  digitalWrite(i, HIGH);

  if (button.isPressed() == true)
    delay(25);
  else
    delay(100);

  digitalWrite(i, LOW);

  if (dir == 0){
    i++;
    if (i==8) {
      i = 25;
      ws_r = 255;
      ws_g = 0;
      ws_b = 0;
    }
    if (i==30) {
      i = 28;
      dir = 1;
      Serial.print(" Tik...");
      ws_r = 0;
      ws_g = 255;
      ws_b = 0;
    }
  } else {
    if (i > 0){
      i--;
      if (i==24) {
        i = 7;
        ws_r = 0;
        ws_g = 0;
        ws_b = 255;
      }
    } else {
      i = 1;
      dir =  0;
      Serial.print(" Tak...");
      ws_r = 0;
      ws_g = 0;
      ws_b = 0;
    }
  }
}




Links