Embedded Programming Class Notes¶
2/11/2026 Embedded Programing https://fabacademy.org/2026/classes/embedded_programming/index.html
Everything programed with in the system itself Harvard architecture, embedded controlls
Sram static ram 6 transistors dram uses 1 transistor Cheep but slow
Fuses remember the configuration
Ports can be outputs/inputs A/D analogue to digital Comparator which one bigger D/A take number and change to voltage timer/counter/PWM (pulses of varying duration- use for how strong motors are)
How many bits does it store: word size¶
- desktop 64bits
- 8 bit very small, but can do a lot
flop is a floating point operation family is a group of processors that have the same architecture architecture structure of programing - what programming language it uses - processing speed - power consumption - what kind of toolchain required for compiling and uploading code core translates user code into code specific to the architecture of the microcontroller
Processor Families¶
-
Neil likes AVRs -low cost -low pin count -easy to program
- ATtiny10 size of a grain of rice
- ATtiny412 runs up to 5.5V which can be used with usb power
- they need a single wire to program them
-
ARM chips
- need voltage regulator if using 5v (run at 1.6-3.6v)
- harder to program at low level, use a higher level language and need a library
- lets you debug
- use when want a hardware interface
-
Raspberri Pi made their own processer
- RP2040 - 32bit arm processor
- 133MHz clock (over clock it in software run it at 250 MHz +over-clocked) much more memory, careful to prevent melting https://www.raspberrypi.com/news/dont-try-this-at-home-overclocking-rp2040-to-1ghz/ (1ghz possible)
- pio, around 2 main processors, 8 mini processors
- allows you to make software defined peripherals
-
- b/c so fast can use higher level languages
-
Xtensa (MIPS), ESP8266 -use wifi
- RISC-V
- open architecture
Vendors:¶
- Octopart.com
-
- shows how many are available at what vendor, and pricing
- DigiKey.com
-
- purchase chip, and shows development boards
- SparkFun and Adafruit do not sell chips, but do something else 11:19
Packages:¶
?
Embedded languages¶
- do not start from scratch, start from examples and modify
- hex code is what actually goes into chip
- assembly language is a list of code to go in hex code
- C, C++ in between low and high level languages to run efficiently on these processer (what we will mostly be using)
- Toolchains are what we need to go into code
Rust 11:23¶
- Memory leaks - lack of memmory
- Memory overruns -security violation by running something you shoulde not
- Interpreters
-
- Interprets code, runs slower, but helpful to higher level programing

Using AI tools can be helpful, but not perfect. All codes cannot run on all chips (python too much for small chips)
Thread is 1 task Can have many small processors running 1 task each or 1 large processor running all tasks
11:31 Bootloader: loads directly to chip JTAG has a separate chip to load program (needed for ARM)
Development environments¶
PlatformIO is a platform of 40+ other platforms Arduino is a way to install the toolchain.
programs are called INO, it is C programming - Set of libraries (someconviniant/ some not) - 1 family of bnbootloaders - 1 geometry of header programming - Most convenient way to install the toolchanin, but not ideal for everything else
Every processor needs a core - how you talk to the chip
https://wiki.seeedstudio.com/SeeedStudio_XIAO_Series_Introduction/ *XIAO takes the chip, adds a usb connecter, a voltage regulator, and buttons used for debugging XIAO for 2040 comes with a bootloader that connects with a usb to your computer, and then you just need to drag your program into it https://github.com/satshas/satshakit (link in chat)
You can vary the speed to go faster, but not as good
Serial communication¶
- Usb programing
Debugging¶
WOKWI.com¶
-digital only, no analog (no circut simulation)
AVR8js¶
-mixed digital and analog
tinkercad¶
Reflow¶
- soldering for tiniest chips, whose leads are underneath the chip. Use hot air to melt the solder under the chip.
Assignment:¶
- Browse data sheets for a microcontroller
- raspberry pie is the easiest to understand
- look at Quintens link
- write and test an embedded system, just blink an LED ok
- Embedded system link in group assignment in class notes