/********************************************* * vim: set sw=8 ts=8 si : * Author: Guido Socher, Copyright: GPL * This program is to test the led connected to * PC5. * See http://linuxfocus.org/English/November2004/ * for details. * Chip type : ATMEGA8 * Clock frequency : Internal clock 1 Mhz (factory default) *********************************************/ /******************************************************* 060502 Modified for ATmega128 circuit: LED 1 k Ohm ________________ |\ | | | --------| >|----| |-------- | |/ | |_______________| | | | | | o o +5V PC5 ********************************************************/ #include void delay() { int i, j; for (i = 0; i < 10000; i++) for (j = 0; j < 10000; j++); } int main(void) { /* INITIALIZE */ /* enable PC5 as output */ DDRC|= (1<