Index: chiptest/Makefile
===================================================================
--- chiptest/Makefile	(revision 6d8c366237394e8af63fd0d0a31877dae8194aa4)
+++ chiptest/Makefile	(revision 6390cc39bcc883cfecc2d3256a53776f6d748f84)
@@ -1,10 +1,15 @@
+# STK500
+F_CPU=3800000
+MCU=atmega128
+
 # K4KUSB
-F_CPU=12000000
+#F_CPU=12000000
+#MCU=attiny2313
 
 # muSerial
 # F_CPU=20000000
+#MCU=attiny2313
 
 # Common
-MCU=attiny2313
 BAUD=9600
 
@@ -13,6 +18,5 @@
 include ../kbd/common.mk
 
-COMPILE = $(CC) -Wall -Os -std=c99 -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DBAUD=$(BAUD) \
-	-I../libs/usart/
+COMPILE = $(CC) -Wall -std=c99 $(CFLAGS) -I../libs/usart/
 
 VPATH=../libs/usart/
@@ -20,5 +24,5 @@
 #Rules
 
-blinkdel.bin: main.o usart.o
+$(MCU).bin: main.o usart.o
 	$(COMPILE) $^ -o $@
 
@@ -33,5 +37,2 @@
 	$(COMPILE) -std=c99 -c $< -o $@
 
-flash:
-	avrdude -c usbasp -p $(MCU) -Uflash:w:blinkdel.hex
-
Index: chiptest/blinkdel.hex
===================================================================
--- chiptest/blinkdel.hex	(revision 6d8c366237394e8af63fd0d0a31877dae8194aa4)
+++ 	(revision )
@@ -1,14 +1,0 @@
-:1000000012C017C016C015C014C013C012C011C052
-:1000100010C00FC00EC00DC00CC00BC00AC009C07C
-:1000200008C007C006C011241FBECFEDCDBF28D029
-:1000300046C0E6CF12B88DE489B9599886E083B9F5
-:1000400088E18AB908955D9BFECF8CB908955F9BC6
-:10005000FECF8CB10895CF93C82F982F92959F70A3
-:100060009A3010F480E301C087E3890FECDF8C2F16
-:100070008F708A3010F4805D01C0895CCF91E3CF2E
-:100080002FE088E190E00FB6F894A89581BD0FBEEF
-:1000900021BD10BE84E083BFBA9AC298CBDFC0E016
-:1000A00012E0D4E0A89508B601FEFCCF18BFCF5FE0
-:1000B000C9F788B38D2788BB88E4C5DFF3CFF894F0
-:0200C000FFCF70
-:00000001FF
Index: chiptest/main.c
===================================================================
--- chiptest/main.c	(revision 6d8c366237394e8af63fd0d0a31877dae8194aa4)
+++ chiptest/main.c	(revision 6390cc39bcc883cfecc2d3256a53776f6d748f84)
@@ -12,15 +12,18 @@
 // muSerial: ATTiny2313 - LED = PD6
 // K4KUSB: ATTiny2313 - LED = PB2
-#define DDRLED DDRB
-#define PORTLED PORTB
-#define LEDBIT (1 << PB2)
-
-#define BAUD 9600 // Safe value even for low clocks. (used by setbaud.h)
+// STK500: anything, PORTD is convenient if available.
+#define DDRLED DDRC
+#define PORTLED PORTC
+#define LEDBIT (1 << PC2)
 
 int main() {
 	wdt_enable(WDTO_2S);
     // configure timer 0 for a rate of FCPU/(256 * 256)
+#ifdef __AVR_ATtiny2313__
     TCCR0A = 0;          // timer 0 prescaler: 256
 	TCCR0B = 4;
+#else
+	TCCR0 = 6; // timer 0 prescaler: 256
+#endif
 
 	//debug LED - output
@@ -32,4 +35,5 @@
 	// Let's rock!
 	uint8_t counter = 0;
+	char c = 'a';
 	for(;;) {
 		wdt_reset();
@@ -43,5 +47,7 @@
 			{
 				PORTLED ^= LEDBIT; // Toggle the LED
-				USARTWriteChar('H'); // Send a byte to the UART
+				USARTWriteChar(c++); // Send a byte to the UART
+				if (c > 'z')
+					c = 'a';
 			}
 		}
Index: chiptest/readme.md
===================================================================
--- chiptest/readme.md	(revision 6390cc39bcc883cfecc2d3256a53776f6d748f84)
+++ chiptest/readme.md	(revision 6390cc39bcc883cfecc2d3256a53776f6d748f84)
@@ -0,0 +1,39 @@
+Chiptest - The quick and dirty AVR tester.
+==========================================
+
+So, you made a new project board using an AVR microcontroller, and you want to
+make sure it works before starting to develop your firmware. Debugging both
+software and hardware at the same time is a pain.
+
+Enters chiptest. This is a simple test program that makes sure the most basic
+stuff is working.
+
+Right now chiptest supports the following devices:
+* ATTiny2313.
+* ATmega128
+
+It tests the following features:
+* USART
+* Timers
+* One GPIO
+
+How to use it
+=============
+
+* Adjust the pinout at the top of main.c and the CPU clock in the makefile to
+your needs
+* Plug your usbasp and board
+* make flash
+
+How to tell if it works
+=======================
+
+If everything goes well:
+* The LED will blink at FCPU/(8^3). This should be visible for all reasonable
+clock speeds:
+	- 20 MHz - 0.8s
+	- 12 MHz - 1.4s
+	- 1 MHz - 16.8s
+* The character 'H' is sent to the serial port at the same speed. Baudrate is
+9600 baud to be safe (it's more likely that a low baudrate can be generated
+in a reasonably accurate way with any clock speed as a base).
Index: chiptest/readme.txt
===================================================================
--- chiptest/readme.txt	(revision 6d8c366237394e8af63fd0d0a31877dae8194aa4)
+++ 	(revision )
@@ -1,38 +1,0 @@
-Chiptest - The quick and dirty AVR tester.
-==========================================
-
-So, you made a new project board using an AVR microcontroller, and you want to
-make sure it works before starting to develop your firmware. Debugging both
-software and hardware at the same time is a pain.
-
-Enters chiptest. This is a simple test program that makes sure the most basic
-stuff is working.
-
-Right now chiptest supports the following devices:
-* ATTiny2313.
-
-It tests the following features:
-* USART
-* Timers
-* One GPIO
-
-How to use it
-=============
-
-* Adjust the pinout at the top of main.c and the CPU clock in the makefile to
-your needs
-* Plug your usbasp and board
-* make flash
-
-How to tell if it works
-=======================
-
-If everything goes well:
-* The LED will blink at FCPU/(8^3). This should be visible for all reasonable
-clock speeds:
-	- 20 MHz - 0.8s
-	- 12 MHz - 1.4s
-	- 1 MHz - 16.8s
-* The character 'H' is sent to the serial port at the same speed. Baudrate is
-9600 baud to be safe (it's more likely that a low baudrate can be generated
-in a reasonably accurate way with any clock speed as a base).
