projects
/
my-code
/
atmel.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
changed to only send timer values on level change (first initial checkin)
[my-code/atmel.git]
/
monolyzer
/
port.asm
1
; port functions
2
3
PORT_INIT:
4
5
; port d 2 -> input (useless, default)
6
cbi DDRD,2
7
8
; switch pull-up off (useless, default)
9
cbi DDRD,2
10
11
; port d pin 6 -> output
12
sbi DDRD,6
13
14
; port d pin 6 -> high
15
cbi PORTD,6
16
17
; port d 3 -> output (debug 2)
18
sbi DDRD,3
19
20
ret
21
22
23
INT0_IR_CONF:
24
25
; trigger interrupt on falling and rising edge
26
in tmp1,MCUCR
27
cbr tmp1,(1<<ISC01)
28
sbr tmp1,(1<<ISC00)
29
out MCUCR,tmp1
30
31
ret
32
33
INT0_IR_ENABLE:
34
35
; enable interrupt
36
in tmp1,GIMSK
37
sbr tmp1,(1<<INT0)
38
out GIMSK,tmp1
39
40
ret
41
42
INT0_IR_DISABLE:
43
44
; disable interrupt
45
in tmp1,GIMSK
46
cbr tmp1,(1<<INT0)
47
out GIMSK,tmp1
48
49
ret
50