Appearance
Week 4 - Embedded programming โ
Group Assignment โ
- Demonstrate and compare the toolchains and development workflows for available embedded architectures
Group working โ
This week I have mainly studied about how to use Arduino UNO. I have browse through the datasheet of my Arduino UNO and learned programmed a microcontroller board. I have also compared the Arduino UNO and the Raspberry Pi architecture.
Arduino UNO R3 โ
The Arduino UNO R3 uses Atmega328P-PU as core MCU, the key features & layouts is listed below. See Datasheet.

- Name: Arduino UNO
- Microcontroller: Atmega328P-PU
- Operating Voltage: 5V
- Input Voltage: 7-20V
- Number of GPIO Pins: 20
- Digital Pins: 14
- PWM Pins: 6
- Analog Input Pins: 6
- I2C Ports: 1
- UART Ports: 1
- SPPI Ports: 1
- Flash Memory: 32 KB of which 0.5 KB used by bootloader
- SRAM: 2 KB
- EEPROM: 1 KB
- Clock Speed: 16 MHz
The detailed PCB layout of Arduino UNO the broad is shown as below.


Arduino UNO R4 for Fab2025 โ
The core MCU of the Arduino Uno R4 is the Renesas RA4M1. This chip is based on the ARM Cortex-M4 architecture, runs at a frequency of 48MHz, and features 32KB SRAM and 256KB flash memory. Compared to the Uno R3, the processor has been upgraded to a 32-bit 48MHz Renesas RA4M1, significantly improving performance. The SRAM has increased from 2KB to 32KB, and flash memory from 32KB to 256KB, providing more space for complex applications and data processing. See Datasheet.

- Name: Arduino UNO
- Microcontroller: Renesas RA4M1 (Armยฎ Cortexยฎ-M4)
- Operating Voltage: 5V
- Input Voltage: 6-24V
- Number of GPIO Pins: 20+ (varies slightly with model)
- Digital Pins: 14
- PWM Pins: 6
- Analog Input Pins: 6
- I2C Ports: 1
- UART Ports: 1
- SPI Ports: 1
- Flash Memory: 256 KB
- SRAM: 32 KB
- EEPROM: Emulated in Flash
- Clock Speed: 48 MHz
- Additional Features (WiFi model only):
- Built-in Wi-Fi (ESP32-S3 coprocessor)
- Qwiic/IยฒC connector for quick sensor integration
- USB-C port
- Real-Time Clock (RTC)
- CAN Bus support
The detailed PCB layout of the Arduino UNO R4 board (Minima or WiFi) differs from R3 but maintains backward compatibility with existing shields.

The Arduino UNO R4 is powered by the Renesas RA4M1 microcontroller, which represents a significant architectural upgrade from the AVR-based ATmega328P used in the UNO R3. The RA4M1 is based on a 32-bit Armยฎ Cortexยฎ-M4 core with a built-in Floating Point Unit (FPU), offering enhanced performance, scalability, and efficiency for modern embedded applications. Key Architectural Features include:
- Core: Arm Cortex-M4
- Architecture: 32-bit RISC
- Clock Frequency: Up to 48 MHz
- Floating Point Support: Single-precision FPU
- Instruction Set: Thumb-2 (dense 16/32-bit instruction set for code efficiency)
- Power Efficiency: ARM low-power modes supported, with multiple sleep and standby configurations
- Bus System: Advanced High-performance Bus (AHB) for faster peripheral and memory access
- Interrupt System: Nested Vectored Interrupt Controller (NVIC) with up to 64 external interrupts
- Memory:
- 256 KB Flash
- 32 KB SRAM
- EEPROM emulated in Flash
- Peripherals Integration:
- I2C, SPI, UART
- ADC (14-bit)
- DAC (12-bit, optional)
- CAN bus (FD-capable)
- Real-Time Clock (RTC)
- Security and Safety:
- Memory Protection Unit (MPU)
- Clock and voltage monitors
Raspberry Pi 4 Model B โ
The key features & layouts for the Raspberry Pi 4 Model B can be found in Datasheet:

