Commit a7b6498c1396f4a92b0e266fc69029c2678a54ef
1 parent
9ebdcefb
Tentative de test des boutons mais qui marche pas (dans compteurLettre)
Showing
1 changed file
with
26 additions
and
13 deletions
Show diff stats
compteurLettre.txt
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | .equ SPL = 0x3D |
15 | 15 | |
16 | 16 | .def selAfficheur = r19 |
17 | -.def compteur = r20 | |
17 | +.def tmp = r20 | |
18 | 18 | .def seg = r21 |
19 | 19 | .def aff0 = r0 |
20 | 20 | .def aff1 = r1 |
... | ... | @@ -31,13 +31,13 @@ |
31 | 31 | |
32 | 32 | .org 0x0080 |
33 | 33 | afficheur: |
34 | - .DB 0x3F, 0x30, 0x6D, 0x79, 0x72, 0x5B, 0x5F, 0x31, 0x7F, 0x7B, 0x77, 0x40, 0x4c, 0x7c, 0x4f, 0x47, 0x40, 0x76, 0x04, 0x3c, 0x40, 0x0E, 0x37, 0x54, 0x5c, 0x40, 0x40, 0x44, 0x5b, 0x4e, 0x1c, 0x1c, 0x40, 0x40, 0x40, 0x40, 0x63 | |
35 | - ; 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, ° | |
34 | + .DB 0x3F, 0x30, 0x6D, 0x79, 0x72, 0x5B, 0x5F, 0x31, 0x7F, 0x7B, 0x77, 0x40, 0x4c, 0x7c, 0x4f, 0x47, 0x40, 0x76, 0x04, 0x3c, 0x40, 0x0E, 0x37, 0x54, 0x5c, 0x40, 0x40, 0x44, 0x5b, 0x4e, 0x1c, 0x1c, 0x40, 0x40, 0x40, 0x40, 0x63, 0x00 | |
35 | + ; 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, °, space | |
36 | 36 | |
37 | 37 | |
38 | 38 | debut: |
39 | 39 | DDRA@IO <- 0xFF |
40 | - DDRC@IO <- 0xFF | |
40 | + DDRC@IO <- 0x0F | |
41 | 41 | TTCR0A@IO <- 0x01 |
42 | 42 | TTCR0B@IO <- 0x03 |
43 | 43 | TMSK0 <- 0x01 |
... | ... | @@ -47,11 +47,11 @@ debut: |
47 | 47 | boucle: |
48 | 48 | |
49 | 49 | ; On change de chiffre |
50 | - aff3 <- aff2 | |
51 | - aff2 <- aff1 | |
52 | - aff1 <- aff0 | |
53 | - inc aff0 | |
54 | - si aff0 > 36 alors aff0 <- 0 | |
50 | + aff0 <- aff1 | |
51 | + aff1 <- aff2 | |
52 | + aff2 <- aff3 | |
53 | + inc aff3 | |
54 | + si aff3 > 37 alors aff3 <- 0 | |
55 | 55 | |
56 | 56 | |
57 | 57 | |
... | ... | @@ -85,9 +85,22 @@ tmr: |
85 | 85 | lsl selAfficheur |
86 | 86 | si selAfficheur > 8 alors selafficheur <- 1 |
87 | 87 | portc@IO <- 0xff - selAfficheur |
88 | - si selAfficheur == 1 alors porta@IO <- afficheur@ROM[aff3] | |
89 | - si selAfficheur == 2 alors porta@IO <- afficheur@ROM[aff2] | |
90 | - si selAfficheur == 4 alors porta@IO <- afficheur@ROM[aff1] | |
91 | - si selAfficheur == 8 alors porta@IO <- afficheur@ROM[aff0] | |
88 | + r18 <- pinC@IO | |
89 | + lsr r18 | |
90 | + lsr r18 | |
91 | + lsr r18 | |
92 | + lsr r18 | |
93 | + tmp <- r18 | |
94 | + and tmp, aff3 | |
95 | + si selAfficheur == 1 alors porta@IO <- afficheur@ROM[tmp] | |
96 | + tmp <- r18 | |
97 | + and tmp, aff2 | |
98 | + si selAfficheur == 2 alors porta@IO <- afficheur@ROM[tmp] | |
99 | + tmp <- r18 | |
100 | + and tmp , aff1 | |
101 | + si selAfficheur == 4 alors porta@IO <- afficheur@ROM[tmp] | |
102 | + tmp <- r18 | |
103 | + and tmp, aff0 | |
104 | + si selAfficheur == 8 alors porta@IO <- afficheur@ROM[tmp] | |
92 | 105 | sei |
93 | 106 | ret | ... | ... |