X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=led_plex%2Ftimer.asm;h=c61967a51b728c12b4378c43b506ea1bdf39041f;hb=1ae3689334b273952e70ebbde465caa68fd14efd;hp=e371f65095ab9f87f14599ad602fd1bf0cb594cd;hpb=87ef21d9eacec01abdbf3306dd2493aecf0b4afb;p=my-code%2Fatmel.git diff --git a/led_plex/timer.asm b/led_plex/timer.asm index e371f65..c61967a 100644 --- a/led_plex/timer.asm +++ b/led_plex/timer.asm @@ -1,2 +1,18 @@ ; timer functions +TIMER0_INIT: + + ; clock select + ldi tmp1,0x02 + out TCCR0B,tmp1 + + ret + +TIMER0_INT_INIT: + + ; overflow interrupt + ldi tmp1,0x02 + out TIMSK,tmp1 + + ret +