Comparing Board and Language Speeds

Where I compare the execution speeds of different combinations of boards and languages. I will continue to update this post with other languages and processor combinations.

Table for the impatient#

ucontroller/Speed(MHz) Method* frequency Language
ATSAMD21/48Mhz Integral .6kHz CircuitPython
ATSAMD21/48Mhz Integral function .7kHz CircuitPython
ATSAMD21/48Mhz Library .7kHz CircuitPython
RP2040/133Mhz Integral function 1.0kHz CircuitPython
RP2040/133Mhz Library 1.44kHz CircuitPython
ATmega328/16MHz struct/function pointer 6.1kHz Arduino C++
ATmega328/16MHz words in an infinite loop 27KHz FlashForth
ATmega328/16MHz struct/function pointer 55kHz C
ATmega328/16MHz struct/function pointer 56kHz Arduino C++ w/ native toggle
ATmega328/16MHz Assembly language toggle 108kHz FlashForth
ATmega328/16MHz Assembly language toggle inlined 444kHz FlashForth
RP2040/133Mhz struct/function pointer 578.7kHz C
RP2040/133Mhz words in an infinite loop 2.841 MHz Mecrisp Forth
*See text for an explanation of method.

Introduction#

While writing about CircuitPython and the FIDI board, I was curious as to the execution speed of CircuitPython on a extremely powerful (relative to the AVR ATmega328) ARM M0+ microcontroller. The M0+ is a modern RISC 32-bit processor with a considerable amount of memory, while the ATmega is 20 year old RISC 8-bit processor with a limited amount of memory. That said, one can’t run CircuitPython on ATmega processors, one must use C or Forth.

Developing CircuitPython for the FIDI

Where I go into detail as to how I develop code in CircuitPython for the omzlo FIDI board.

Omzlo FIDI#

Technical details#

  • Small!: it measures 25.4mm x 22mm (1" x 0.86")
  • Microchip ATSAMD21E18A 32-bit Arm Cortex M0+ running at 48MHz, with 256KB flash, and 32KB RAM
  • 4MB flash for CircuitPython code and other files
  • Six GPIOs, featuring SPI, I2C, UART, Digital/Analog IO, PWM, …
  • 3.5mm terminal block connectors and one 4 pin QWIC/STEMMA QT connector
  • 3.3V logic level, maximum 200mA
  • USB micro connection to PC
  • User-controlled RGB LED

Pinout#

Pinout of omzlo FIDI

omzlo FIDI

Large Version to see detail

Circuitpython on the omzlo FIDI

Where I evaluate an interesting prototyping board using CircuitPython.

Sources#

Introduction#

I ran across this board, the omzlo FIDI via an Adafruit blog article. I was struck by its size and utility along with its relative powerful processor for its size. From the webpage:

  • Microchip ATSAMD21E18A 32-bit Arm Cortex M0+ running at 48MHz, with 256KB flash, and 32KB RAM
  • 4MB flash for CircuitPython code and other files
    Photo of omzlo FIDI

    omzlo FIDI

Large Version to see detail