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