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.
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
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.
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.
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.
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.
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:
- Writing the code in the development environment
- Compiling the program
- Uploading the firmware to the microcontroller through USB
- 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.