- Name: Raspberry Pi 4 Model B
- Microcontroller: Broadcom BCM2711
- Operating Voltage: 5V (via USB-C)
- Input Voltage: 5V (recommended)
- Number of GPIO Pins: 40
- Digital Pins: 40 (all GPIO pins are digital)
- PWM Pins: 2 PWM channels on 4 GPIO pins (GPIO 12, 13, 18, 19)
- Analog Input Pins: None (requires external ADC for analog input)
- I2C Ports: 1 (two I2C buses available)
- UART Ports: 1 (plus a secondary UART available)
- SPI Ports: 1
- Flash Memory: None (uses microSD card for storage)
- SRAM: 1 GB, 2 GB, or 4 GB RAM options (LPDDR4)
- EEPROM: Not applicable (external storage through microSD)
- Clock Speed: Up to 1.5 GHz (quad-core ARM Cortex-A72)
Comparison of different architecture โ
Compare the performance and development workflows for Arduino UNO R3\R4 and the Raspberry Pi 4B architecture.
๐ง Performance โ
Processing Power โ
Arduino UNO R3:
Features an 8-bit ATmega328P microcontroller running at 16 MHz. Suitable for simple tasks, sensor control, and real-time logic with minimal overhead.Arduino UNO R4:
Upgraded to a 32-bit Arm Cortex-M4 microcontroller (Renesas RA4M1) running at 48 MHz with a floating point unit (FPU). Offers a major performance boost over R3, enabling more complex calculations and peripheral control.Raspberry Pi 4B:
A full-fledged single-board computer with a quad-core ARM Cortex-A72 processor @ 1.5 GHz. Can handle multitasking, media processing, and run a full OS.
Memory โ
Arduino UNO R3:
2 KB SRAM, 32 KB flash, 1 KB EEPROM. Limited memory restricts application complexity.Arduino UNO R4:
32 KB SRAM, 256 KB flash, EEPROM emulated in flash. Allows for more complex firmware and data handling than R3.Raspberry Pi 4B:
1 GB to 8 GB of LPDDR4 RAM. Supports demanding applications, multitasking, databases, and multimedia.
I/O Capabilities โ
Arduino UNO R3 & R4:
Both provide 14 digital I/O, 6 analog inputs, and support I2C, SPI, UART. R4 adds support for CAN bus, DAC, and Real-Time Clock (WiFi model). Great for direct hardware and sensor interfacing.Raspberry Pi 4B:
Offers 40 GPIO pins, supports I2C, SPI, UART, plus HDMI, USB, Ethernet, CSI/DSI interfaces. More suitable for high-level peripherals and external modules.
๐ป Development Workflows โ
Programming Environment โ
Arduino UNO R3 & R4:
Programmed using the Arduino IDE or other Arduino-compatible platforms. Code is written in simplified C/C++, compiled, and flashed via USB. Serial Monitor aids in debugging.Raspberry Pi 4B:
Supports development in Python, C/C++, Java, etc. Code can be written using IDEs like Thonny, VS Code, or even directly on the Pi. SSH and VNC allow remote programming.
Operating System โ
Arduino UNO R3 & R4:
No operating system. Firmware runs directly on bare-metal hardware. Deterministic and predictable timing, ideal for real-time control.Raspberry Pi 4B:
Runs full Linux-based OS (typically Raspberry Pi OS). Supports multitasking, services, daemons, GUIs, and system-level operations.
Libraries and Community Support โ
Arduino UNO R3:
Mature ecosystem with extensive community support and libraries tailored for hardware control.Arduino UNO R4:
Growing library support (due to newer architecture), with official support from Arduino and increasing third-party contributions.Raspberry Pi 4B:
Massive community and rich library support across domains like AI, networking, media, and IoT.
๐ง Application Use Cases โ
Use Case | UNO R3 | UNO R4 | Raspberry Pi 4B |
---|---|---|---|
Simple sensor control | โ | โ | โ |
Real-time applications | โ | โ (better precision & FPU) | โ ๏ธ (non-deterministic timing) |
Robotics & embedded systems | โ | โ โ | โ ๏ธ (better with co-processing) |
Signal processing / math | โ | โ (FPU helps) | โ โ โ |
Web server or GUI applications | โ | โ | โ โ โ |
Machine learning or AI inference | โ | โ ๏ธ (possible, but limited) | โ โ โ |
Media streaming / HDMI output | โ | โ | โ โ โ |
๐ Summary โ
The Arduino UNO R3 is ideal for simple, real-time embedded projects with tight resource constraints.
The Arduino UNO R4 bridges the gap with better processing power, memory, and peripheral support, making it suitable for more advanced control systems and moderate embedded applications.
The Raspberry Pi 4B is a full Linux computer, ideal for high-level applications, multitasking, networking, and projects requiring significant computation or storage.
Each platform suits different needs:
- R3: Pure embedded control with minimal resources.
- R4: Enhanced embedded system with more modern MCU features.
- Pi 4: Embedded Linux computer with full-stack capabilities.