...

Embedded Programming

Week 6

Group assignment:

  • Browse through the data sheet for your microcontroller
  • Compare the performance and development workflows for other architectures

Group 1

  • Hans Moncca
  • Maryori Vasquez
  • Silvana Espinoza

  • Group 2

  • Maria Angela Mejia
  • Renson Samaniego
  • Wilber Giron

  • Group 3

  • Ronal Vilca
  • Franco Yactayo
  • Group 4

  • Silvana Espinoza
  • Jesus Lucero
  • Group 5

  • Grace Schwan
  • Cristian Loayza

  • Group 1:

    - Hans Moncca

    - Maryori Vasquez

    SAMD11C MICROCONTROLLER

    It is part of the SAM D11 family, it offers a balance between performance and energy efficiency. With its 32-bit ARM Cortex-M0+ architecture and speeds up to 48 MHz, it is ideal for a variety of embedded applications. Its numerous connectivity peripherals and GPIO ports make it perfect for embedded systems, wearable devices, and IoT projects that require low power consumption.

    FEATURES

    1. ARM Cortex-M0+ architecture: Offers a balance between performance and energy efficiency, suitable for low-power applications.

    p>2. Speed up to 48 MHz: Allows fast data processing and operations.

    3. Connectivity peripherals: Includes USB, UART, SPI and I2C to facilitate communication with other devices.

    4. GPIO Ports: Provides flexibility for interfacing with sensors, actuators and other external devices.

    5. Low power consumption: Ideal for applications that require long battery life, such as wearable devices and IoT systems.

    6. Wide variety of applications: Suitable for embedded systems, wearable devices, device controllers and IoT projects.

    DATA SHEET SAMD11C

    Microcontroller: ARM Cortex-M0+ de 32 bits

    Memory: You can have up to 16 KB of built-in flash memory for program storage and 4 KB of SRAM memory for temporary data storage during program execution.

    Compatibility: Compatible with a variety of programming languages, including C and C++, this microcontroller offers flexibility for developers of different experience levels.

    Communication interfaces: UART; SPI; I2C and USB

    Power: 1.62 V a 3.63 V.

    COMPARISON WITH OTHER ARCHITECTURES

    PERFORMANCE AND ARCHITECTURE: The SAMD11C and Xiao RP2040 have 32-bit architectures (ARM Cortex-M0+ and ARM Cortex-M0+ respectively), giving them solid performance for a variety of applications. The Attiny412, in contrast, is an 8-bit AVR microcontroller, which means it may be more limited in performance compared to the other two in certain compute-intensive tasks.

    MEMORY AND STORAGE: The SAMD11C and Xiao RP2040 offer larger memory and storage options compared to the Attiny412. For example, both can have more flash memory and SRAM available, making them better suited for applications that require larger data storage and handling.

    PERIPHERALS AND CONECTIVITY: Both the SAMD11C and Xiao RP2040 offer a wide range of peripherals and connectivity options, such as USB, UART, SPI and I2C, making them more versatile in terms of communicating with other devices. The Attiny412 also offers some connectivity and peripheral options, but they may be more limited compared to the other two.

    CONCLUSION

    The SAMD11C microcontroller stands out primarily for its versatility and efficiency, making it a valuable choice in a variety of embedded applications. Its 32-bit ARM Cortex-M0+ architecture provides solid performance and optimized power consumption, making it ideal for wearable devices, IoT systems, and control devices. Thanks to its multiple communication interfaces and integrated peripherals, the SAMD11C makes it easy to connect to a wide range of external devices, expanding its usefulness in applications such as medical devices, consumer electronics, home automation and more. In summary, the combination of its performance, energy efficiency and connectivity capacity makes it a crucial option for the design of modern and efficient embedded systems.

    COMPARISON BETWEEN PROGRAMMING LANGUAGES
    Silvana Espinoza Maryori Vásquez
    Mbed OS and Arduino IDE: Programming the MAX32625PICO

    This comparison includes aspects such as speed, ease of use, development environments, and other important factors.

    Comparative Table of Programming Languages: Arduino IDE vs Mbed OS

    Aspect Arduino IDE Mbed OS
    Development Speed Quick for simple prototypes Quick for complex projects with libraries
    Ease of Use Very easy for beginners Easy for intermediate users
    Development Environment Arduino IDE (simplified, many libraries) Mbed Studio, Mbed Online Compiler, Mbed CLI
    Initial Setup Very simple, plug-and-play Requires initial configuration, more steps
    Library Support Extensive community library support Extensive, optimized, and secure library support
    Debugging Basic (serial debugging) Advanced (hardware-level debugging, integrated IDEs)
    Supported Platforms Various boards and microcontrollers Mainly ARM microcontrollers
    Code Uploading Very simple, uploads via USB port May require additional tools, but supports USB, JTAG, SWD
    Community and Support Huge community, lots of support Strong support from ARM and partners, good documentation
    Flexibility and Scalability Suitable for small to medium projects Excellent for projects of any scale
    Memory and Resource Management Manual, often less efficient Automated and efficient
    OTA Updates Limited, requires custom setup Well supported, especially on ARM platforms
    License Free (open-source) Free (open-source), with licensed components
    Tool Ecosystem Limited to Arduino and some external tools Extensive, with integration to ARM and third-party tools
    Additional Details

    Development Speed:

    Ease of Use:

    Development Environment:

    Code Uploading:

    Debugging

    Memory and Resource Management:

    Conclusion

    The choice between Arduino IDE and Mbed OS for programming the MAX32625PICO depends on the user's experience level and the project's complexity: Arduino IDE is ideal for beginners and quick or simple projects. Mbed OS is more suitable for users with intermediate to advanced experience and for more complex projects that require precise control and optimization. Both environments have their strengths and are widely used in the microcontroller development community.

    Comparative Table: XIAO RP2040 vs MAX32625PICO

    Comparative Table: XIAO RP2040 vs MAX32625PICO

    Aspect XIAO RP2040 MAX32625PICO
    Processor Dual-core Arm Cortex-M0+ @ 133MHz Arm Cortex-M4 @ 96MHz
    Flash Memory 2MB 512KB
    RAM 264KB 160KB
    GPIO Pins 11 34
    ADC Channels 4 8
    Interfaces UART, I2C, SPI UART, I2C, SPI, USB, CAN
    USB Micro USB Micro USB
    Operating Voltage 3.3V 3.3V
    Power Consumption Low Ultra-Low
    Size 21 x 17.5 mm 25 x 7.6 mm
    Programming Languages MicroPython, C/C++ (Arduino) C/C++ (Mbed)
    Development Environment Arduino IDE, Thonny, VS Code Mbed Studio, Mbed Online Compiler
    Price Low Moderate
     
    /* mbed Microcontroller Library
     * Copyright (c) 2019 ARM Limited
     * SPDX-License-Identifier: Apache-2.0
     */
    
    
    #include "mbed.h"
    
    
    
    
    // Blinking rate in milliseconds
    #define BLINKING_RATE     500ms
    
    
    
    
    int main()
    {
        // Initialise the digital pin LED1 as an output
    #ifdef LED1
        DigitalOut led(LED1);
    #else
        bool led;
    #endif
    
    
        while (true) {
            led = !led;
            ThisThread::sleep_for(BLINKING_RATE);
        }
    }
    
    
    
    
               
    Tutorial

    https://www.youtube.com/watch?v=AlJ3JALnJ2c

    The step by step

    We explore to program in Arduino IDE.

    First we copy the links that we found in a repository to be able to work with this Max32625pico microcontroller

    Here we were downloading it

    we located it

    The step by step

    and then download the ZIP

    guess!
    It didn't work, we couldn't locate the board, we took an hour until we investigated and saw that it could be done with mbed.

    Here with mbed we have to download the program, maryori and I start downloading it

    we install mbed studio
    We see how it is being installed

    We wait, the good thing is that it didn't take long to download it, it was fast.

    Here Maryori already created an account to be able to enter Mbed, interesting that the platform is very similar to visual studio code,

    Here it was intuitive to be able to select the board when we connect it it appears

    We saw the programs that it has loaded and we programmed to turn on an internal LED that the board has, here in these two photos you can see the step by step

    Doing connection tests everything worked very well and turned on, we were very happy

    Group 2:

    - Maria Angela Mejia

    - Renson Samaniego

    - Wilber Giron

    XIAO ESP32-C3

    For this group task, we decided to work on a collaborative file in which we would compare various microcontrollers and their characteristics.

    Features

    1. Architecture: It uses a 32-bit architecture

    2. Clock frecuency: It has a clock frecuency up to 160MHz

    3. Flash memory: It has a flash memory of 4MB

    4. RAM memory: It has a RAM memory of 400KB

    5. Communication interfaces: I2C, UART, SPI

    6. Integrated peripherals: I2C, UART, SPI

    7. Power consumption: 3.3V, 5V

    8. Development tools: Arduino IDE, PlatformIO, Espressif IDF, MicroPython IDE, Thonny IDE, Visual Studio Code, Espruino Web IDE

    9. Compatibility with boards: EPaper Breakout Board, Seeed Studio CAN Bus Breakout Board, Seeed Studio XIAO Expansion Board, BeagleBone Series, Odyssey series, Quantum Development Board, Raspberry Pi series

    Conclusions

    1. Architecture: Greater capacity (32bits) = SAMD11C, XIAO RP 2040 and XIAO ESP 32-C3

    2. Clock frecuency: Higher clock frecuency = XIAO RP2040 and ESP32-C3

    3. Flash memory: Greater data transfer = XIAO RP2040 and ESP32-C3

    4. RAM memory: Greater memory = XIAO RP2040 and ESP32-C3

    5. Communication interfaces: The most versatile serial communication protocols belong to the XIAO ESP32-C3

    6. Integrated peripherals: The most versatile integrated communication protocols belong to the XIAO ESP32-C3

    7. Power consumption: SAMD11C has the lowest energy consumption, which implies a greater shelf life. All other microcontrollers studied consume from 3.3V to 5V (except for the Atiny412 consumed from 3V). Energy consumption will depend on its use

    8. Development tools: Microcontrollers who use free languages are XIAO RP2040 and ESP32-C3

    9. Compatibility with boards: Microcontrollers are compatible with various boards. The choice will depend on its use

    Working with my Fab Academy colleagues in a collaborative way was very interesting. Each one researched about different microcontrollers and we shared our findings and discuss about them for learning about various architectures.

    Group 3:

    - Ronal Vilca Apolin

    - Franco Yactayo

    During this week 6 of group work, we met with the Fablab Perú team, based in Lima, while I participated from Huánuco. Our objective was to conduct discussions and comparisons on the microcontrollers selected for our study. Each of us dedicated ourselves to the detailed analysis of a specific microcontroller, in my case I was talking about the Attiny1624 AVR, then presenting our findings to our classmates.

    Step 1: Explore the ATTINY1624 microcontroller datasheet

    The following images show examples of bridging and angle printed with PLA material using the 3D printer I built.

    ATTINY1624

    I decided to study this microcontroller from the AVR family because, despite its very small size, it offers a wide range of features. I plan to deepen its knowledge by consulting its data sheet and exploring its various functionalities in greater detail.

    • 14 pin package.
    • Two internal clocks 16 and 20 MHz.
    • 16 KB Flash Memory.
    • 256 B EEPROM.
    • 2 KB SRAM.
    • Maximum voltage: 6V; minimum voltage -0.5 V.
    • Accurate analog features such as a 12-bit differential ADC with Programmable Gain Amplifier (PGA).
    imagen
    • VDD: Supply voltage.
    • GND: Ground.
    • Digital pins: Port A: PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7. Port B: PB0, PB1, PB2, PB3.
    • Analog pins: PA1, PA2, PA3, PA4, PA5, PA6, PA7. Port B: PB0, PB1.
    • UPDI Programming pin: PA0 (physical pin number 10).
    • External Clock Pin: PA3.

    • All I/O pins can be configured with internal pullup resistance. Within the communications section there are different types and their pins are different. It is clear that the different communication protocols cannot all be used at the same time, because they have pins in common.
    • USART - Universal Synchronous and Asynchronous Receiver and Transmitter: It has the RX (PB2 or PA2) and the TX (PB3 or PA1).
    • SPI - Serial Peripheral Interface: It has only MOSI (PA1), MISO (PA2), SCK (PA3), SS (PA4).
    • TWI - Two Wire Interface (I2C): It has SDA (PB1 or PA1) and SCL (PB0 or PA2).

    Step 2: Compare performance and development workflows for other architectures

    1. Other architectures to compare:

    • For a comprehensive comparison, we chose ATTINY412, SAMD11C, XIAO RP2040 and XIAO ESP32-C3 microcontrollers.
    imagen

    2. Analyze the specifications and features:

    • Comparing with the ATTINY412, we notice that they share the same 8-bit AVR architecture, but the ATTINY1624 has a larger Flash memory and a higher clock frequency.
    • When contrasting with the SAMD11C, we observe that the ATTINY1624 consumes less power but has less SRAM memory and I/O capabilities compared to the 32-bit ARM Cortex-M0+ architecture SAMD11C.
    • Regarding the XIAO RP2040 and XIAO ESP32-C3 microcontrollers, we note that they offer greater memory capacities and processing power, along with advanced connectivity features, but at the cost of potentially higher power consumption.
    imagen

    Group Assignment Conclusion

    The experience I have had this week working as a team has been extraordinary. We have learned a lot thanks to our joint collaboration. Each of us dedicated ourselves to studying the data sheet of the assigned microcontroller and subsequently shared our conclusions about the advantages of these devices. This process allowed us to acquire knowledge quickly and efficiently. Without a doubt, teamwork has been key to this success.

    Although I didn't have the opportunity to work directly with the Attiny1624, its potential for special applications is truly impressive. Likewise, the other microcontrollers I mentioned above are also very promising. In fact, I have already placed an order to purchase them and thus expand my personal inventory. I'm looking forward to putting everything we've learned into practice and exploring the functionalities detailed in their data sheets.

    Group 4:

    - Silvana Espinoza

    - Jesús Lucero

    ATTINY412

    Browse through the data sheet for your microcontroller compare the performance and development workflows for other architectures
    This week we were very united to do our homework for the week, I love my team.

    they told us what we could investigate and with our classmates we organized ourselves to do the search and the structure of the microcontrollers and to be able to study their architecture and characteristics. We decided that each group could investigate a microcontroller and then be able to present it in a meeting so that everyone could understand all the possible microcontrollers

    Datasheet Comparison for Diverse Architectures

    we decided to work on a collaborative file in which we would compare various microcontrollers and their characteristics.

    • Architecture:The SAMD11C uses a 32-bit architecture, allowing it to handle data and execute instructions faster than 8- or 16-bit microcontrollers.
    • Clock frecuency:The SAMD11C has a clock frequency range of up to 48 MHz. This means it can operate at a clock speed of up to 48 million cycles per second.
    • Flash memory:The SAMD11C has flash memory of up to 16 KB. This means it can store up to 16,384 bytes of data or program instructions. Flash memory can be programmed using a microcontroller programmer or via a programming port built into the microcontroller
    • RAM memory:The SAMD11C has a RAM memory of up to 4 KB. This means that it can store up to 4,096 bytes of temporary or variable data while a program is running on the microcontroller.
    • Power consumption: "1.62 V a 3.63 V.
    • Compatibility with boards: SAM D11 Xplained Pro: Evaluation board with integrated peripherals. ATSAMD11-XPRO: Evaluation board with integrated peripherals. ATSAMD11G18A-XPRO: Evaluation board with integrated peripherals. ATSAMD11D14AM-XPRO: Evaluation board with integrated peripherals.
    COMPARISON WITH OTHER ARCHITECTURES

    PERFORMANCE AND ARCHITECTURE: The SAMD11C and Xiao RP2040 have 32-bit architectures (ARM Cortex-M0+ and ARM Cortex-M0+ respectively), giving them solid performance for a variety of applications. The Attiny412, in contrast, is an 8-bit AVR microcontroller, which means it may be more limited in performance compared to the other two in certain compute-intensive tasks.

    MEMORY AND STORAGE: The SAMD11C and Xiao RP2040 offer larger memory and storage options compared to the Attiny412. For example, both can have more flash memory and SRAM available, making them better suited for applications that require larger data storage and handling.

    PERIPHERALS AND CONECTIVITY: Both the SAMD11C and Xiao RP2040 offer a wide range of peripherals and connectivity options, such as USB, UART, SPI and I2C, making them more versatile in terms of communicating with other devices. The Attiny412 also offers some connectivity and peripheral options, but they may be more limited compared to the other two.

    CONCLUSION

    The SAMD11C microcontroller stands out primarily for its versatility and efficiency, making it a valuable choice in a variety of embedded applications. Its 32-bit ARM Cortex-M0+ architecture provides solid performance and optimized power consumption, making it ideal for wearable devices, IoT systems, and control devices. Thanks to its multiple communication interfaces and integrated peripherals, the SAMD11C makes it easy to connect to a wide range of external devices, expanding its usefulness in applications such as medical devices, consumer electronics, home automation and more. In summary, the combination of its performance, energy efficiency and connectivity capacity makes it a crucial option for the design of modern and efficient embedded systems.

    Group 5:

    - Grace Schwan

    - Cristian Loayza

    For this group task, we decided to work on a collaborative file in which we would compare various microcontrollers and their characteristics.

    We were able to review information on 5 microcontrollers and make a comparison of their performance and general characteristics.

    The controller that we study on this occasion is the XIAO RP2040

    Here you can see and download the data sheet

    Here you can see and download the Schematic

    XIAO RP2040:

    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.

    Features:

    Powerful MCU: Dual-core ARM Cortex M0+ processor, flexible clock running up to 133 MH

    Rich on-chip resources: 264KB of SRAM, and 2MB of on-board Flash memory.

    Flexible compatibility: Support Micropython/Arduino/CircuitPython.

    Easy project operation: Breadboard-friendly & SMD design, no components on the back.

    Small size: As small as a thumb(20x17.5mm) for wearable devices and small projects.

    Multiple interfaces: 11 digital pins, 4 analog pins, 11 PWM Pins,1 I2C interface, 1 UART interface, 1 SPI interface, 1 SWD Bonding pad interface.

    Specification:
    Item Value
    CPU Dual-core ARM Cortex M0+ processor up to 133MHz
    Flash Memory 2MB
    SRAM 264KB
    Digital I/O Pins 11
    Analog I/O Pins 4
    PWM Pins 11
    I2C interface 1
    SPI interface 1
    UART interface 1
    Power supply and downloading interface Type-C
    Power 3.3V/5V DC
    Dimensions 20×17.5×3.5mm
    Comparison of the performance of Xiao RP2040, Xiao ESP32-C3, ATtiny412, SAMD11C and ATtiny1624 microcontrollers:
    Feature / Specification XIAO RP2040 XIAO ESP32-C3 ATTINY412 SAMD11C ATTINY1624
    Architecture ARM Cortex-M0+ Xtensa LX6 AVR ARM Cortex-M0+ AVR
    Maximum Frequency 133 MHz 160 MHz 20 MHz 48 MHz 20 MHz
    Flash Memory 2 MB 4 MB 8 KB 16 KB 16 KB
    RAM 264 KB 400 KB 256 bytes 8 KB 2 KB
    Communication Interfaces UART, SPI, I2C, CAN UART, SPI, I2C UART, SPI, I2C UART, SPI, I2C UART, SPI, I2C
    USB Interface Yes Yes No No No
    Comparison of the workflow of Xiao RP2040, Xiao ESP32-C3, ATtiny412, SAMD11C and ATtiny1624 microcontrollers
    Feature XIAO RP2040 XIAO ESP32-C3 ATTINY412 SAMD11C ATTINY1624
    Environment Setup C/C++, Arduino, MicroPython, CircuitPython C/C++, Arduino C/C++, Arduino C/C++, ASF C/C++, Arduino
    Conclusions:

    Processing power: The RP2040 has significantly higher processing power compared to the ATtiny412, SAMD11C and ATtiny1624 microcontrollers. Its 133 MHz dual-core architecture gives it an advantage in terms of performance. However, the ESP32-C3 also offers respectable performance, although not as powerful as the RP2040.

    WiFi and Bluetooth Connectivity: The ESP32-C3 excels with its built-in WiFi and Bluetooth capability, making it ideal for IoT applications that require wireless connectivity. In contrast, the RP2040 lacks these connectivity features, limiting its use in applications that rely on wireless communication.

    Flexibility and peripherals: The RP2040 and SAMD11C offer a wide range of peripherals and a flexible architecture that makes them suitable for a variety of applications, from motor control to user interface. In comparison, ATtiny microcontrollers typically have fewer peripherals and are more limited in terms of flexibility.

    Price and Availability: The RP2040 and ESP32-C3 are generally competitively priced compared to the other microcontrollers mentioned, but availability may vary depending on region and market demand. ATtiny microcontrollers are typically cheaper, but can also be harder to find in some cases.