Week 04 — Embedded Programming

Group Assignment

The objective of this week's group assignment was to analyze the microcontroller used in our laboratory and understand its main technical characteristics, architecture, and programming capabilities. This activity allowed us to study the hardware used in embedded systems and understand how software interacts with the peripherals of a microcontroller.

For this activity we explored the Seeed Studio XIAO ESP32-C3, a compact development board widely used for electronics prototyping and embedded systems. This board integrates the ESP32-C3 microcontroller, which offers wireless connectivity, low power consumption, and multiple digital interfaces.


1. Comparison of Embedded Programming Devices

To begin with, different embedded programming devices were analyzed and compared in order to understand their capabilities, limitations, and suitability for digital fabrication projects.

The objective of this comparison was to evaluate how different microcontrollers behave when performing basic tasks such as reading inputs, controlling outputs, and enabling communication between devices.

Comparison Criteria

The following criteria were considered to evaluate each device:

  • Processing capability
  • Connectivity (Wi-Fi / Bluetooth)
  • Number and type of pins
  • Ease of programming
  • Compatibility with development environments
  • Typical applications

Comparison Table

Device Main Characteristics Advantages Limitations Applications
XIAO ESP32-C3 Compact microcontroller with integrated Wi-Fi and Bluetooth High connectivity, small size, suitable for interactive systems Limited number of pins, requires initial configuration IoT, wireless communication, interactive projects
Arduino Uno Microcontroller based on ATmega328P Easy to use, large community, ideal for beginners No built-in connectivity, lower processing capability Basic prototyping, education
ESP32 (general) Microcontroller with Wi-Fi and Bluetooth capabilities High performance, versatile, multiple functionalities More complex setup and configuration Connected systems, automation, IoT
ATtiny Small, low-power microcontroller Low cost, compact, efficient Limited memory and number of pins Simple embedded systems, compact devices

Analysis

The comparison shows that there is no single ideal microcontroller for all applications. Instead, each device offers specific advantages depending on the requirements of the project.

For example, the Arduino Uno is suitable for learning and simple prototypes due to its ease of use, while the XIAO ESP32-C3 is more appropriate for projects that require wireless communication and interactive behavior. Devices such as the ATtiny are useful for compact systems where size and power consumption are critical.


2. Microcontroller Used in the Lab

The microcontroller used in the laboratory is the ESP32-C3, integrated in the Seeed Studio XIAO ESP32-C3 development board. This platform is commonly used in Internet of Things (IoT) applications and embedded systems due to its small size and wireless communication capabilities.

Some of the main features of this board include:

  • ESP32-C3 microcontroller
  • WiFi connectivity
  • Bluetooth Low Energy (BLE)
  • Low power consumption
  • Compact form factor
  • Compatibility with Arduino IDE, ESP-IDF and MicroPython


3. Microcontroller Architecture

The ESP32-C3 is based on a 32-bit RISC-V architecture, which is an open instruction set architecture widely used in modern embedded systems. Unlike earlier ESP32 models that used the Xtensa architecture, the ESP32-C3 adopts RISC-V, enabling broader compatibility with open-source development tools.

The processor can run at speeds of up to 160 MHz, which allows it to execute multiple tasks such as hardware control, communication processes, and data processing.

The microcontroller integrates several internal subsystems that support communication interfaces, peripheral control, and wireless connectivity.


4. Memory

The ESP32-C3 includes different types of memory used to store firmware and runtime data.

  • Flash Memory
    Flash memory stores the firmware uploaded from the computer to the microcontroller. Most XIAO ESP32-C3 boards include approximately 4 MB of flash memory.
  • SRAM
    SRAM is used to store variables and temporary data during program execution. The ESP32-C3 includes approximately 400 KB of SRAM, which allows the execution of relatively complex embedded applications.

5. Microcontroller Peripherals

Microcontrollers include integrated peripherals that allow them to interact with sensors, actuators, and other electronic devices.

  • GPIO (General Purpose Input Output)
    GPIO pins can be configured as digital inputs or outputs. They are commonly used to control LEDs, read button states, or interact with external devices.
  • ADC (Analog to Digital Converter)
    The ADC allows the microcontroller to read analog signals from sensors such as potentiometers, temperature sensors, or light sensors.
  • PWM (Pulse Width Modulation)
    PWM signals are used to control LED brightness, motor speed, or servo positioning.
  • UART
    UART communication allows the microcontroller to exchange serial data with other devices such as computers or communication modules.
  • SPI
    SPI enables fast communication with peripherals such as displays, memory devices, or sensors.
  • I2C
    I2C communication allows multiple devices to be connected using only two communication lines.

6. Pinout and Connections

The XIAO ESP32-C3 board exposes several pins that provide access to the microcontroller functions.

These include:

  • Digital GPIO pins
  • Communication interfaces such as UART
  • SPI and I2C communication pins
  • Power pins (3.3V and GND)

These pins allow the board to interact with sensors, actuators, and other electronic components in embedded systems.


7. Programming the Microcontroller

The microcontroller can be programmed using different development environments. In our laboratory we used Arduino IDE, which provides an accessible interface to write, compile, and upload programs to the board.

The basic programming workflow includes:

  1. Writing the code in the development environment
  2. Compiling the program
  3. Uploading the firmware to the microcontroller through USB
  4. Executing the program on the board

This workflow allows rapid testing and development of embedded system applications.


Conclusion

The analysis of the ESP32-C3 microcontroller allowed us to understand the internal architecture and capabilities of this embedded platform. The ESP32-C3 combines an efficient processor, multiple peripherals, and wireless connectivity in a compact device.

Understanding the architecture, memory structure, and peripheral interfaces of the microcontroller is essential for developing embedded systems and electronics prototypes.