U23 2007/Evil Solutions/takt.c

From C4 Wiki
< U23 2007‎ | Evil Solutions
Revision as of 14:55, 7 June 2007 by Pylon (talk | contribs) (Kategorie)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
#include <avr/io.h>

void delay (uint8_t);

int main(){

DDRA = 0xFF;


while(1){
PORTA = 0x01;
delay(1);
PORTA = 0x00;
delay(1);
}

return 0;
}


void delay(uint8_t adelay){

uint16_t a;
uint16_t b;

for (a=0; a < adelay; a++)
	for (b=0; b < 0xFF; b++){
	PORTB = 0x00;
	/*nix*/
	}
}