Arduino in assembly
ATmega328P, no C
Programmed an ATmega328P in raw assembly to show Morse code and binary patterns on LEDs.
Details
- Four routines in sequence: numbers in binary, my initials as alphabet positions (Z = 26, R = 18), Morse code, then a ping-pong light bouncing across the LEDs with logical shifts.
- Morse for every count from 1 to 50: ZAI on odd counts, IAZ on even ones (parity by masking the low bit), plus a 5 on multiples of five, found by repeated subtraction since the AVR has no divide instruction.
- All timing from nested busy-wait loops counted in clock cycles at 16 MHz, no timers or libraries, with dots, dashes and gaps at the standard 1:3:7 Morse ratios.