Commit 0ad2b0a8b73eff505e5fd41e7f78949053f2f9ff
1 parent
15801ada
Programme pour tester les boutons
Showing
1 changed file
with
39 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,39 @@ |
1 | +.equ PINA = 0x00 ; définition des adresses des ports | |
2 | +.equ DDRA = 0x01 | |
3 | +.equ PORTA = 0x02 | |
4 | +.equ PINC = 0x06 | |
5 | +.equ DDRC = 0x07 | |
6 | +.equ PORTC = 0x08 | |
7 | + | |
8 | +.equ RAMEND = 0x21FF | |
9 | +.equ SPH = 0x3E ; initialisation de la pile | |
10 | +.equ SPL = 0x3D | |
11 | + | |
12 | +.org 0x000 | |
13 | + ; Vecteur RESET | |
14 | + jmp debut | |
15 | + | |
16 | + | |
17 | +.org 0x0080 | |
18 | + | |
19 | + | |
20 | +debut: | |
21 | + DDRA@IO <- 0xFF | |
22 | + DDRC@IO <- 0x0F | |
23 | + PORTC@IO <- 0x00 | |
24 | + SEI | |
25 | + | |
26 | +boucle: | |
27 | + PORTA@IO <- PINC@IO | |
28 | + ; PORTA@IO <- 0xAA | |
29 | + saut boucle | |
30 | + | |
31 | +tempo: | |
32 | + ldi r24,8 | |
33 | +tempoA: | |
34 | + subi r22,1 | |
35 | + sbci r23,0 | |
36 | + sbci r24,0 | |
37 | + brcc tempoA | |
38 | + ret | |
39 | + | ... | ... |