~jleightcap/blink-anatomy

Talk about blinking LEDs on an Arduino
04f57d50 — jleightcap 4 years ago
Rust building typos, use HEX consistently
3558501e — jleightcap 4 years ago
.asm instead of .s for C; rename delay loop asm

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~jleightcap/blink-anatomy
read/write
git@git.sr.ht:~jleightcap/blink-anatomy

You can also use your local clone with git send-email.

Most Arduino tutorials take the IDE as a given. This makes sense for ease of use, but what is really behind those "Verify" and "Upload" buttons? Instead of building complex software on top of an IDE, this project goes in the opposite direction: how does the simplest possible Arduino program work on a deeper level?

Using 4 languages as examples:

  • Arduino IDE (flavored C++)
  • Bare C
  • AVR Assembly
  • Rust

#Arduino IDE

Just the builitn Basic Examples. Not included here, there's nothing to change.

#C

Adaption of builtin example, build steps come directrly from building in Arduino IDE with verbose output.

#AVR Assembly

Gold mine in this small blog post, adapted from ATmega168 into ATmega328p. This lecture gives more theory, architecture, and timing information.

#Rust

This is almost entirely avr-rust's blink example, however this example didn't work immediately (for me at least). The missing pieces came from a blog post on creativecoder and brute force.

Do not follow this link