projects
/
my-code
/
atmel.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
basic implementation done ...
[my-code/atmel.git]
/
led_plex
/
timer.asm
1
; timer functions
2
3
TIMER0_INIT:
4
5
; clock select
6
.ifdef DEBUG_PORTS
7
ldi tmp1,0x03
8
.else
9
ldi tmp1,0x02
10
.endif
11
out TCCR0B,tmp1
12
13
ret
14
15
TIMER1_INIT:
16
17
; clock select
18
ldi tmp1,0x04
19
out TCCR1B,tmp1
20
21
ret
22
23
TIMER0_INT_INIT:
24
25
; overflow interrupt
26
ldi tmp1,0x02
27
out TIMSK,tmp1
28
29
ret
30
31
TIMER1_INT_INIT:
32
33
; overflow interrupt
34
in tmp1,TIMSK
35
ori tmp1,(1<<7)
36
out TIMSK,tmp1
37
38
ret
39