Embedded programming. Group 1.
Group members
Week 4 group assignment Embedded programming
Introduction to the platforms
Picture1:Different platforms RP2040, ESP32C3, SAMD21
Seeed XIAO RP2040
From wiki.seeedstudio.com:
The Seeed Studio XIAO RP2040 is as small as the Seeed Studio XIAO SAMD21 but it's more powerful. On one hand, it carries the powerful Dual-core RP2040 processor that can flexible clock running up to 133 MHz which is a low-power microcontrollers. On the Seeed Studio XIAO RP2040 there is also 264KB of SRAM, and 2MB of on-board Flash memory which can provide more program to save and run.
There are 14 GPIO PINs on Seeed Studio XIAO RP2040, on which there are 11 digital pins, 4 analog pins, 11 PWM Pins,1 I2C interface, 1 UART interface, 1 SPI interface, 1 SWD Bonding pad interface.
Seeed XIAO ESP32C3
From wiki.seeedstudio.com:
It is IoT mini development board based on the Espressif ESP32-C3 WiFi/Bluetooth dual-mode chip. ESP32-C3 is a 32-bit RISC-V CPU, which includes an FPU (Floating Point Unit) for 32-bit single-precision arithmetic with powerful computing power. It has excellent radio frequency performance, supporting IEEE 802.11 b/g/n WiFi, and Bluetooth 5 (LE) protocols. This board comes included with an external antenna to increase the signal strength for your wireless applications. It is equipped with rich interfaces and has 11 digital I/O that can be used as PWM pins and 4 analog I/O that can be used as ADC pins. It supports four serial interfaces such as UART, I2C, SPI and I2S. There is also a small reset button and a bootloader mode button on the board.
Seeed XIAO SAMD21
From wiki.seeedstudio.com:
It carries the powerful ATSAMD21G18A-MU which is a low-power microcontrollers. It has 14 PINs, which can be used for 11 digital interfaces, 11 mock interfaces, 10 PWM interfaces (d1-d10), 1 DAC output pin D0, 1 SWD pad interface, 1 I2C interface, 1 SPI interface, 1 UART interface, Serial communication indicator (T/R), Blink light (L) through pin multiplexing. The colors of LEDs(Power,L,RX,TX) are green, yellow, blue and blue. There are two reset button, you can short connect them to reset the board.
These differend boards share same foot print of 20x17.5mm. They are also all programmable from arduino IDE after adding their data to the board manager URLs.
Test circuit
For the testing we tried to use simple usb powermeter but we didn't get any reading for current usage for the boards. For the circuit we looked source code for pin numbers and connected assosiated pins from the board together and oscilloscope was connected as paraller to output pin. The oscilloscope we used was Keysight InfiniiVision DSOX3102A. Luckily there was choice to save oscilloscope image directly to usb key, so we didn't have to take pictures of the small screen.
RP2040 and ESP32C3 board were measured this way:
Picture2:First test circuit for the day
For SAMD21 different pins were used so we decided to alter the circuit instead of the source code pin assigments.
Picture3:Second test circuit for the day
Performance comparisation
For this task we were able to use premade ring oscillator code samples. Functionality for the provited code was writing value to one pin and read from another. The pins are connected and value inverted in a loop. Below table contains our measurement.
frequency (MHz) | processor | description | date |
---|---|---|---|
3,808 | ESP32C3 | 16.02.2023 | |
9,47 | RP2040 | 16.02.2023 | |
1,54 | SAMD21 | 16.02.2023 |
Table 2 below contains values from provited code pieces by Neil Gershenfeld.
frequency (MHz) | processor | description | date |
---|---|---|---|
3,79 | ESP32C3 | direct I/O 3.79 MHz at 160 MHz | 26.12.2022 |
9,17 | RP2040 | 9.17 MHz at 133 MHz clock | 26.12.2022 |
2,582 | SAMD11 | SAMD11C IOBUS: 2.528 MHz | 13.11.2020 |
Picture4:Measurement with Seeed XIAO ESP32C3
Picture5:Measurement with Seeed XIAO RP2040
Picture6:Measurement with Seeed XIAO SAMD21