All pastes #728651 Raw Edit

Someone

public c v1 · immutable
·published 2007-10-07 06:10 UTC
rendered paste body
#include <avr\io.h>#include <avr\interrupt.h>#define outp(a, b) b = a/*contains total ticks */unsigned long ticks = 0;/* interrupt handler */ISR(SIG_OVERFLOW0) {	ticks++;}int main (void){	/*enable timer overflow interrupt*/	outp((1<<TOV0), TIMSK);	/*set timer counter initial value*/	TCNT0=0x00;	/*start timer without presscaler*/	outp((1<<CS00), TCCR0);	/* enable interrupts */	ticks = 0;	sei(); 	while(1);}