Week 4: Embedded Programming


Regional Meeting

Yerlan Turgenbayev

Penguin as paper-fold
Teneth Vinyl cutter
Fiber-laser monportlaser

Mkhitar Evoyan

Crazy inclined cuts [

Zhirayr Ghukasyan

beautiful origami fold

Patrick Dezséri

http://www.lasersaur.com/
svgsilh
Vinyl cut

Irja Linnerud

http://irja-ed23b9.waaglabs.nl/Assignments/week3/

Dylan Heneck




https://cutecutter.com/

Fab Lab Hisar (Istanbul, Turkey)

Group assignment is not online yet

dora-tasci

Neil's Lecture

February 12: global eval started
March 9: US Daylight Savings Time
by March 1: student+local+global intro meetings
April 9-23:
    - break, midterm
    - preceding weekly assignments due
    - student+local+global review meetings
    - review assignments and final plan
    - sort into likely/possible/unlikely to finish this cycle
June 4: weekly assignments due
June 9-13: final presentations
June 16-20: student+local+global review meetings
June 23: global eval decisions deadline
July 4-11: FAB25

Student Reviews

Ferdi's Addendum

Microprocessors and -controllers

MCU

An MCU is a group of microcontroller units that share a common architecture, design, and often the same core features

Within each MCU family, you’ll typically see models that differ by features like:

In-System Programming (ISP)

CMSIS-DAP Devices are all devices that can write programs into a microcontroller's memory using JTAG or SWD. ler before soldering it somewhere.

Available Controllers

At least 5 of each:

Xiao RP2040 Pico RP2040 ESP32C3 ESP32S3 SAMD21 ATSAMD11C14A-SSUT ATSAMD21E18A-AUT ATTINY412-SSFR ATTINY1624-SSFR ATTINY3226-SU AVR128DB32-I/PT
Type ARM Cortex M0+ 32Bit ARM Cortex M0+ 32Bit ESP-RISC-V 32Bit Xtensa® 32-bit LX7 ARM-Cortex M0+ 32Bit ARM Cortex-M0+ 32Bit ARM Cortex M0+ 32Bit AVR® RISC 8-bit AVR® RISC 8-bit AVR® RISC 8-bit AVR® RISC 8-bit
Frequency 133MHz 133MHz 160 MHz 240 MHz 48MHz 48MHz 48MHz 20MHz 20MHz 20MHz 24MHz
SRAM 264KB 264KB 400 KB 8MB 32KB 4KB 32KB 256B 2KB 3KB 16KB
onboard memory 2MB 2MB 4MB 8MB 256KB 16KB 256KB 4KB 16KB 32KB 128KB
I/O-Pins 11 26 11 11 11 12 26 6 12 18 25/26 (1x only In)
ADC 4 3 3 9 11 5 6 6 9 15 13
DAC 0 0 0 0 1 1 1 1 0 0 1
Package SOIC-14 TQFP-32 SOIC-8 SOIC-14 SOIC-20 TQFP-32
Price 4,68 $ 5 $ 4,99 $ 7,49 $ 5,4 $ 1,58 $ 4,03 $ 0,59 $ 1,01 $ 1,29 $ 2,06 $
FPU available?

RP2040 (Raspberry Pi Pico)

Toolchain:

Workflow:

  1. Write code in C/C++ or Python.
  2. Build with CMake (Pico SDK) or Arduino IDE.
  3. Flash via USB (UF2 bootloader) or SWD debugger (e.g., Picoprobe).

Efficiency Tips:

ESP32 (Espressif)

Toolchain:

Workflow:

  1. Develop in C/C++ (ESP-IDF) or Arduino framework.
  2. Build with ESP-IDF CLI or PlatformIO.
  3. Flash via USB (esptool.py) or OTA updates.

Efficiency Tips:

SAMD21/SAMD11 (Atmel/Microchip)

Toolchain:

Workflow:

  1. Code in C/C++ (Microchip Studio) or Arduino.
  2. Build and flash via USB (UF2 bootloader) or EDBG/SWD.

Efficiency Tips:

Attiny/AVR128 (AVR Family)

Toolchain:

Workflow:

  1. Write code in C/C++ or Arduino.
  2. Compile with AVR-GCC or Arduino IDE.
  3. Flash via ISP programmer (e.g., USBasp, Arduino-as-ISP).

Efficiency Tips:

General Workflow Optimization Tips

  1. Unified Environments:

    • PlatformIO (VS Code) supports all listed MCUs, reducing toolchain setup time.
    • Arduino IDE (with board managers) simplifies entry-level development.
  2. Debugging Tools:

    • SWD/JTAG: Use for RP2040, ESP32, SAMD21 (e.g., Segger J-Link, CMSIS-DAP).
    • Serial Monitor: Essential for ESP32/RP2040 debugging.
  3. Version Control:

    • Use git for code management; track dependencies (e.g., submodules for Pico SDK).
  4. Automation:

    • Write Makefiles or use PlatformIO scripts for CI/CD pipelines.

QFP mit Beinchen seitlich
TQFP ohne Beinchen
Soic-8 8 Beinchen
Punkt oder Kerbe kennzeichnen Pin 1

Putting code onto it

In-System Programming (ISP)

CMSIS-DAP Devices are all devices that can write programs into a microcontroller's memory using JTAG or SWD. ler before soldering it somewhere.

Serial Peripheral Interface (SPI)

Serial Peripheral Data Interface (SPDI)

Joint Test Action Group (JTAG)

Serial Wire Debug (SWD)

Unified Program and Debug Interface (UPDI)

Difference between microcontroller and -processor

...

Programmierer:

ISP-Programmierer

AVRISP MKII

FabISP

JTAG-Programmierer

ATMEL-ICE

http://pub.fabcloud.io/programmers/summary/

Open time

the key word is "browse" the datasheet

multiple projects failed last year due to unknown reasons
blacklisted in our lab
try ESP32 C6
Ricardo Marques

I've only used the esp32's for test but I had a lot of problems with a couple SAMD21 xiaos a while back.

I only use xiaos for testing these days.

For Datasheet Newbies...seek and find the following...

if you haven't started one...start your personal FabAcademy Jargon Dictionary.

micro-controllers datasheets are super overwhelming, but once you go into inputs and outputs you won't have a choice but really get into them. thankfully they're shorter.

How I plan to do it: I would go through the data sheet and note down what I found interesting, just like "oh see, the esp32 c3 has this little feature". I would consider the data sheet reading documentation "playing around with the data sheet" so to say. less as an exhaustive summary of the data sheet.

Additional Tips

Teaching from leo-kuipers
Notes from Nicolas Decoster

Some interesting tabs I have open

pieter-hijma leo-kuipers
getting-started-with-arduino-ide
a-guide-to-making-the-right-microcontroller-choice

ROSÉ & Bruno Mars - APT. (Lyrics)