4. Embedded programming

It's been a crazy week for me. In addition to programming, it also takes time to understand the important features of development boards and micro controllers. Although brwosing through datasheets gives me a headache, it's still a lot of fun when the program works.

1.1 Assignments of the Week

  1. Group assignment:
    • Compare the performance and development workflows for other architectures.
    • Document your work to the group work page and reflect on your individual page what you learned
  2. Individual assignments:
    • Browse through the datasheet for your microcontroller.
    • Program a microcontroller development board to interact and communicate.

1.2 Group Assignment

We tried to use Arduino Uno, Mirco-Bit and Seeed Xiao. Here is the documentation.

1.3 Datasheets Reading

According to the definition of wikipedia, A datasheet is a document that summarizes the performance and other characteristics of a product, machine, component (e.g., an electronic component), material, subsystem (e.g., a power supply), or software in sufficient detail that allows a buyer to understand what the product is and a design engineer to understand the role of the component in the overall system.

1) Arduino Uno

The Arduino UNO R3 is the perfect board to get familiar with electronics and coding.
📃Datasheet of Arduino Uno R3

2) ATmega328P

ATmega328P is the main processor of Arduino Uno. It is a high performance, low power AVR 8-bit microcontroller, with advanced RISC architecture.

I was confused about these ports. Sevario gave me an simple explanation to help understand: ATmega328P is a processor developed by engineers. They don't care about whether it's convinient for the users. When you use it, you must read the complicated datasheet to clearfy each port on the chip. But Arduino was created by designers. Designers want it to be user friendly. That's why we have pinouts like D0~D13 and A0~A5. It becomes more convenient to use.

3) RP2040

RP2040 is a low cost microcontroller device with the quality, cost and simplicity of the Raspberry Pi. It has two symmetric processor cores and high internal bandwidth, making it useful for signal processing and video. The chip has a large amount of internal RAM but uses external flash, allowing you to choose how much memory you need.
📃Datasheet of RP2040

1.4 Programming a Development Board

As a beginner, I started with using Arduino Uno. There are detailed tutorials in Chinese on dfrobot's official website. Following the guide of tutorials, I tried several projects.

1) Fading Light

2) Temperature Alarm