week04 Embedded programming
Embedded Programming
Group assignment
Demonstrate and compare the toolchains and development workflows for available embedded architectures Document your work to the group work page and reflect on your individual page what you learned
Individual assignment
Datasheet
I have some experience reading datasheet, I randomly went through to a microcontroller on the Fabacademy provided on its webpage for this week. Here is the micocontroller - ATtiny1624/1626/1627.
Basically in the first few pages of the datasheet some basic and important information can be found, I highlighted them here:

The ATtiny1624/1626/1627 microcontrollers of the tinyAVR® 2 family use the AVR® CPU with hardware multiplier, running at up to 20 MHz, with 16 KB Flash, 2 KB of SRAM, and 256B of EEPROM available in 14-, 20-, and 24-pin packages. The family uses the latest technologies from Microchip with a flexible and low-power architecture, including Event System, advanced digital peripherals, and accurate analog features such as a 12-bit differential ADC with Programmable Gain Amplifier (PGA)^1.
The name of a device in the tinyAVR® 2 family is decoded as follows:

The feature part of any datasheet has to be read, do not skip it:

I would not recommend to read all the datasheet, just going to the place which we need. Looking and scrolling the content and start with introduction part. For this microcontroller introduction was before content.
I will take a look at to block diagram:

I check the Peripherals and Architecture part: 8-bit AVR (tinyAVR 2-series). Some information related to watchdog timer; The Watchdog Timer (WDT) is a system function for monitoring the correct program operation. When enabled, the WDT is a constantly running timer with a configurable time-out period. If the WDT is not reset within the time-out period, it will issue a system Reset. ADC of this microcontroller: The Analog-to-Digital Converter (ADC) peripheral is a 12-bit differential and single-ended ADC, with a Programmable Gain Amplifier (PGA), and a conversion rate up to 375 ksps at 12-bit resolution.
Electrical characterization:

I check packaging type as well:

Programming
For this week EMbedded programming, I installed and set up Arduino IDE, Thonny-mMcropython. I explain how it went. Hardware for this week: - Board: XIAO RP2040 - Processor: Dual-core RP2040 - Clock: up to 133 MHz - Memory: 264KB of SRAM, and 2MB of on-board Flash memory - Port: COM5 (might be different) - Programming interface: Arduino IDE & Thonny-Mcropython - Connection: USB-C cable (be sure that it is not just charger)
Here is are toys to play:
I did soldering:
Micropython
I followed the instruction here for Micropython and did everything line by line and everything was smooth and went well as a first experience working with microcontroller and embedded programming. As Neil said, it was kind of life changing.
Here in the following steps I briefly mention what I did. Connect the RP2040 and install and updating micropython:
after installation, getting this message that it was installed successful:
Then I copy paste the first program from the webpage which I already linked it, and save it on the microcontroller. the first program was LED blinking. I changed the delay time from 1 second to 200 ms.
The LED blinking with 1 second:
The LED blinking with 200 ms:
I also tried to see the Hello world on the display. It was successful and the was my second life changing in less than 30 minutes.
Hello World:
And Hello FabLab:
Arduino
What is Arduino? In simple way definition, it is tool between input and output electronic. It should be included hardware, IDE, and code. For Arduino testing and playing around, it was a bit challenges. At least today 16.02.2026 I worked on it 4 hours but still not working. I had plan to follow the instruction as I did for Micropython from here.
First thing first, I connected the micro to my laptop nad recognizing board and port:
I started with example Blink and it was okay, I change the delay time to 100 ms:
But I tried to display Hello world on the display again but i got this error:
Copy paste it and googling it:
Followed above and seems the error solved after getting this message:
But still I was not able to have any interaction with display.
There was an error from not accessing to network and admin right.
Next day again I tried to do some programming with it but I got the below errors:
I tried to fixed by myself but I was not able to. I ask ChatGPT and emphasize not explain to much, what is this error and how to fix it and the mode was on Thinking.
Prompt to ChatGPT: what is this error:
cc1plus.exe: error: too many filenames given; type 'cc1plus.exe --help' for usage
cc1plus.exe: fatal error: @C:\Windows\TEMP\cccPt8eV: Invalid argument
compilation terminated.
exit status 1
Compilation error: exit status 1?
ChatGPT answer: The error is not caused by those paths. The failure is happening because the response file itself is being parsed incorrectly, not because the include directories are wrong and
Anyway it was time consuming, but I was really intense to solve it. I have to see the Hello World on the screen.
The first program, Blinking was successfully ran again. The source of the code included at the end of this page.
The second program which I was able to program with Arduino is RGB-LED. the source code included as well:
I tried these codes here and I was able to have interaction with display via Arduino same as Micropython:

Learning outcome for this week:
- How to go through a datasheet
- Getting familiar with different type of microcontroller
- Working and programming using Micropython and Arduino IDE
- How to debug a code and error message
- Do soldering
- Linking embed video on gitlab and website













