Index: blinkled/.gitignore
===================================================================
--- blinkled/.gitignore	(revision 6f227546ef38cc47b1c29f7ab2ec23f8e18ebffd)
+++ blinkled/.gitignore	(revision 6f227546ef38cc47b1c29f7ab2ec23f8e18ebffd)
@@ -0,0 +1,3 @@
+*.bin
+.*.sw?
+*.o
Index: blinkled/Makefile
===================================================================
--- blinkled/Makefile	(revision bbcd1f814ca864850ba1fe44b70d56a97b6e3fc5)
+++ blinkled/Makefile	(revision 6f227546ef38cc47b1c29f7ab2ec23f8e18ebffd)
@@ -1,6 +1,10 @@
-#Set vars
-MCU=atmega48p
+# User configurable variables
+MCU=atmega8
 FCPU=16000000
-COMPILE = avr-gcc -Wall -Os -std=c99 -mmcu=$(MCU) -DF_CPU=20000000
+PROG=stk500 -P /dev/ports/usb0
+
+# You should not need to change anything below
+# -----------------------------------------------------------------------------
+COMPILE = avr-gcc -Wall -Wextra -Werror -Os -std=c99 -mmcu=$(MCU) -DF_CPU=$(FCPU)
 
 #Rules
@@ -18,6 +22,6 @@
 	$(COMPILE) -mmcu=$(MCU) -std=c99 -c $< -o $@
 
-flash:
-	avrdude -c usbasp -p $(MCU) -Uflash:w:$(MCU).hex
+flash: $(MCU).hex
+	avrdude -c $(PROG) -p $(MCU) -Uflash:w:$(MCU).hex
 
 clean:
Index: blinkled/README.md
===================================================================
--- blinkled/README.md	(revision 6f227546ef38cc47b1c29f7ab2ec23f8e18ebffd)
+++ blinkled/README.md	(revision 6f227546ef38cc47b1c29f7ab2ec23f8e18ebffd)
@@ -0,0 +1,14 @@
+Blinkled
+========
+
+Well, the name says it all. This just blinks a led every second (assuming 16MHz
+clock). This is a generic project I use to check my boards are alive. As a
+result, I'll try to make the code easily configurable. Ideally, you'd just set
+some variables in the makefile, type "make flash", and get going.
+
+The LED is expected to be on PD6. Why? Because all boards I had to use so far
+had a led there or could easily have one. But if you happen to have a LED
+somewhere else, it's super easy to change which pin is used, right?
+
+All other pins are kept as input. I assume this way nothing should be damaged,
+no matter where this code is run.
Index: blinkled/atmega8.hex
===================================================================
--- blinkled/atmega8.hex	(revision 6f227546ef38cc47b1c29f7ab2ec23f8e18ebffd)
+++ blinkled/atmega8.hex	(revision 6f227546ef38cc47b1c29f7ab2ec23f8e18ebffd)
@@ -0,0 +1,8 @@
+:1000000012C019C018C017C016C015C014C013C044
+:1000100012C011C010C00FC00EC00DC00CC00BC06C
+:100020000AC009C008C011241FBECFE5D4E0DEBF5E
+:10003000CDBF02D019C0E4CF88E19FE00FB6F8949D
+:10004000A89581BD0FBE91BD1FBC84E08EBD8E9A68
+:1000500012BA24E090E4A89508B602FEFCCF28BFAF
+:0C00600082B3892782BBF7CFF894FFCF52
+:00000001FF
Index: inkled/blinkdel.hex
===================================================================
--- blinkled/blinkdel.hex	(revision bbcd1f814ca864850ba1fe44b70d56a97b6e3fc5)
+++ 	(revision )
@@ -1,8 +1,0 @@
-:1000000012C017C016C015C014C013C012C011C052
-:1000100010C00FC00EC00DC00CC00BC00AC009C07C
-:1000200008C007C006C011241FBECFEDCDBF02D04F
-:100030001CC0E6CF2FE088E190E00FB6F894A895B9
-:1000400081BD0FBE21BD10BE84E083BF81B38FEFA1
-:1000500081BB8AEA82BB92E0A89508B601FEFCCF7C
-:0E00600098BF82B38F5F82BBF7CFF894FFCFBB
-:00000001FF
Index: blinkled/main.c
===================================================================
--- blinkled/main.c	(revision bbcd1f814ca864850ba1fe44b70d56a97b6e3fc5)
+++ blinkled/main.c	(revision 6f227546ef38cc47b1c29f7ab2ec23f8e18ebffd)
@@ -8,6 +8,16 @@
 #include <stdbool.h>
 
-#ifdef __AVR_ATmega48P__
-#define TIFR TIFR0
+#if defined(__AVR_ATmega8__)
+#define _TCCA TCCR1A
+#define _TCCB TCCR1B
+#define _TIFR TIFR
+#define _TOV  TOV1
+#elif defined(__AVR_ATmega48P__)
+#define _TCCA TCCR0A
+#define _TCCB TCCR0B
+#define _TIFR TIFR0
+#define _TOV  TOV0
+#else
+#error Unknown device! Add it to main.c and set the timer properly
 #endif
 
@@ -15,6 +25,6 @@
 	wdt_enable(WDTO_2S);
     // configure timer 0 for a rate of 16M/(256 * 256) = ~244Hz
-    TCCR0A = 0;          // timer 0 prescaler: 256
-	TCCR0B = 4;
+    _TCCA = 0;          // timer 0 prescaler: 256
+	_TCCB = 4;
 
 	//debug LED - output
@@ -28,6 +38,6 @@
 
 		// check timer if we need periodic reports
-		if (TIFR & (1 << TOV0)) {
-			TIFR = (1 << TOV0); // reset flag
+		if (_TIFR & (1 << _TOV)) {
+			_TIFR = (1 << _TOV); // reset flag
 			PORTD ^= (1<<PD6);
 		}
