X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fatmel.git;a=blobdiff_plain;f=monolyzer%2Ftimer.asm;fp=monolyzer%2Ftimer.asm;h=c9ef07462b06cdf30a88e30882a080b099fb088b;hp=0000000000000000000000000000000000000000;hb=41d981471644f11151e4f1691c4a29c44fb12410;hpb=32e3f51bc0f4248019379fe784d38c7fb770f952 diff --git a/monolyzer/timer.asm b/monolyzer/timer.asm new file mode 100644 index 0000000..c9ef074 --- /dev/null +++ b/monolyzer/timer.asm @@ -0,0 +1,18 @@ +; timer functions + +TIMER0_INIT: + + ; clock select, no prescaling + ldi tmp1,0x01 + out TCCR0B,tmp1 + + ret + +TIMER0_INT_INIT: + + ; overflow interrupt + ldi tmp1,0x02 + out TIMSK,tmp1 + + ret +