Week 3
Embedded Programming
09/17/2025 – 09/24/2025
Embedded Programming Assignment (Full Report)
Embedded Programming Assignment
Individual assignment:
• browse through the data sheet for a microcontroller
• write and test a program for an embedded system using a microcontroller
to interact (with local input &/or output devices)
and communicate (with remote wired or wireless connections)
• extra credit: try different languages &/or development environments
Browse through the data sheet for a microcontroller
Since I used the RP2040 Raspberry Pi controller in the XIAO package to make my embedded controller board, I studied the RP2040.
The RP2040 is a Raspberry Pi microcontroller chip, and it’s designed to be a kind of “Swiss Army knife” for makers. Unlike the bigger Raspberry Pi computers that run Linux, the RP2040 is built to do one thing really well: connect code directly to the physical world, whether that’s blinking LEDs, spinning motors, or sampling sensors.
Inside, it has two Arm Cortex-M0+ processor cores that can run at up to 133 megahertz. Having two cores means you can split tasks, for example, one core could be listening to sensor inputs while the other handles communication with a computer. The chip also includes 264 kilobytes of fast static RAM (SRAM) for working memory, plus the ability to connect to up to 16 megabytes of external flash storage where your programs live.
Around the core is a toolkit of useful built-in hardware. There are two Universal Asynchronous Receiver/Transmitters (UARTs) for basic serial communication, two Serial Peripheral Interface (SPI) controllers for high-speed device links, and two Inter-Integrated Circuit (I²C) controllers for talking to a wide range of sensors and chips. It also has 16 Pulse Width Modulation (PWM) channels for things like dimming LEDs or controlling servo motors. There’s even a USB 1.1 controller built in, so the chip can act as either a USB device or a host. All of this connects through 30 general-purpose input/output (GPIO) pins, four of which can double as analog inputs via an Analog-to-Digital Converter (ADC).
The feature that really sets the RP2040 apart is its Programmable I/O (PIO) system. This is a little reconfigurable hardware engine that you can program to handle custom protocols or tricky timing, freeing up the main processors.
Cheap, efficient, and flexible, the RP2040 is designed for makers. It packs serious capabilities into a few millimeters of silicon — just enough power and memory to let your projects “talk” to the physical world with ease.
- write and test a program for an embedded system using a microcontroller to interact (with local input &/or output devices) and communicate (with remote wired or wireless connections)
2.1) Firstly assemble the PCB board for the XIAO package: The pcb was milled in the lab and and the copper layer was quite thin. In my first attempt at filling a rectangle with lead, I kept the hot soldering iron on the copper rectangle for too long and burnt right through. Thankfully that was connecting to a XIAO pin that was not useful this this project, so no real harm done.
2.2 Soldered all the pins of the XIAO package that contains the Raspberry Pi RP 2040 controller to the PCB. As you can see above, my first attempt in soldering wasn’t great, didn’t look pretty. Used the multi-tester to check for connectivity of my soldering job.
2.3 Soldered the tiny 10k resistors and the display unit using the prop-up pins.
2.4 Got to say, Anthony did a great job explaining the nuances of soldering. He went through the different techniques and materialsI haven’t soldered a board in some 3 decades, it was great fun getting the XIAO package onboard the PCB and getting the resistors and display mounted.
2.5 Quentin helped test the program by connecting his laptop to the XIAO USB-c port and ran the program. The LED’s blinked and the “Hello World” flashed and the touch sensors detected capacitance that was plotted by the program.
Thanks Quentin for your assistance!!