UNIVERSITY COURSEWORK
From a button press to a bit of logic.
Working with AVR digital inputs, LEDs, C, and the compile–flash–test cycle.
Context
Introductory university coursework documented in October 2024: digital inputs and LEDs on an AVR platform, with build commands targeting the ATmega88PA.
My contribution
- Tested supplied teaching demos and made later code modifications.
- Worked with C bitwise operations for button-controlled LEDs and AND, NOR, and XOR logic.
- Documented avr-gcc, ELF/HEX conversion, avrdude flashing, and Makefile steps.
Approach
The workflow connected source code to observable output: compile the C program, generate the flash image, transfer it to the microcontroller, then inspect the response of the LEDs to button inputs.
One operation, four input combinations.
LED = A ^ B;| A | B | LED |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
XOR is true when the two logical inputs differ. Here A and B are Boolean values; this sketch does not map physical button voltages, registers, or LED polarity. The new Lab demonstration covers every input combination.
Learning
A small I/O exercise connects Boolean logic, register operations, the build toolchain, and physical behavior. Keeping those layers distinct makes errors easier to reason about.
Sources & scope
Based on adapted teaching examples and partial lab documentation. The historical firmware has not been independently rebuilt here. The linked browser demonstration is a new implementation.
Adapted teaching examples credited to Thomas Grunenberg.