nixie_clock/Debug/Nixie clock.lss

4292 lines
164 KiB
Plaintext

Nixie clock.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 00000000 00800100 000016a4 00001738 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 000016a4 00000000 00000000 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .bss 0000002b 00800100 00800100 00001738 2**0
ALLOC
3 .comment 0000005c 00000000 00000000 00001738 2**0
CONTENTS, READONLY
4 .debug_aranges 000002a0 00000000 00000000 00001794 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_info 0000391a 00000000 00000000 00001a34 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_abbrev 00000e5f 00000000 00000000 0000534e 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_line 0000101d 00000000 00000000 000061ad 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_frame 00000648 00000000 00000000 000071cc 2**2
CONTENTS, READONLY, DEBUGGING
9 .debug_str 00000b41 00000000 00000000 00007814 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_loc 000023d5 00000000 00000000 00008355 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_ranges 000004c8 00000000 00000000 0000a72a 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
uint8_t PCF8574::send(uint8_t data, uint8_t read)
{
uint8_t read_data;
//SCK Config (27.77Khz)
TWBR = 0x0A; //Bit rate division à 10
0: 0c 94 36 00 jmp 0x6c ; 0x6c <__ctors_end>
4: 0c 94 be 09 jmp 0x137c ; 0x137c <__vector_1>
TWSR = (TWSR & ~((1<<TWPS0) & (1<<TWPS1))); //TWPS à 0
8: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
c: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
//I2C Init
TWCR = (1<<TWEN); //Active l'I2C
10: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
14: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
TWCR = (1<<TWEN)|(1<<TWSTA)|(1<<TWINT); //Envoi la condiont de démarage
18: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
1c: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
;
//DS1307 adresse write
TWDR = adresse_DS1307|read ; //Inscrit l'adresse, Mode
20: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
24: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
TWCR = (1<<TWEN)|(1<<TWINT); //Envoi l'adresse
28: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
2c: 0c 94 fd 0a jmp 0x15fa ; 0x15fa <__vector_11>
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
30: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
34: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
;
//Data send
if(!read) //Si écriture
38: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
TWDR = data; //Inscrit les donnée
3c: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
TWCR = (1<<TWEN)|(1<<TWINT); //Envoi les donnée
40: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
44: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
48: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
4c: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
;
if(read) //Si lecture
50: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
read_data = TWDR;
54: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
//Stop condition
TWCR = (1<<TWEN)|(1<<TWINT)|(1<<TWSTO);
58: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
while((TWCR&(1<<TWSTO)))
5c: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
60: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
64: 0c 94 5e 00 jmp 0xbc ; 0xbc <__bad_interrupt>
00000068 <__ctors_start>:
#else
//round up by default
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
#endif
__builtin_avr_delay_cycles(__ticks_dc);
68: c8 06 cpc r12, r24
6a: ed 09 sbc r30, r13
0000006c <__ctors_end>:
6c: 11 24 eor r1, r1
6e: 1f be out 0x3f, r1 ; 63
70: cf ef ldi r28, 0xFF ; 255
;
_delay_ms(1);
TWCR &= (~(1<<TWEN));
72: d8 e0 ldi r29, 0x08 ; 8
74: de bf out 0x3e, r29 ; 62
76: cd bf out 0x3d, r28 ; 61
00000078 <__do_copy_data>:
78: 11 e0 ldi r17, 0x01 ; 1
7a: a0 e0 ldi r26, 0x00 ; 0
if(read)
7c: b1 e0 ldi r27, 0x01 ; 1
7e: e4 ea ldi r30, 0xA4 ; 164
return read_data;
80: f6 e1 ldi r31, 0x16 ; 22
82: 02 c0 rjmp .+4 ; 0x88 <__do_copy_data+0x10>
}
84: 05 90 lpm r0, Z+
86: 0d 92 st X+, r0
88: a0 30 cpi r26, 0x00 ; 0
8a: b1 07 cpc r27, r17
8c: d9 f7 brne .-10 ; 0x84 <__do_copy_data+0xc>
0000008e <__do_clear_bss>:
8e: 21 e0 ldi r18, 0x01 ; 1
90: a0 e0 ldi r26, 0x00 ; 0
92: b1 e0 ldi r27, 0x01 ; 1
94: 01 c0 rjmp .+2 ; 0x98 <.do_clear_bss_start>
00000096 <.do_clear_bss_loop>:
96: 1d 92 st X+, r1
00000098 <.do_clear_bss_start>:
98: ab 32 cpi r26, 0x2B ; 43
9a: b2 07 cpc r27, r18
9c: e1 f7 brne .-8 ; 0x96 <.do_clear_bss_loop>
0000009e <__do_global_ctors>:
9e: 10 e0 ldi r17, 0x00 ; 0
a0: cc e6 ldi r28, 0x6C ; 108
a2: d0 e0 ldi r29, 0x00 ; 0
a4: 04 c0 rjmp .+8 ; 0xae <__do_global_ctors+0x10>
a6: 22 97 sbiw r28, 0x02 ; 2
a8: fe 01 movw r30, r28
aa: 0e 94 4c 0b call 0x1698 ; 0x1698 <__tablejump__>
ae: c8 36 cpi r28, 0x68 ; 104
b0: d1 07 cpc r29, r17
b2: c9 f7 brne .-14 ; 0xa6 <__do_global_ctors+0x8>
b4: 0e 94 3f 0b call 0x167e ; 0x167e <main>
b8: 0c 94 50 0b jmp 0x16a0 ; 0x16a0 <_exit>
000000bc <__bad_interrupt>:
bc: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
000000c0 <_Z10int_to_bcdi>:
TIMSK0 = _BV(OCIE0A); //Enable interupt
}
int int_to_bcd(int val)
{
int high = 0;
while (val >= 10) // Count tens
c0: 8a 30 cpi r24, 0x0A ; 10
c2: 91 05 cpc r25, r1
c4: 4c f0 brlt .+18 ; 0xd8 <_Z10int_to_bcdi+0x18>
OCR0A = 0x01;
TIMSK0 = _BV(OCIE0A); //Enable interupt
}
int int_to_bcd(int val)
{
int high = 0;
c6: 20 e0 ldi r18, 0x00 ; 0
c8: 30 e0 ldi r19, 0x00 ; 0
while (val >= 10) // Count tens
{
high++;
ca: 2f 5f subi r18, 0xFF ; 255
cc: 3f 4f sbci r19, 0xFF ; 255
val -= 10;
ce: 0a 97 sbiw r24, 0x0a ; 10
TIMSK0 = _BV(OCIE0A); //Enable interupt
}
int int_to_bcd(int val)
{
int high = 0;
while (val >= 10) // Count tens
d0: 8a 30 cpi r24, 0x0A ; 10
d2: 91 05 cpc r25, r1
d4: d4 f7 brge .-12 ; 0xca <_Z10int_to_bcdi+0xa>
d6: 02 c0 rjmp .+4 ; 0xdc <_Z10int_to_bcdi+0x1c>
OCR0A = 0x01;
TIMSK0 = _BV(OCIE0A); //Enable interupt
}
int int_to_bcd(int val)
{
int high = 0;
d8: 20 e0 ldi r18, 0x00 ; 0
da: 30 e0 ldi r19, 0x00 ; 0
{
high++;
val -= 10;
}
return (high << 4) | val;
dc: 22 95 swap r18
de: 32 95 swap r19
e0: 30 7f andi r19, 0xF0 ; 240
e2: 32 27 eor r19, r18
e4: 20 7f andi r18, 0xF0 ; 240
e6: 32 27 eor r19, r18
}
e8: 82 2b or r24, r18
ea: 93 2b or r25, r19
ec: 08 95 ret
000000ee <_Z10setup_pinsv>:
void setup_pins()
{
USART_ini();
ee: 0e 94 22 0b call 0x1644 ; 0x1644 <_Z9USART_iniv>
DDRD &= LOW(1<<PIND2);
f2: 52 98 cbi 0x0a, 2 ; 10
DDRC &= LOW(1<<PORTC5|1<<PORTC4);
f4: 87 b1 in r24, 0x07 ; 7
f6: 8f 7c andi r24, 0xCF ; 207
f8: 87 b9 out 0x07, r24 ; 7
DDRB &= LOW(1<<BP_CONF|1<<BP_MOINS|1<<BP_PLUS); //Config des entrée pour les bp
fa: 84 b1 in r24, 0x04 ; 4
fc: 88 7f andi r24, 0xF8 ; 248
fe: 84 b9 out 0x04, r24 ; 4
DDRC |= 1<<SR_HEUR|1<<SR_MINUTE|1<<SR_SECONDE; //Config des sortie Pour les pin enable
100: 87 b1 in r24, 0x07 ; 7
102: 87 60 ori r24, 0x07 ; 7
104: 87 b9 out 0x07, r24 ; 7
PORTC &= LOW(1<<SR_HEUR|1<<SR_MINUTE|1<<SR_SECONDE); //Active tous les registre a décalage
106: 88 b1 in r24, 0x08 ; 8
108: 88 7f andi r24, 0xF8 ; 248
10a: 88 b9 out 0x08, r24 ; 8
DDRB |= LED_RED | LED_GREEN | LED_BLUE ; //Config des sortie pour les LED
10c: 84 b1 in r24, 0x04 ; 4
10e: 88 63 ori r24, 0x38 ; 56
110: 84 b9 out 0x04, r24 ; 4
PORTB &= LOW(LED_RED|LED_GREEN|LED_BLUE); //Mise à 0 de toutes les LED
112: 85 b1 in r24, 0x05 ; 5
114: 87 7c andi r24, 0xC7 ; 199
116: 85 b9 out 0x05, r24 ; 5
if(rtc.r_seconde() == 0x80)
118: 8d e0 ldi r24, 0x0D ; 13
11a: 91 e0 ldi r25, 0x01 ; 1
11c: 0e 94 b0 0a call 0x1560 ; 0x1560 <_ZN6ds13079r_secondeEv>
120: 80 38 cpi r24, 0x80 ; 128
122: 29 f4 brne .+10 ; 0x12e <_Z10setup_pinsv+0x40>
rtc.w_seconde(0x00);
124: 60 e0 ldi r22, 0x00 ; 0
126: 8d e0 ldi r24, 0x0D ; 13
128: 91 e0 ldi r25, 0x01 ; 1
12a: 0e 94 c8 0a call 0x1590 ; 0x1590 <_ZN6ds13079w_secondeEh>
12e: 08 95 ret
00000130 <_Z14affichage_heurv>:
}
void affichage_heur()
{
uint8_t envoi = rtc.r_heur();
130: 8d e0 ldi r24, 0x0D ; 13
132: 91 e0 ldi r25, 0x01 ; 1
134: 0e 94 b8 0a call 0x1570 ; 0x1570 <_ZN6ds13076r_heurEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
138: 90 e0 ldi r25, 0x00 ; 0
13a: bc 01 movw r22, r24
13c: 62 95 swap r22
13e: 72 95 swap r23
140: 70 7f andi r23, 0xF0 ; 240
142: 76 27 eor r23, r22
144: 60 7f andi r22, 0xF0 ; 240
146: 76 27 eor r23, r22
148: 95 95 asr r25
14a: 87 95 ror r24
14c: 95 95 asr r25
14e: 87 95 ror r24
150: 95 95 asr r25
152: 87 95 ror r24
154: 95 95 asr r25
156: 87 95 ror r24
158: 68 2b or r22, r24
shiftRegister.send(envoi, 0);
15a: 40 e0 ldi r20, 0x00 ; 0
15c: 83 e0 ldi r24, 0x03 ; 3
15e: 91 e0 ldi r25, 0x01 ; 1
160: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_minute();
164: 8d e0 ldi r24, 0x0D ; 13
166: 91 e0 ldi r25, 0x01 ; 1
168: 0e 94 b4 0a call 0x1568 ; 0x1568 <_ZN6ds13078r_minuteEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
16c: 90 e0 ldi r25, 0x00 ; 0
16e: bc 01 movw r22, r24
170: 62 95 swap r22
172: 72 95 swap r23
174: 70 7f andi r23, 0xF0 ; 240
176: 76 27 eor r23, r22
178: 60 7f andi r22, 0xF0 ; 240
17a: 76 27 eor r23, r22
17c: 95 95 asr r25
17e: 87 95 ror r24
180: 95 95 asr r25
182: 87 95 ror r24
184: 95 95 asr r25
186: 87 95 ror r24
188: 95 95 asr r25
18a: 87 95 ror r24
18c: 68 2b or r22, r24
shiftRegister.send(envoi, 0);
18e: 40 e0 ldi r20, 0x00 ; 0
190: 83 e0 ldi r24, 0x03 ; 3
192: 91 e0 ldi r25, 0x01 ; 1
194: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_seconde();
198: 8d e0 ldi r24, 0x0D ; 13
19a: 91 e0 ldi r25, 0x01 ; 1
19c: 0e 94 b0 0a call 0x1560 ; 0x1560 <_ZN6ds13079r_secondeEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
1a0: 90 e0 ldi r25, 0x00 ; 0
1a2: bc 01 movw r22, r24
1a4: 62 95 swap r22
1a6: 72 95 swap r23
1a8: 70 7f andi r23, 0xF0 ; 240
1aa: 76 27 eor r23, r22
1ac: 60 7f andi r22, 0xF0 ; 240
1ae: 76 27 eor r23, r22
1b0: 95 95 asr r25
1b2: 87 95 ror r24
1b4: 95 95 asr r25
1b6: 87 95 ror r24
1b8: 95 95 asr r25
1ba: 87 95 ror r24
1bc: 95 95 asr r25
1be: 87 95 ror r24
1c0: 68 2b or r22, r24
shiftRegister.send(envoi, 0);
1c2: 40 e0 ldi r20, 0x00 ; 0
1c4: 83 e0 ldi r24, 0x03 ; 3
1c6: 91 e0 ldi r25, 0x01 ; 1
1c8: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
shiftRegister.confirm();
1cc: 83 e0 ldi r24, 0x03 ; 3
1ce: 91 e0 ldi r25, 0x01 ; 1
1d0: 0e 94 9c 07 call 0xf38 ; 0xf38 <_ZN7hc745957confirmEv>
1d4: 08 95 ret
000001d6 <_Z14affichage_datev>:
}
void affichage_date()
{
uint8_t envoi = rtc.r_jour();
1d6: 8d e0 ldi r24, 0x0D ; 13
1d8: 91 e0 ldi r25, 0x01 ; 1
1da: 0e 94 bc 0a call 0x1578 ; 0x1578 <_ZN6ds13076r_jourEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
1de: 90 e0 ldi r25, 0x00 ; 0
1e0: bc 01 movw r22, r24
1e2: 62 95 swap r22
1e4: 72 95 swap r23
1e6: 70 7f andi r23, 0xF0 ; 240
1e8: 76 27 eor r23, r22
1ea: 60 7f andi r22, 0xF0 ; 240
1ec: 76 27 eor r23, r22
1ee: 95 95 asr r25
1f0: 87 95 ror r24
1f2: 95 95 asr r25
1f4: 87 95 ror r24
1f6: 95 95 asr r25
1f8: 87 95 ror r24
1fa: 95 95 asr r25
1fc: 87 95 ror r24
1fe: 68 2b or r22, r24
shiftRegister.send(envoi, false);
200: 40 e0 ldi r20, 0x00 ; 0
202: 83 e0 ldi r24, 0x03 ; 3
204: 91 e0 ldi r25, 0x01 ; 1
206: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_moi();
20a: 8d e0 ldi r24, 0x0D ; 13
20c: 91 e0 ldi r25, 0x01 ; 1
20e: 0e 94 c0 0a call 0x1580 ; 0x1580 <_ZN6ds13075r_moiEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
212: 90 e0 ldi r25, 0x00 ; 0
214: bc 01 movw r22, r24
216: 62 95 swap r22
218: 72 95 swap r23
21a: 70 7f andi r23, 0xF0 ; 240
21c: 76 27 eor r23, r22
21e: 60 7f andi r22, 0xF0 ; 240
220: 76 27 eor r23, r22
222: 95 95 asr r25
224: 87 95 ror r24
226: 95 95 asr r25
228: 87 95 ror r24
22a: 95 95 asr r25
22c: 87 95 ror r24
22e: 95 95 asr r25
230: 87 95 ror r24
232: 68 2b or r22, r24
shiftRegister.send(envoi, false);
234: 40 e0 ldi r20, 0x00 ; 0
236: 83 e0 ldi r24, 0x03 ; 3
238: 91 e0 ldi r25, 0x01 ; 1
23a: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_year();
23e: 8d e0 ldi r24, 0x0D ; 13
240: 91 e0 ldi r25, 0x01 ; 1
242: 0e 94 c4 0a call 0x1588 ; 0x1588 <_ZN6ds13076r_yearEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
246: 90 e0 ldi r25, 0x00 ; 0
248: bc 01 movw r22, r24
24a: 62 95 swap r22
24c: 72 95 swap r23
24e: 70 7f andi r23, 0xF0 ; 240
250: 76 27 eor r23, r22
252: 60 7f andi r22, 0xF0 ; 240
254: 76 27 eor r23, r22
256: 95 95 asr r25
258: 87 95 ror r24
25a: 95 95 asr r25
25c: 87 95 ror r24
25e: 95 95 asr r25
260: 87 95 ror r24
262: 95 95 asr r25
264: 87 95 ror r24
266: 68 2b or r22, r24
shiftRegister.send(envoi, false);
268: 40 e0 ldi r20, 0x00 ; 0
26a: 83 e0 ldi r24, 0x03 ; 3
26c: 91 e0 ldi r25, 0x01 ; 1
26e: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
shiftRegister.confirm();
272: 83 e0 ldi r24, 0x03 ; 3
274: 91 e0 ldi r25, 0x01 ; 1
276: 0e 94 9c 07 call 0xf38 ; 0xf38 <_ZN7hc745957confirmEv>
27a: 08 95 ret
0000027c <_Z17routine_affichagev>:
shiftRegister.send(0xFF, false);
shiftRegister.confirm();
}
void routine_affichage()
{
uint8_t secondes_var = rtc.r_seconde();
27c: 8d e0 ldi r24, 0x0D ; 13
27e: 91 e0 ldi r25, 0x01 ; 1
280: 0e 94 b0 0a call 0x1560 ; 0x1560 <_ZN6ds13079r_secondeEv>
if(secondes_var >= 0x20 && secondes_var <= 0x30 && 1==2) //Affiche la date pandant 10 seconde
affichage_date();
else
affichage_heur();
284: 0e 94 98 00 call 0x130 ; 0x130 <_Z14affichage_heurv>
288: 08 95 ret
0000028a <_Z12clignotementib>:
}
void clignotement(int n, bool date)
{
n++;
28a: 01 96 adiw r24, 0x01 ; 1
uint8_t envoi;
if(date)
28c: 66 23 and r22, r22
28e: 09 f4 brne .+2 ; 0x292 <_Z12clignotementib+0x8>
290: c8 c0 rjmp .+400 ; 0x422 <_Z12clignotementib+0x198>
{
switch(n)
292: 82 30 cpi r24, 0x02 ; 2
294: 91 05 cpc r25, r1
296: 09 f4 brne .+2 ; 0x29a <_Z12clignotementib+0x10>
298: 46 c0 rjmp .+140 ; 0x326 <_Z12clignotementib+0x9c>
29a: 83 30 cpi r24, 0x03 ; 3
29c: 91 05 cpc r25, r1
29e: 09 f4 brne .+2 ; 0x2a2 <_Z12clignotementib+0x18>
2a0: 81 c0 rjmp .+258 ; 0x3a4 <_Z12clignotementib+0x11a>
2a2: 01 97 sbiw r24, 0x01 ; 1
2a4: 09 f0 breq .+2 ; 0x2a8 <_Z12clignotementib+0x1e>
2a6: 84 c1 rjmp .+776 ; 0x5b0 <_Z12clignotementib+0x326>
{
case 1:
envoi = 0xff;
shiftRegister.send(envoi, false);
2a8: 40 e0 ldi r20, 0x00 ; 0
2aa: 6f ef ldi r22, 0xFF ; 255
2ac: 83 e0 ldi r24, 0x03 ; 3
2ae: 91 e0 ldi r25, 0x01 ; 1
2b0: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_moi();
2b4: 8d e0 ldi r24, 0x0D ; 13
2b6: 91 e0 ldi r25, 0x01 ; 1
2b8: 0e 94 c0 0a call 0x1580 ; 0x1580 <_ZN6ds13075r_moiEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
2bc: 90 e0 ldi r25, 0x00 ; 0
2be: bc 01 movw r22, r24
2c0: 62 95 swap r22
2c2: 72 95 swap r23
2c4: 70 7f andi r23, 0xF0 ; 240
2c6: 76 27 eor r23, r22
2c8: 60 7f andi r22, 0xF0 ; 240
2ca: 76 27 eor r23, r22
2cc: 95 95 asr r25
2ce: 87 95 ror r24
2d0: 95 95 asr r25
2d2: 87 95 ror r24
2d4: 95 95 asr r25
2d6: 87 95 ror r24
2d8: 95 95 asr r25
2da: 87 95 ror r24
2dc: 68 2b or r22, r24
shiftRegister.send(envoi, false);
2de: 40 e0 ldi r20, 0x00 ; 0
2e0: 83 e0 ldi r24, 0x03 ; 3
2e2: 91 e0 ldi r25, 0x01 ; 1
2e4: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_year();
2e8: 8d e0 ldi r24, 0x0D ; 13
2ea: 91 e0 ldi r25, 0x01 ; 1
2ec: 0e 94 c4 0a call 0x1588 ; 0x1588 <_ZN6ds13076r_yearEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
2f0: 90 e0 ldi r25, 0x00 ; 0
2f2: bc 01 movw r22, r24
2f4: 62 95 swap r22
2f6: 72 95 swap r23
2f8: 70 7f andi r23, 0xF0 ; 240
2fa: 76 27 eor r23, r22
2fc: 60 7f andi r22, 0xF0 ; 240
2fe: 76 27 eor r23, r22
300: 95 95 asr r25
302: 87 95 ror r24
304: 95 95 asr r25
306: 87 95 ror r24
308: 95 95 asr r25
30a: 87 95 ror r24
30c: 95 95 asr r25
30e: 87 95 ror r24
310: 68 2b or r22, r24
shiftRegister.send(envoi, false);
312: 40 e0 ldi r20, 0x00 ; 0
314: 83 e0 ldi r24, 0x03 ; 3
316: 91 e0 ldi r25, 0x01 ; 1
318: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
shiftRegister.confirm();
31c: 83 e0 ldi r24, 0x03 ; 3
31e: 91 e0 ldi r25, 0x01 ; 1
320: 0e 94 9c 07 call 0xf38 ; 0xf38 <_ZN7hc745957confirmEv>
break;
324: 08 95 ret
case 2:
envoi = rtc.r_jour();
326: 8d e0 ldi r24, 0x0D ; 13
328: 91 e0 ldi r25, 0x01 ; 1
32a: 0e 94 bc 0a call 0x1578 ; 0x1578 <_ZN6ds13076r_jourEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
32e: 90 e0 ldi r25, 0x00 ; 0
330: bc 01 movw r22, r24
332: 62 95 swap r22
334: 72 95 swap r23
336: 70 7f andi r23, 0xF0 ; 240
338: 76 27 eor r23, r22
33a: 60 7f andi r22, 0xF0 ; 240
33c: 76 27 eor r23, r22
33e: 95 95 asr r25
340: 87 95 ror r24
342: 95 95 asr r25
344: 87 95 ror r24
346: 95 95 asr r25
348: 87 95 ror r24
34a: 95 95 asr r25
34c: 87 95 ror r24
34e: 68 2b or r22, r24
shiftRegister.send(envoi, false);
350: 40 e0 ldi r20, 0x00 ; 0
352: 83 e0 ldi r24, 0x03 ; 3
354: 91 e0 ldi r25, 0x01 ; 1
356: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = 0xff;
shiftRegister.send(envoi, false);
35a: 40 e0 ldi r20, 0x00 ; 0
35c: 6f ef ldi r22, 0xFF ; 255
35e: 83 e0 ldi r24, 0x03 ; 3
360: 91 e0 ldi r25, 0x01 ; 1
362: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_year();
366: 8d e0 ldi r24, 0x0D ; 13
368: 91 e0 ldi r25, 0x01 ; 1
36a: 0e 94 c4 0a call 0x1588 ; 0x1588 <_ZN6ds13076r_yearEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
36e: 90 e0 ldi r25, 0x00 ; 0
370: bc 01 movw r22, r24
372: 62 95 swap r22
374: 72 95 swap r23
376: 70 7f andi r23, 0xF0 ; 240
378: 76 27 eor r23, r22
37a: 60 7f andi r22, 0xF0 ; 240
37c: 76 27 eor r23, r22
37e: 95 95 asr r25
380: 87 95 ror r24
382: 95 95 asr r25
384: 87 95 ror r24
386: 95 95 asr r25
388: 87 95 ror r24
38a: 95 95 asr r25
38c: 87 95 ror r24
38e: 68 2b or r22, r24
shiftRegister.send(envoi, false);
390: 40 e0 ldi r20, 0x00 ; 0
392: 83 e0 ldi r24, 0x03 ; 3
394: 91 e0 ldi r25, 0x01 ; 1
396: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
shiftRegister.confirm();
39a: 83 e0 ldi r24, 0x03 ; 3
39c: 91 e0 ldi r25, 0x01 ; 1
39e: 0e 94 9c 07 call 0xf38 ; 0xf38 <_ZN7hc745957confirmEv>
break;
3a2: 08 95 ret
case 3:
envoi = rtc.r_jour();
3a4: 8d e0 ldi r24, 0x0D ; 13
3a6: 91 e0 ldi r25, 0x01 ; 1
3a8: 0e 94 bc 0a call 0x1578 ; 0x1578 <_ZN6ds13076r_jourEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
3ac: 90 e0 ldi r25, 0x00 ; 0
3ae: bc 01 movw r22, r24
3b0: 62 95 swap r22
3b2: 72 95 swap r23
3b4: 70 7f andi r23, 0xF0 ; 240
3b6: 76 27 eor r23, r22
3b8: 60 7f andi r22, 0xF0 ; 240
3ba: 76 27 eor r23, r22
3bc: 95 95 asr r25
3be: 87 95 ror r24
3c0: 95 95 asr r25
3c2: 87 95 ror r24
3c4: 95 95 asr r25
3c6: 87 95 ror r24
3c8: 95 95 asr r25
3ca: 87 95 ror r24
3cc: 68 2b or r22, r24
shiftRegister.send(envoi, false);
3ce: 40 e0 ldi r20, 0x00 ; 0
3d0: 83 e0 ldi r24, 0x03 ; 3
3d2: 91 e0 ldi r25, 0x01 ; 1
3d4: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_moi();
3d8: 8d e0 ldi r24, 0x0D ; 13
3da: 91 e0 ldi r25, 0x01 ; 1
3dc: 0e 94 c0 0a call 0x1580 ; 0x1580 <_ZN6ds13075r_moiEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
3e0: 90 e0 ldi r25, 0x00 ; 0
3e2: bc 01 movw r22, r24
3e4: 62 95 swap r22
3e6: 72 95 swap r23
3e8: 70 7f andi r23, 0xF0 ; 240
3ea: 76 27 eor r23, r22
3ec: 60 7f andi r22, 0xF0 ; 240
3ee: 76 27 eor r23, r22
3f0: 95 95 asr r25
3f2: 87 95 ror r24
3f4: 95 95 asr r25
3f6: 87 95 ror r24
3f8: 95 95 asr r25
3fa: 87 95 ror r24
3fc: 95 95 asr r25
3fe: 87 95 ror r24
400: 68 2b or r22, r24
shiftRegister.send(envoi, false);
402: 40 e0 ldi r20, 0x00 ; 0
404: 83 e0 ldi r24, 0x03 ; 3
406: 91 e0 ldi r25, 0x01 ; 1
408: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = 0xff;
shiftRegister.send(envoi, false);
40c: 40 e0 ldi r20, 0x00 ; 0
40e: 6f ef ldi r22, 0xFF ; 255
410: 83 e0 ldi r24, 0x03 ; 3
412: 91 e0 ldi r25, 0x01 ; 1
414: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
shiftRegister.confirm();
418: 83 e0 ldi r24, 0x03 ; 3
41a: 91 e0 ldi r25, 0x01 ; 1
41c: 0e 94 9c 07 call 0xf38 ; 0xf38 <_ZN7hc745957confirmEv>
break;
420: 08 95 ret
}
}
else
{
switch(n)
422: 82 30 cpi r24, 0x02 ; 2
424: 91 05 cpc r25, r1
426: 09 f4 brne .+2 ; 0x42a <_Z12clignotementib+0x1a0>
428: 46 c0 rjmp .+140 ; 0x4b6 <_Z12clignotementib+0x22c>
42a: 83 30 cpi r24, 0x03 ; 3
42c: 91 05 cpc r25, r1
42e: 09 f4 brne .+2 ; 0x432 <_Z12clignotementib+0x1a8>
430: 81 c0 rjmp .+258 ; 0x534 <_Z12clignotementib+0x2aa>
432: 01 97 sbiw r24, 0x01 ; 1
434: 09 f0 breq .+2 ; 0x438 <_Z12clignotementib+0x1ae>
436: bc c0 rjmp .+376 ; 0x5b0 <_Z12clignotementib+0x326>
{
case 1:
envoi = 0xff;
shiftRegister.send(envoi, 0);
438: 40 e0 ldi r20, 0x00 ; 0
43a: 6f ef ldi r22, 0xFF ; 255
43c: 83 e0 ldi r24, 0x03 ; 3
43e: 91 e0 ldi r25, 0x01 ; 1
440: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_minute();
444: 8d e0 ldi r24, 0x0D ; 13
446: 91 e0 ldi r25, 0x01 ; 1
448: 0e 94 b4 0a call 0x1568 ; 0x1568 <_ZN6ds13078r_minuteEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
44c: 90 e0 ldi r25, 0x00 ; 0
44e: bc 01 movw r22, r24
450: 62 95 swap r22
452: 72 95 swap r23
454: 70 7f andi r23, 0xF0 ; 240
456: 76 27 eor r23, r22
458: 60 7f andi r22, 0xF0 ; 240
45a: 76 27 eor r23, r22
45c: 95 95 asr r25
45e: 87 95 ror r24
460: 95 95 asr r25
462: 87 95 ror r24
464: 95 95 asr r25
466: 87 95 ror r24
468: 95 95 asr r25
46a: 87 95 ror r24
46c: 68 2b or r22, r24
shiftRegister.send(envoi, 0);
46e: 40 e0 ldi r20, 0x00 ; 0
470: 83 e0 ldi r24, 0x03 ; 3
472: 91 e0 ldi r25, 0x01 ; 1
474: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_seconde();
478: 8d e0 ldi r24, 0x0D ; 13
47a: 91 e0 ldi r25, 0x01 ; 1
47c: 0e 94 b0 0a call 0x1560 ; 0x1560 <_ZN6ds13079r_secondeEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
480: 90 e0 ldi r25, 0x00 ; 0
482: bc 01 movw r22, r24
484: 62 95 swap r22
486: 72 95 swap r23
488: 70 7f andi r23, 0xF0 ; 240
48a: 76 27 eor r23, r22
48c: 60 7f andi r22, 0xF0 ; 240
48e: 76 27 eor r23, r22
490: 95 95 asr r25
492: 87 95 ror r24
494: 95 95 asr r25
496: 87 95 ror r24
498: 95 95 asr r25
49a: 87 95 ror r24
49c: 95 95 asr r25
49e: 87 95 ror r24
4a0: 68 2b or r22, r24
shiftRegister.send(envoi, 0);
4a2: 40 e0 ldi r20, 0x00 ; 0
4a4: 83 e0 ldi r24, 0x03 ; 3
4a6: 91 e0 ldi r25, 0x01 ; 1
4a8: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
shiftRegister.confirm();
4ac: 83 e0 ldi r24, 0x03 ; 3
4ae: 91 e0 ldi r25, 0x01 ; 1
4b0: 0e 94 9c 07 call 0xf38 ; 0xf38 <_ZN7hc745957confirmEv>
break;
4b4: 08 95 ret
case 2:
envoi = rtc.r_heur();
4b6: 8d e0 ldi r24, 0x0D ; 13
4b8: 91 e0 ldi r25, 0x01 ; 1
4ba: 0e 94 b8 0a call 0x1570 ; 0x1570 <_ZN6ds13076r_heurEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
4be: 90 e0 ldi r25, 0x00 ; 0
4c0: bc 01 movw r22, r24
4c2: 62 95 swap r22
4c4: 72 95 swap r23
4c6: 70 7f andi r23, 0xF0 ; 240
4c8: 76 27 eor r23, r22
4ca: 60 7f andi r22, 0xF0 ; 240
4cc: 76 27 eor r23, r22
4ce: 95 95 asr r25
4d0: 87 95 ror r24
4d2: 95 95 asr r25
4d4: 87 95 ror r24
4d6: 95 95 asr r25
4d8: 87 95 ror r24
4da: 95 95 asr r25
4dc: 87 95 ror r24
4de: 68 2b or r22, r24
shiftRegister.send(envoi, 0);
4e0: 40 e0 ldi r20, 0x00 ; 0
4e2: 83 e0 ldi r24, 0x03 ; 3
4e4: 91 e0 ldi r25, 0x01 ; 1
4e6: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = 0xff;
shiftRegister.send(envoi, 0);
4ea: 40 e0 ldi r20, 0x00 ; 0
4ec: 6f ef ldi r22, 0xFF ; 255
4ee: 83 e0 ldi r24, 0x03 ; 3
4f0: 91 e0 ldi r25, 0x01 ; 1
4f2: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_seconde();
4f6: 8d e0 ldi r24, 0x0D ; 13
4f8: 91 e0 ldi r25, 0x01 ; 1
4fa: 0e 94 b0 0a call 0x1560 ; 0x1560 <_ZN6ds13079r_secondeEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
4fe: 90 e0 ldi r25, 0x00 ; 0
500: bc 01 movw r22, r24
502: 62 95 swap r22
504: 72 95 swap r23
506: 70 7f andi r23, 0xF0 ; 240
508: 76 27 eor r23, r22
50a: 60 7f andi r22, 0xF0 ; 240
50c: 76 27 eor r23, r22
50e: 95 95 asr r25
510: 87 95 ror r24
512: 95 95 asr r25
514: 87 95 ror r24
516: 95 95 asr r25
518: 87 95 ror r24
51a: 95 95 asr r25
51c: 87 95 ror r24
51e: 68 2b or r22, r24
shiftRegister.send(envoi, 0);
520: 40 e0 ldi r20, 0x00 ; 0
522: 83 e0 ldi r24, 0x03 ; 3
524: 91 e0 ldi r25, 0x01 ; 1
526: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
shiftRegister.confirm();
52a: 83 e0 ldi r24, 0x03 ; 3
52c: 91 e0 ldi r25, 0x01 ; 1
52e: 0e 94 9c 07 call 0xf38 ; 0xf38 <_ZN7hc745957confirmEv>
break;
532: 08 95 ret
case 3:
envoi = rtc.r_heur();
534: 8d e0 ldi r24, 0x0D ; 13
536: 91 e0 ldi r25, 0x01 ; 1
538: 0e 94 b8 0a call 0x1570 ; 0x1570 <_ZN6ds13076r_heurEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
53c: 90 e0 ldi r25, 0x00 ; 0
53e: bc 01 movw r22, r24
540: 62 95 swap r22
542: 72 95 swap r23
544: 70 7f andi r23, 0xF0 ; 240
546: 76 27 eor r23, r22
548: 60 7f andi r22, 0xF0 ; 240
54a: 76 27 eor r23, r22
54c: 95 95 asr r25
54e: 87 95 ror r24
550: 95 95 asr r25
552: 87 95 ror r24
554: 95 95 asr r25
556: 87 95 ror r24
558: 95 95 asr r25
55a: 87 95 ror r24
55c: 68 2b or r22, r24
shiftRegister.send(envoi, 0);
55e: 40 e0 ldi r20, 0x00 ; 0
560: 83 e0 ldi r24, 0x03 ; 3
562: 91 e0 ldi r25, 0x01 ; 1
564: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = rtc.r_minute();
568: 8d e0 ldi r24, 0x0D ; 13
56a: 91 e0 ldi r25, 0x01 ; 1
56c: 0e 94 b4 0a call 0x1568 ; 0x1568 <_ZN6ds13078r_minuteEv>
envoi = (envoi>>4)|((envoi&0x0f)<<4);
570: 90 e0 ldi r25, 0x00 ; 0
572: bc 01 movw r22, r24
574: 62 95 swap r22
576: 72 95 swap r23
578: 70 7f andi r23, 0xF0 ; 240
57a: 76 27 eor r23, r22
57c: 60 7f andi r22, 0xF0 ; 240
57e: 76 27 eor r23, r22
580: 95 95 asr r25
582: 87 95 ror r24
584: 95 95 asr r25
586: 87 95 ror r24
588: 95 95 asr r25
58a: 87 95 ror r24
58c: 95 95 asr r25
58e: 87 95 ror r24
590: 68 2b or r22, r24
shiftRegister.send(envoi, 0);
592: 40 e0 ldi r20, 0x00 ; 0
594: 83 e0 ldi r24, 0x03 ; 3
596: 91 e0 ldi r25, 0x01 ; 1
598: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
envoi = 0xff;
shiftRegister.send(envoi, 0);
59c: 40 e0 ldi r20, 0x00 ; 0
59e: 6f ef ldi r22, 0xFF ; 255
5a0: 83 e0 ldi r24, 0x03 ; 3
5a2: 91 e0 ldi r25, 0x01 ; 1
5a4: 0e 94 09 07 call 0xe12 ; 0xe12 <_ZN7hc745954sendEhb>
shiftRegister.confirm();
5a8: 83 e0 ldi r24, 0x03 ; 3
5aa: 91 e0 ldi r25, 0x01 ; 1
5ac: 0e 94 9c 07 call 0xf38 ; 0xf38 <_ZN7hc745957confirmEv>
5b0: 08 95 ret
000005b2 <_Z7couleurv>:
}
}
}
void couleur()
{
usart = USART_Receive();
5b2: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
5b6: 80 93 02 01 sts 0x0102, r24
uint8_t mask = LED_BLUE|LED_GREEN|LED_RED; //COnfigure le mask
uint8_t curent_couleur;
if((PINB & (1<<BP_PLUS)) || usart == 0XC1)
5ba: 1a 9b sbis 0x03, 2 ; 3
5bc: 03 c0 rjmp .+6 ; 0x5c4 <_Z7couleurv+0x12>
break;
}
}
}
void couleur()
{
5be: 88 ee ldi r24, 0xE8 ; 232
5c0: 93 e0 ldi r25, 0x03 ; 3
5c2: 03 c0 rjmp .+6 ; 0x5ca <_Z7couleurv+0x18>
usart = USART_Receive();
uint8_t mask = LED_BLUE|LED_GREEN|LED_RED; //COnfigure le mask
uint8_t curent_couleur;
if((PINB & (1<<BP_PLUS)) || usart == 0XC1)
5c4: 81 3c cpi r24, 0xC1 ; 193
5c6: f9 f4 brne .+62 ; 0x606 <_Z7couleurv+0x54>
5c8: fa cf rjmp .-12 ; 0x5be <_Z7couleurv+0xc>
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
5ca: 1a 99 sbic 0x03, 2 ; 3
5cc: 49 c0 rjmp .+146 ; 0x660 <_Z7couleurv+0xae>
5ce: 40 c0 rjmp .+128 ; 0x650 <_Z7couleurv+0x9e>
_delay_ms(1);
if(bcm_rgb_actif == 0 && (PINB&mask) == 0 && 1==2)
5d0: 83 b1 in r24, 0x03 ; 3
{
bcm_rgb_actif = 1;
}
else
{
bcm_rgb_actif = 0;
5d2: 10 92 01 01 sts 0x0101, r1
5d6: 10 92 00 01 sts 0x0100, r1
curent_couleur = ((PINB & mask)+(LED_RED));
5da: 83 b1 in r24, 0x03 ; 3
5dc: 88 73 andi r24, 0x38 ; 56
5de: 88 5f subi r24, 0xF8 ; 248
if(curent_couleur > mask)
5e0: 89 33 cpi r24, 0x39 ; 57
5e2: 20 f4 brcc .+8 ; 0x5ec <_Z7couleurv+0x3a>
curent_couleur = 0x00;
else
bcm_rgb_actif = 0;
if (curent_couleur&LED_BLUE)
5e4: 85 ff sbrs r24, 5
5e6: 03 c0 rjmp .+6 ; 0x5ee <_Z7couleurv+0x3c>
PORTB |= LED_BLUE;
5e8: 2d 9a sbi 0x05, 5 ; 5
5ea: 02 c0 rjmp .+4 ; 0x5f0 <_Z7couleurv+0x3e>
else
{
bcm_rgb_actif = 0;
curent_couleur = ((PINB & mask)+(LED_RED));
if(curent_couleur > mask)
curent_couleur = 0x00;
5ec: 80 e0 ldi r24, 0x00 ; 0
else
bcm_rgb_actif = 0;
if (curent_couleur&LED_BLUE)
PORTB |= LED_BLUE;
else
PORTB &= LOW(LED_BLUE);
5ee: 2d 98 cbi 0x05, 5 ; 5
if(curent_couleur&LED_GREEN)
5f0: 84 ff sbrs r24, 4
5f2: 02 c0 rjmp .+4 ; 0x5f8 <_Z7couleurv+0x46>
PORTB |= LED_GREEN;
5f4: 2c 9a sbi 0x05, 4 ; 5
5f6: 01 c0 rjmp .+2 ; 0x5fa <_Z7couleurv+0x48>
else
PORTB &= LOW(LED_GREEN);
5f8: 2c 98 cbi 0x05, 4 ; 5
if(curent_couleur & LED_RED)
5fa: 83 ff sbrs r24, 3
5fc: 02 c0 rjmp .+4 ; 0x602 <_Z7couleurv+0x50>
PORTB |= LED_RED;
5fe: 2b 9a sbi 0x05, 3 ; 5
600: 08 95 ret
else
PORTB &= LOW(LED_RED);
602: 2b 98 cbi 0x05, 3 ; 5
604: 08 95 ret
}
}
else if((PINB & (1<<BP_MOINS)) || usart == 0XC0)
606: 19 9b sbis 0x03, 1 ; 3
608: 03 c0 rjmp .+6 ; 0x610 <_Z7couleurv+0x5e>
else
{
bcm_rgb_actif = 0;
curent_couleur = ((PINB & mask)+(LED_RED));
if(curent_couleur > mask)
curent_couleur = 0x00;
60a: 88 ee ldi r24, 0xE8 ; 232
60c: 93 e0 ldi r25, 0x03 ; 3
60e: 04 c0 rjmp .+8 ; 0x618 <_Z7couleurv+0x66>
PORTB |= LED_RED;
else
PORTB &= LOW(LED_RED);
}
}
else if((PINB & (1<<BP_MOINS)) || usart == 0XC0)
610: 80 3c cpi r24, 0xC0 ; 192
612: 09 f0 breq .+2 ; 0x616 <_Z7couleurv+0x64>
614: 3f c0 rjmp .+126 ; 0x694 <_Z7couleurv+0xe2>
616: f9 cf rjmp .-14 ; 0x60a <_Z7couleurv+0x58>
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_MOINS)) ; b++)
618: 19 99 sbic 0x03, 1 ; 3
61a: 2c c0 rjmp .+88 ; 0x674 <_Z7couleurv+0xc2>
61c: 34 c0 rjmp .+104 ; 0x686 <_Z7couleurv+0xd4>
_delay_ms(1);
if(bcm_rgb_actif == 0 && (PINB&mask) == 0 && 1==2)
61e: 83 b1 in r24, 0x03 ; 3
{
bcm_rgb_actif = 1;
}
else
{
bcm_rgb_actif = 0;
620: 10 92 01 01 sts 0x0101, r1
624: 10 92 00 01 sts 0x0100, r1
if(PINB & mask == 0)
628: 83 b1 in r24, 0x03 ; 3
curent_couleur = mask;
curent_couleur = ((PINB & mask)-(LED_RED));
62a: 83 b1 in r24, 0x03 ; 3
62c: 88 73 andi r24, 0x38 ; 56
62e: 88 50 subi r24, 0x08 ; 8
if (curent_couleur&LED_BLUE)
630: 85 ff sbrs r24, 5
632: 02 c0 rjmp .+4 ; 0x638 <_Z7couleurv+0x86>
PORTB |= LED_BLUE;
634: 2d 9a sbi 0x05, 5 ; 5
636: 01 c0 rjmp .+2 ; 0x63a <_Z7couleurv+0x88>
else
PORTB &= LOW(LED_BLUE);
638: 2d 98 cbi 0x05, 5 ; 5
if(curent_couleur&LED_GREEN)
63a: 84 ff sbrs r24, 4
63c: 02 c0 rjmp .+4 ; 0x642 <_Z7couleurv+0x90>
PORTB |= LED_GREEN;
63e: 2c 9a sbi 0x05, 4 ; 5
640: 01 c0 rjmp .+2 ; 0x644 <_Z7couleurv+0x92>
else
PORTB &= LOW(LED_GREEN);
642: 2c 98 cbi 0x05, 4 ; 5
if(curent_couleur & LED_RED)
644: 83 ff sbrs r24, 3
646: 02 c0 rjmp .+4 ; 0x64c <_Z7couleurv+0x9a>
PORTB |= LED_RED;
648: 2b 9a sbi 0x05, 3 ; 5
64a: 08 95 ret
else
PORTB &= LOW(LED_RED);
64c: 2b 98 cbi 0x05, 3 ; 5
64e: 08 95 ret
uint8_t curent_couleur;
if((PINB & (1<<BP_PLUS)) || usart == 0XC1)
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
_delay_ms(1);
if(bcm_rgb_actif == 0 && (PINB&mask) == 0 && 1==2)
650: 80 91 00 01 lds r24, 0x0100
654: 90 91 01 01 lds r25, 0x0101
658: 89 2b or r24, r25
65a: 09 f4 brne .+2 ; 0x65e <_Z7couleurv+0xac>
65c: b9 cf rjmp .-142 ; 0x5d0 <_Z7couleurv+0x1e>
65e: b9 cf rjmp .-142 ; 0x5d2 <_Z7couleurv+0x20>
660: ef e9 ldi r30, 0x9F ; 159
662: ff e0 ldi r31, 0x0F ; 15
664: 31 97 sbiw r30, 0x01 ; 1
666: f1 f7 brne .-4 ; 0x664 <_Z7couleurv+0xb2>
668: 00 c0 rjmp .+0 ; 0x66a <_Z7couleurv+0xb8>
66a: 00 00 nop
66c: 01 97 sbiw r24, 0x01 ; 1
usart = USART_Receive();
uint8_t mask = LED_BLUE|LED_GREEN|LED_RED; //COnfigure le mask
uint8_t curent_couleur;
if((PINB & (1<<BP_PLUS)) || usart == 0XC1)
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
66e: 00 97 sbiw r24, 0x00 ; 0
670: 79 f3 breq .-34 ; 0x650 <_Z7couleurv+0x9e>
672: ab cf rjmp .-170 ; 0x5ca <_Z7couleurv+0x18>
674: ef e9 ldi r30, 0x9F ; 159
676: ff e0 ldi r31, 0x0F ; 15
678: 31 97 sbiw r30, 0x01 ; 1
67a: f1 f7 brne .-4 ; 0x678 <_Z7couleurv+0xc6>
67c: 00 c0 rjmp .+0 ; 0x67e <_Z7couleurv+0xcc>
67e: 00 00 nop
680: 01 97 sbiw r24, 0x01 ; 1
PORTB &= LOW(LED_RED);
}
}
else if((PINB & (1<<BP_MOINS)) || usart == 0XC0)
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_MOINS)) ; b++)
682: 00 97 sbiw r24, 0x00 ; 0
684: 49 f6 brne .-110 ; 0x618 <_Z7couleurv+0x66>
_delay_ms(1);
if(bcm_rgb_actif == 0 && (PINB&mask) == 0 && 1==2)
686: 80 91 00 01 lds r24, 0x0100
68a: 90 91 01 01 lds r25, 0x0101
68e: 89 2b or r24, r25
690: 31 f2 breq .-116 ; 0x61e <_Z7couleurv+0x6c>
692: c6 cf rjmp .-116 ; 0x620 <_Z7couleurv+0x6e>
694: 08 95 ret
00000696 <_Z6boutonv>:
}
}
}
void bouton() //Gestion des BP pour configurer l'heur
{
696: bf 92 push r11
698: cf 92 push r12
69a: df 92 push r13
69c: ef 92 push r14
69e: ff 92 push r15
6a0: 0f 93 push r16
6a2: 1f 93 push r17
6a4: cf 93 push r28
6a6: df 93 push r29
if (PINB & (1<<BP_CONF)) //Si le BP Conf est activé
6a8: 18 9b sbis 0x03, 0 ; 3
6aa: 95 c2 rjmp .+1322 ; 0xbd6 <__stack+0x2d7>
{
while(PINB & (1<<BP_CONF)) //Attente que le BP sois relaché
6ac: 18 9b sbis 0x03, 0 ; 3
6ae: ae c1 rjmp .+860 ; 0xa0c <__stack+0x10d>
6b0: 8f e9 ldi r24, 0x9F ; 159
6b2: 9f e0 ldi r25, 0x0F ; 15
6b4: 01 97 sbiw r24, 0x01 ; 1
6b6: f1 f7 brne .-4 ; 0x6b4 <_Z6boutonv+0x1e>
6b8: 00 c0 rjmp .+0 ; 0x6ba <_Z6boutonv+0x24>
6ba: 00 00 nop
6bc: 18 99 sbic 0x03, 0 ; 3
6be: f8 cf rjmp .-16 ; 0x6b0 <_Z6boutonv+0x1a>
6c0: a5 c1 rjmp .+842 ; 0xa0c <__stack+0x10d>
_delay_ms(1);
int pousse = 1;
for( int a = 0 ; pousse <= 6 ; a++) //Boucle infinie tant qu'on a pas poussé 6 fois sur le bp et init de la variable pour clignotement
6c2: 0f 5f subi r16, 0xFF ; 255
6c4: 1f 4f sbci r17, 0xFF ; 255
{
if(a >= (tmps_clignotement*2))
6c6: 08 3c cpi r16, 0xC8 ; 200
6c8: 11 05 cpc r17, r1
6ca: 14 f0 brlt .+4 ; 0x6d0 <_Z6boutonv+0x3a>
a = 0;
6cc: 00 e0 ldi r16, 0x00 ; 0
6ce: 10 e0 ldi r17, 0x00 ; 0
if (PINB & (1<<BP_CONF))
6d0: 18 9b sbis 0x03, 0 ; 3
6d2: 0b c0 rjmp .+22 ; 0x6ea <_Z6boutonv+0x54>
{
while(PINB & (1<<BP_CONF))
6d4: 18 9b sbis 0x03, 0 ; 3
6d6: 08 c0 rjmp .+16 ; 0x6e8 <_Z6boutonv+0x52>
6d8: ef e9 ldi r30, 0x9F ; 159
6da: ff e0 ldi r31, 0x0F ; 15
6dc: 31 97 sbiw r30, 0x01 ; 1
6de: f1 f7 brne .-4 ; 0x6dc <_Z6boutonv+0x46>
6e0: 00 c0 rjmp .+0 ; 0x6e2 <_Z6boutonv+0x4c>
6e2: 00 00 nop
6e4: 18 99 sbic 0x03, 0 ; 3
6e6: f8 cf rjmp .-16 ; 0x6d8 <_Z6boutonv+0x42>
_delay_ms(1);
pousse++;
6e8: 21 96 adiw r28, 0x01 ; 1
}
switch(pousse)
6ea: c3 30 cpi r28, 0x03 ; 3
6ec: d1 05 cpc r29, r1
6ee: 09 f4 brne .+2 ; 0x6f2 <_Z6boutonv+0x5c>
6f0: 6c c0 rjmp .+216 ; 0x7ca <_Z6boutonv+0x134>
6f2: 3c f4 brge .+14 ; 0x702 <_Z6boutonv+0x6c>
6f4: c1 30 cpi r28, 0x01 ; 1
6f6: d1 05 cpc r29, r1
6f8: 79 f0 breq .+30 ; 0x718 <_Z6boutonv+0x82>
6fa: c2 30 cpi r28, 0x02 ; 2
6fc: d1 05 cpc r29, r1
6fe: 09 f1 breq .+66 ; 0x742 <_Z6boutonv+0xac>
700: 77 c1 rjmp .+750 ; 0x9f0 <__stack+0xf1>
702: c5 30 cpi r28, 0x05 ; 5
704: d1 05 cpc r29, r1
706: 09 f4 brne .+2 ; 0x70a <_Z6boutonv+0x74>
708: ea c0 rjmp .+468 ; 0x8de <_Z6boutonv+0x248>
70a: 0c f4 brge .+2 ; 0x70e <_Z6boutonv+0x78>
70c: a5 c0 rjmp .+330 ; 0x858 <_Z6boutonv+0x1c2>
70e: c6 30 cpi r28, 0x06 ; 6
710: d1 05 cpc r29, r1
712: 09 f4 brne .+2 ; 0x716 <_Z6boutonv+0x80>
714: 26 c1 rjmp .+588 ; 0x962 <__stack+0x63>
716: 6c c1 rjmp .+728 ; 0x9f0 <__stack+0xf1>
{
case 1: //Config des secondes
if(a > tmps_clignotement) //Clignotement
718: 05 36 cpi r16, 0x65 ; 101
71a: 11 05 cpc r17, r1
71c: 34 f0 brlt .+12 ; 0x72a <_Z6boutonv+0x94>
clignotement(SR_SECONDE, false);
71e: 60 e0 ldi r22, 0x00 ; 0
720: 82 e0 ldi r24, 0x02 ; 2
722: 90 e0 ldi r25, 0x00 ; 0
724: 0e 94 45 01 call 0x28a ; 0x28a <_Z12clignotementib>
728: 02 c0 rjmp .+4 ; 0x72e <_Z6boutonv+0x98>
else
affichage_heur();
72a: 0e 94 98 00 call 0x130 ; 0x130 <_Z14affichage_heurv>
if((PINB & (1<<BP_PLUS)) || PINB & (1<<BP_MOINS))//Mise à 00 si + ou - est actionné
72e: 1a 99 sbic 0x03, 2 ; 3
730: 02 c0 rjmp .+4 ; 0x736 <_Z6boutonv+0xa0>
732: 19 9b sbis 0x03, 1 ; 3
734: 44 c2 rjmp .+1160 ; 0xbbe <__stack+0x2bf>
rtc.w_seconde(0x00);
736: 60 e0 ldi r22, 0x00 ; 0
738: 8d e0 ldi r24, 0x0D ; 13
73a: 91 e0 ldi r25, 0x01 ; 1
73c: 0e 94 c8 0a call 0x1590 ; 0x1590 <_ZN6ds13079w_secondeEh>
740: 3e c2 rjmp .+1148 ; 0xbbe <__stack+0x2bf>
break;
case 2: //Config des minutes
if(a > tmps_clignotement) //Clignotement
742: 05 36 cpi r16, 0x65 ; 101
744: 11 05 cpc r17, r1
746: 34 f0 brlt .+12 ; 0x754 <_Z6boutonv+0xbe>
clignotement(SR_MINUTE, false);
748: 60 e0 ldi r22, 0x00 ; 0
74a: 81 e0 ldi r24, 0x01 ; 1
74c: 90 e0 ldi r25, 0x00 ; 0
74e: 0e 94 45 01 call 0x28a ; 0x28a <_Z12clignotementib>
752: 02 c0 rjmp .+4 ; 0x758 <_Z6boutonv+0xc2>
else
affichage_heur();
754: 0e 94 98 00 call 0x130 ; 0x130 <_Z14affichage_heurv>
if(PINB & (1<<BP_PLUS))
758: 1a 9b sbis 0x03, 2 ; 3
75a: 13 c0 rjmp .+38 ; 0x782 <_Z6boutonv+0xec>
75c: 8e 2d mov r24, r14
75e: 9f 2d mov r25, r15
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
760: 1a 99 sbic 0x03, 2 ; 3
762: 75 c1 rjmp .+746 ; 0xa4e <__stack+0x14f>
764: 6a c1 rjmp .+724 ; 0xa3a <__stack+0x13b>
_delay_ms(1);
uint8_t curent_minute = rtc.r_minute();//Lecture du temps DS1307
if((curent_minute&0x0F) == 0x09) // Si 1e digit = 9
curent_minute = (((curent_minute&0xF0)>>4)+1)<<4; //Incrémente de 10
766: 80 7f andi r24, 0xF0 ; 240
768: 60 e1 ldi r22, 0x10 ; 16
76a: 68 0f add r22, r24
76c: 02 c0 rjmp .+4 ; 0x772 <_Z6boutonv+0xdc>
else
curent_minute++; //Incrémente de 1
76e: 61 e0 ldi r22, 0x01 ; 1
770: 68 0f add r22, r24
if(curent_minute >= 0x60) //Si supérieur à 60 retour à 00 /!\ Pas d'incrémentation de l'heur !!
772: 60 36 cpi r22, 0x60 ; 96
774: 08 f0 brcs .+2 ; 0x778 <_Z6boutonv+0xe2>
curent_minute = 0x00;
776: 60 e0 ldi r22, 0x00 ; 0
rtc.w_minute(curent_minute); //Met à jour le DS1307
778: 8d e0 ldi r24, 0x0D ; 13
77a: 91 e0 ldi r25, 0x01 ; 1
77c: 0e 94 ce 0a call 0x159c ; 0x159c <_ZN6ds13078w_minuteEh>
780: 1e c2 rjmp .+1084 ; 0xbbe <__stack+0x2bf>
}
else if(PINB & (1<<BP_MOINS))
782: 19 9b sbis 0x03, 1 ; 3
784: 1c c2 rjmp .+1080 ; 0xbbe <__stack+0x2bf>
786: 8e 2d mov r24, r14
788: 9f 2d mov r25, r15
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_MOINS)) ; b++)
78a: 19 99 sbic 0x03, 1 ; 3
78c: 73 c1 rjmp .+742 ; 0xa74 <__stack+0x175>
78e: 69 c1 rjmp .+722 ; 0xa62 <__stack+0x163>
_delay_ms(1);
uint8_t curent_minute = rtc.r_minute();//Lecture du temps DS1307
if((curent_minute&0x0F) == 0x00) // Si 1e digit = 0
curent_minute = ((((curent_minute&0xF0)>>4)-1)<<4)|0x09; //Décrémente de 10
790: 82 95 swap r24
792: 8f 70 andi r24, 0x0F ; 15
794: 68 2f mov r22, r24
796: 70 e0 ldi r23, 0x00 ; 0
798: 61 50 subi r22, 0x01 ; 1
79a: 71 09 sbc r23, r1
79c: 62 95 swap r22
79e: 72 95 swap r23
7a0: 70 7f andi r23, 0xF0 ; 240
7a2: 76 27 eor r23, r22
7a4: 60 7f andi r22, 0xF0 ; 240
7a6: 76 27 eor r23, r22
7a8: 69 60 ori r22, 0x09 ; 9
7aa: 04 c0 rjmp .+8 ; 0x7b4 <_Z6boutonv+0x11e>
else if(curent_minute == 0x00) // Bug en simulation ..........???????????~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7ac: 88 23 and r24, r24
7ae: 29 f0 breq .+10 ; 0x7ba <_Z6boutonv+0x124>
curent_minute = 0x59;
else
curent_minute--; //Décrémente de 1
7b0: 6f ef ldi r22, 0xFF ; 255
7b2: 68 0f add r22, r24
if(curent_minute > 0x60)
7b4: 61 36 cpi r22, 0x61 ; 97
7b6: 18 f4 brcc .+6 ; 0x7be <_Z6boutonv+0x128>
7b8: 03 c0 rjmp .+6 ; 0x7c0 <_Z6boutonv+0x12a>
_delay_ms(1);
uint8_t curent_minute = rtc.r_minute();//Lecture du temps DS1307
if((curent_minute&0x0F) == 0x00) // Si 1e digit = 0
curent_minute = ((((curent_minute&0xF0)>>4)-1)<<4)|0x09; //Décrémente de 10
else if(curent_minute == 0x00) // Bug en simulation ..........???????????~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curent_minute = 0x59;
7ba: 69 e5 ldi r22, 0x59 ; 89
7bc: 01 c0 rjmp .+2 ; 0x7c0 <_Z6boutonv+0x12a>
else
curent_minute--; //Décrémente de 1
if(curent_minute > 0x60)
curent_minute = 0x59;
7be: 69 e5 ldi r22, 0x59 ; 89
rtc.w_minute(curent_minute); //Met à jour le DS1307
7c0: 8d e0 ldi r24, 0x0D ; 13
7c2: 91 e0 ldi r25, 0x01 ; 1
7c4: 0e 94 ce 0a call 0x159c ; 0x159c <_ZN6ds13078w_minuteEh>
7c8: fa c1 rjmp .+1012 ; 0xbbe <__stack+0x2bf>
}
break;
case 3: //Config de l'heur
if(a > tmps_clignotement) //Clignotement toute les
7ca: 05 36 cpi r16, 0x65 ; 101
7cc: 11 05 cpc r17, r1
7ce: 34 f0 brlt .+12 ; 0x7dc <_Z6boutonv+0x146>
clignotement(SR_HEUR, false);
7d0: 60 e0 ldi r22, 0x00 ; 0
7d2: 80 e0 ldi r24, 0x00 ; 0
7d4: 90 e0 ldi r25, 0x00 ; 0
7d6: 0e 94 45 01 call 0x28a ; 0x28a <_Z12clignotementib>
7da: 02 c0 rjmp .+4 ; 0x7e0 <_Z6boutonv+0x14a>
else
affichage_heur();
7dc: 0e 94 98 00 call 0x130 ; 0x130 <_Z14affichage_heurv>
if(PINB & (1<<BP_PLUS))
7e0: 1a 9b sbis 0x03, 2 ; 3
7e2: 17 c0 rjmp .+46 ; 0x812 <_Z6boutonv+0x17c>
7e4: 8e 2d mov r24, r14
7e6: 9f 2d mov r25, r15
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
7e8: 1a 99 sbic 0x03, 2 ; 3
7ea: 58 c1 rjmp .+688 ; 0xa9c <__stack+0x19d>
7ec: 4d c1 rjmp .+666 ; 0xa88 <__stack+0x189>
_delay_ms(1);
uint8_t curent_heur = rtc.r_heur(); //Lecture du temps DS1307
if((curent_heur&0x0F) == 0x09) // Si 1e digit = 9
curent_heur = (((curent_heur&0xF0)>>4)+1)<<4; //Incrémente de 10
7ee: 80 7f andi r24, 0xF0 ; 240
7f0: 60 e1 ldi r22, 0x10 ; 16
7f2: 68 0f add r22, r24
7f4: 08 c0 rjmp .+16 ; 0x806 <_Z6boutonv+0x170>
else if(curent_heur >= 0x23) //Si arrivé à 24H retour à 00H, /!\ Attention n'incrémente pas la date !!
7f6: 83 32 cpi r24, 0x23 ; 35
7f8: 28 f4 brcc .+10 ; 0x804 <_Z6boutonv+0x16e>
curent_heur = 0x00;
else
curent_heur = ((curent_heur&0x0F)+1)|(curent_heur&0xF0); //Incrémente de 1
7fa: 9f 5f subi r25, 0xFF ; 255
7fc: 80 7f andi r24, 0xF0 ; 240
7fe: 69 2f mov r22, r25
800: 68 2b or r22, r24
802: 01 c0 rjmp .+2 ; 0x806 <_Z6boutonv+0x170>
_delay_ms(1);
uint8_t curent_heur = rtc.r_heur(); //Lecture du temps DS1307
if((curent_heur&0x0F) == 0x09) // Si 1e digit = 9
curent_heur = (((curent_heur&0xF0)>>4)+1)<<4; //Incrémente de 10
else if(curent_heur >= 0x23) //Si arrivé à 24H retour à 00H, /!\ Attention n'incrémente pas la date !!
curent_heur = 0x00;
804: 60 e0 ldi r22, 0x00 ; 0
else
curent_heur = ((curent_heur&0x0F)+1)|(curent_heur&0xF0); //Incrémente de 1
rtc.w_heur(curent_heur, 0); //Met à jour le DS1307
806: 40 e0 ldi r20, 0x00 ; 0
808: 8d e0 ldi r24, 0x0D ; 13
80a: 91 e0 ldi r25, 0x01 ; 1
80c: 0e 94 d4 0a call 0x15a8 ; 0x15a8 <_ZN6ds13076w_heurEhh>
810: d6 c1 rjmp .+940 ; 0xbbe <__stack+0x2bf>
}
else if(PINB & (1<<BP_MOINS))
812: 19 9b sbis 0x03, 1 ; 3
814: d4 c1 rjmp .+936 ; 0xbbe <__stack+0x2bf>
816: 8e 2d mov r24, r14
818: 9f 2d mov r25, r15
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_MOINS)); b++)
81a: 19 99 sbic 0x03, 1 ; 3
81c: 51 c1 rjmp .+674 ; 0xac0 <__stack+0x1c1>
81e: 48 c1 rjmp .+656 ; 0xab0 <__stack+0x1b1>
_delay_ms(1);
uint8_t curent_heur = rtc.r_heur(); //Lecture du temps DS1307
if(curent_heur == 0x00) //Si arrive à 00H, /!\ Attention ne décrémente pas la date !!
curent_heur = 0x23; //Retour à 24H
else if((curent_heur&0x0F) == 0) // Si 1e digit = 0
820: 98 2f mov r25, r24
822: 9f 70 andi r25, 0x0F ; 15
824: 69 f4 brne .+26 ; 0x840 <_Z6boutonv+0x1aa>
curent_heur = ((((curent_heur&0xF0)>>4)-1)<<4)|0x09; //Décrémente de 10
826: 82 95 swap r24
828: 8f 70 andi r24, 0x0F ; 15
82a: 90 e0 ldi r25, 0x00 ; 0
82c: 01 97 sbiw r24, 0x01 ; 1
82e: 82 95 swap r24
830: 92 95 swap r25
832: 90 7f andi r25, 0xF0 ; 240
834: 98 27 eor r25, r24
836: 80 7f andi r24, 0xF0 ; 240
838: 98 27 eor r25, r24
83a: 68 2f mov r22, r24
83c: 69 60 ori r22, 0x09 ; 9
83e: 06 c0 rjmp .+12 ; 0x84c <_Z6boutonv+0x1b6>
else
curent_heur = ((curent_heur&0x0f)-1)|(curent_heur&0xf0); //Décrémente de 1
840: 91 50 subi r25, 0x01 ; 1
842: 80 7f andi r24, 0xF0 ; 240
844: 69 2f mov r22, r25
846: 68 2b or r22, r24
848: 01 c0 rjmp .+2 ; 0x84c <_Z6boutonv+0x1b6>
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_MOINS)); b++)
_delay_ms(1);
uint8_t curent_heur = rtc.r_heur(); //Lecture du temps DS1307
if(curent_heur == 0x00) //Si arrive à 00H, /!\ Attention ne décrémente pas la date !!
curent_heur = 0x23; //Retour à 24H
84a: 63 e2 ldi r22, 0x23 ; 35
else if((curent_heur&0x0F) == 0) // Si 1e digit = 0
curent_heur = ((((curent_heur&0xF0)>>4)-1)<<4)|0x09; //Décrémente de 10
else
curent_heur = ((curent_heur&0x0f)-1)|(curent_heur&0xf0); //Décrémente de 1
rtc.w_heur(curent_heur, 0); //Met à jour le DS1307
84c: 40 e0 ldi r20, 0x00 ; 0
84e: 8d e0 ldi r24, 0x0D ; 13
850: 91 e0 ldi r25, 0x01 ; 1
852: 0e 94 d4 0a call 0x15a8 ; 0x15a8 <_ZN6ds13076w_heurEhh>
856: b3 c1 rjmp .+870 ; 0xbbe <__stack+0x2bf>
}
break;
case 4: //Config du jour
PORTC &= LOW(1<<SR_HEUR);
858: 40 98 cbi 0x08, 0 ; 8
if(a > tmps_clignotement) //Clignotement
85a: 05 36 cpi r16, 0x65 ; 101
85c: 11 05 cpc r17, r1
85e: 34 f0 brlt .+12 ; 0x86c <_Z6boutonv+0x1d6>
clignotement(SR_JOURS, true);
860: 6d 2d mov r22, r13
862: 80 e0 ldi r24, 0x00 ; 0
864: 90 e0 ldi r25, 0x00 ; 0
866: 0e 94 45 01 call 0x28a ; 0x28a <_Z12clignotementib>
86a: 02 c0 rjmp .+4 ; 0x870 <_Z6boutonv+0x1da>
else
affichage_date();
86c: 0e 94 eb 00 call 0x1d6 ; 0x1d6 <_Z14affichage_datev>
if(PINB & (1<<BP_PLUS))
870: 1a 9b sbis 0x03, 2 ; 3
872: 15 c0 rjmp .+42 ; 0x89e <_Z6boutonv+0x208>
874: 8e 2d mov r24, r14
876: 9f 2d mov r25, r15
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
878: 1a 99 sbic 0x03, 2 ; 3
87a: 36 c1 rjmp .+620 ; 0xae8 <__stack+0x1e9>
87c: 2b c1 rjmp .+598 ; 0xad4 <__stack+0x1d5>
_delay_ms(1);
uint8_t curent_day = rtc.r_jour(); //Lecture du temps DS1307
if((curent_day&0x0F) == 0x09) // Si 1e digit = 9
curent_day = (((curent_day&0xF0)>>4)+1)<<4; //Incrémente de 10
87e: 80 7f andi r24, 0xF0 ; 240
880: 60 e1 ldi r22, 0x10 ; 16
882: 68 0f add r22, r24
884: 04 c0 rjmp .+8 ; 0x88e <_Z6boutonv+0x1f8>
else
curent_day = ((curent_day&0x0F)+1)|(curent_day&0xF0); //Incrémente de 1
886: 9f 5f subi r25, 0xFF ; 255
888: 80 7f andi r24, 0xF0 ; 240
88a: 69 2f mov r22, r25
88c: 68 2b or r22, r24
if(curent_day > 0x31)
88e: 62 33 cpi r22, 0x32 ; 50
890: 08 f0 brcs .+2 ; 0x894 <_Z6boutonv+0x1fe>
curent_day = 0x00;
892: 60 e0 ldi r22, 0x00 ; 0
rtc.w_date(curent_day); //Met à jour le DS1307
894: 8d e0 ldi r24, 0x0D ; 13
896: 91 e0 ldi r25, 0x01 ; 1
898: 0e 94 e0 0a call 0x15c0 ; 0x15c0 <_ZN6ds13076w_dateEh>
89c: 90 c1 rjmp .+800 ; 0xbbe <__stack+0x2bf>
}
else if(PINB & (1<<BP_MOINS))
89e: 19 9b sbis 0x03, 1 ; 3
8a0: 8e c1 rjmp .+796 ; 0xbbe <__stack+0x2bf>
8a2: 8e 2d mov r24, r14
8a4: 9f 2d mov r25, r15
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & 1<<BP_MOINS); b++)
8a6: 19 99 sbic 0x03, 1 ; 3
8a8: 32 c1 rjmp .+612 ; 0xb0e <__stack+0x20f>
8aa: 28 c1 rjmp .+592 ; 0xafc <__stack+0x1fd>
_delay_ms(1);
uint8_t curent_heur = rtc.r_jour(); //Lecture du temps DS1307
if((curent_heur&0x0F) == 0) // Si 1e digit = 0
curent_heur = ((((curent_heur&0xF0)>>4)-1)<<4)|0x09; //Décrémente de 10
8ac: 82 95 swap r24
8ae: 8f 70 andi r24, 0x0F ; 15
8b0: 90 e0 ldi r25, 0x00 ; 0
8b2: 01 97 sbiw r24, 0x01 ; 1
8b4: 82 95 swap r24
8b6: 92 95 swap r25
8b8: 90 7f andi r25, 0xF0 ; 240
8ba: 98 27 eor r25, r24
8bc: 80 7f andi r24, 0xF0 ; 240
8be: 98 27 eor r25, r24
8c0: 68 2f mov r22, r24
8c2: 69 60 ori r22, 0x09 ; 9
8c4: 04 c0 rjmp .+8 ; 0x8ce <_Z6boutonv+0x238>
else
curent_heur = ((curent_heur&0x0F)-1)|(curent_heur&0xF0); //Décrémente de 1
8c6: 91 50 subi r25, 0x01 ; 1
8c8: 80 7f andi r24, 0xF0 ; 240
8ca: 69 2f mov r22, r25
8cc: 68 2b or r22, r24
if(curent_heur == 0x00)
8ce: 61 11 cpse r22, r1
8d0: 01 c0 rjmp .+2 ; 0x8d4 <_Z6boutonv+0x23e>
curent_heur = 0x31;
8d2: 61 e3 ldi r22, 0x31 ; 49
rtc.w_date(curent_heur); //Met à jour le DS1307
8d4: 8d e0 ldi r24, 0x0D ; 13
8d6: 91 e0 ldi r25, 0x01 ; 1
8d8: 0e 94 e0 0a call 0x15c0 ; 0x15c0 <_ZN6ds13076w_dateEh>
8dc: 70 c1 rjmp .+736 ; 0xbbe <__stack+0x2bf>
}
break;
case 5: //config du mois
if(a > tmps_clignotement) //Clignotement
8de: 05 36 cpi r16, 0x65 ; 101
8e0: 11 05 cpc r17, r1
8e2: 34 f0 brlt .+12 ; 0x8f0 <_Z6boutonv+0x25a>
clignotement(SR_MOIS, true);
8e4: 6d 2d mov r22, r13
8e6: 81 e0 ldi r24, 0x01 ; 1
8e8: 90 e0 ldi r25, 0x00 ; 0
8ea: 0e 94 45 01 call 0x28a ; 0x28a <_Z12clignotementib>
8ee: 02 c0 rjmp .+4 ; 0x8f4 <_Z6boutonv+0x25e>
else
affichage_date();
8f0: 0e 94 eb 00 call 0x1d6 ; 0x1d6 <_Z14affichage_datev>
if(PINB & (1<<BP_PLUS))
8f4: 1a 9b sbis 0x03, 2 ; 3
8f6: 15 c0 rjmp .+42 ; 0x922 <__stack+0x23>
8f8: 8e 2d mov r24, r14
8fa: 9f 2d mov r25, r15
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
8fc: 1a 99 sbic 0x03, 2 ; 3
8fe: 1b c1 rjmp .+566 ; 0xb36 <__stack+0x237>
900: 10 c1 rjmp .+544 ; 0xb22 <__stack+0x223>
_delay_ms(1);
uint8_t curent_months = rtc.r_moi();//Lecture du temps DS1307
if((curent_months&0x0F) == 0x09) // Si 1e digit = 9
curent_months = (((curent_months&0xF0)>>4)+1)<<4; //Incrémente de 10
902: 80 7f andi r24, 0xF0 ; 240
904: 60 e1 ldi r22, 0x10 ; 16
906: 68 0f add r22, r24
908: 04 c0 rjmp .+8 ; 0x912 <__stack+0x13>
else
curent_months = ((curent_months&0x0F)+1)|(curent_months&0xF0); //Incrémente de 1
90a: 9f 5f subi r25, 0xFF ; 255
90c: 80 7f andi r24, 0xF0 ; 240
90e: 69 2f mov r22, r25
910: 68 2b or r22, r24
if(curent_months > 0x12)
912: 63 31 cpi r22, 0x13 ; 19
914: 08 f0 brcs .+2 ; 0x918 <__stack+0x19>
curent_months = 0x01;
916: 6d 2d mov r22, r13
rtc.w_moi(curent_months); //Met à jour le DS1307
918: 8d e0 ldi r24, 0x0D ; 13
91a: 91 e0 ldi r25, 0x01 ; 1
91c: 0e 94 e6 0a call 0x15cc ; 0x15cc <_ZN6ds13075w_moiEh>
920: 4e c1 rjmp .+668 ; 0xbbe <__stack+0x2bf>
}
else if(PINB & (1<<BP_MOINS))
922: 19 9b sbis 0x03, 1 ; 3
924: 4c c1 rjmp .+664 ; 0xbbe <__stack+0x2bf>
926: 8e 2d mov r24, r14
928: 9f 2d mov r25, r15
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & 1<<BP_MOINS); b++)
92a: 19 99 sbic 0x03, 1 ; 3
92c: 17 c1 rjmp .+558 ; 0xb5c <__stack+0x25d>
92e: 0d c1 rjmp .+538 ; 0xb4a <__stack+0x24b>
_delay_ms(1);
uint8_t curent_months = rtc.r_moi();//Lecture du temps DS1307
if((curent_months&0x0F) == 0) // Si 1e digit = 0
curent_months = ((((curent_months&0xF0)>>4)-1)<<4)|0x09; //Décrémente de 10
930: 82 95 swap r24
932: 8f 70 andi r24, 0x0F ; 15
934: 90 e0 ldi r25, 0x00 ; 0
936: 01 97 sbiw r24, 0x01 ; 1
938: 82 95 swap r24
93a: 92 95 swap r25
93c: 90 7f andi r25, 0xF0 ; 240
93e: 98 27 eor r25, r24
940: 80 7f andi r24, 0xF0 ; 240
942: 98 27 eor r25, r24
944: 68 2f mov r22, r24
946: 69 60 ori r22, 0x09 ; 9
948: 04 c0 rjmp .+8 ; 0x952 <__stack+0x53>
else
curent_months = ((curent_months&0x0F)-1)|(curent_months&0xF0); //Décrémente de 1
94a: 91 50 subi r25, 0x01 ; 1
94c: 80 7f andi r24, 0xF0 ; 240
94e: 69 2f mov r22, r25
950: 68 2b or r22, r24
if(curent_months < 0x01)
952: 61 11 cpse r22, r1
954: 01 c0 rjmp .+2 ; 0x958 <__stack+0x59>
curent_months = 0x12;
956: 6c 2d mov r22, r12
rtc.w_moi(curent_months); //Met à jour le DS1307
958: 8d e0 ldi r24, 0x0D ; 13
95a: 91 e0 ldi r25, 0x01 ; 1
95c: 0e 94 e6 0a call 0x15cc ; 0x15cc <_ZN6ds13075w_moiEh>
960: 2e c1 rjmp .+604 ; 0xbbe <__stack+0x2bf>
}
break;
case 6: //Config de l'année
if(a > tmps_clignotement) //Clignotement
962: 05 36 cpi r16, 0x65 ; 101
964: 11 05 cpc r17, r1
966: 34 f0 brlt .+12 ; 0x974 <__stack+0x75>
clignotement(SR_ANNEE, true);
968: 6d 2d mov r22, r13
96a: 82 e0 ldi r24, 0x02 ; 2
96c: 90 e0 ldi r25, 0x00 ; 0
96e: 0e 94 45 01 call 0x28a ; 0x28a <_Z12clignotementib>
972: 02 c0 rjmp .+4 ; 0x978 <__stack+0x79>
else
affichage_date();
974: 0e 94 eb 00 call 0x1d6 ; 0x1d6 <_Z14affichage_datev>
if(PINB & (1<<BP_PLUS))
978: 1a 9b sbis 0x03, 2 ; 3
97a: 15 c0 rjmp .+42 ; 0x9a6 <__stack+0xa7>
97c: 8e 2d mov r24, r14
97e: 9f 2d mov r25, r15
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
980: 1a 99 sbic 0x03, 2 ; 3
982: f6 c0 rjmp .+492 ; 0xb70 <__stack+0x271>
984: ff c0 rjmp .+510 ; 0xb84 <__stack+0x285>
_delay_ms(1);
uint8_t curent_year = rtc.r_year();//Lecture du temps DS1307
if((curent_year&0x0F) == 0x09) // Si 1e digit = 9
curent_year = (((curent_year&0xF0)>>4)+1)<<4; //Incrémente de 10
986: 80 7f andi r24, 0xF0 ; 240
988: 60 e1 ldi r22, 0x10 ; 16
98a: 68 0f add r22, r24
98c: 04 c0 rjmp .+8 ; 0x996 <__stack+0x97>
else
curent_year = ((curent_year&0x0F)+1)|(curent_year&0xF0); //Incrémente de 1
98e: 9f 5f subi r25, 0xFF ; 255
990: 80 7f andi r24, 0xF0 ; 240
992: 69 2f mov r22, r25
994: 68 2b or r22, r24
if(curent_year > 0x99)
996: 6a 39 cpi r22, 0x9A ; 154
998: 08 f0 brcs .+2 ; 0x99c <__stack+0x9d>
curent_year = 0x00;
99a: 60 e0 ldi r22, 0x00 ; 0
rtc.w_year(curent_year); //Met à jour le DS1307
99c: 8d e0 ldi r24, 0x0D ; 13
99e: 91 e0 ldi r25, 0x01 ; 1
9a0: 0e 94 ec 0a call 0x15d8 ; 0x15d8 <_ZN6ds13076w_yearEh>
9a4: 0c c1 rjmp .+536 ; 0xbbe <__stack+0x2bf>
}
else if(PINB & (1<<BP_MOINS))
9a6: 19 9b sbis 0x03, 1 ; 3
9a8: 0a c1 rjmp .+532 ; 0xbbe <__stack+0x2bf>
9aa: 8e 2d mov r24, r14
9ac: 9f 2d mov r25, r15
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & 1<<BP_MOINS); b++)
9ae: 19 99 sbic 0x03, 1 ; 3
9b0: fc c0 rjmp .+504 ; 0xbaa <__stack+0x2ab>
9b2: f2 c0 rjmp .+484 ; 0xb98 <__stack+0x299>
_delay_ms(1);
uint8_t curent_year = rtc.r_year();//Lecture du temps DS1307
if((curent_year&0x0F) == 0 && curent_year != 0x00) // Si 1e digit = 0
9b4: 88 23 and r24, r24
9b6: a1 f0 breq .+40 ; 0x9e0 <__stack+0xe1>
curent_year = ((((curent_year&0xF0)>>4)-1)<<4)|0x09; //Décrémente de 10
9b8: 82 95 swap r24
9ba: 8f 70 andi r24, 0x0F ; 15
9bc: 90 e0 ldi r25, 0x00 ; 0
9be: 01 97 sbiw r24, 0x01 ; 1
9c0: 82 95 swap r24
9c2: 92 95 swap r25
9c4: 90 7f andi r25, 0xF0 ; 240
9c6: 98 27 eor r25, r24
9c8: 80 7f andi r24, 0xF0 ; 240
9ca: 98 27 eor r25, r24
9cc: 68 2f mov r22, r24
9ce: 69 60 ori r22, 0x09 ; 9
9d0: 0a c0 rjmp .+20 ; 0x9e6 <__stack+0xe7>
else if (curent_year != 0x00)
9d2: 88 23 and r24, r24
9d4: 39 f0 breq .+14 ; 0x9e4 <__stack+0xe5>
curent_year = ((curent_year&0x0F)-1)|(curent_year&0xF0); //Décrémente de 1
9d6: 91 50 subi r25, 0x01 ; 1
9d8: 80 7f andi r24, 0xF0 ; 240
9da: 69 2f mov r22, r25
9dc: 68 2b or r22, r24
9de: 03 c0 rjmp .+6 ; 0x9e6 <__stack+0xe7>
else
curent_year = 0x99;
9e0: 6b 2d mov r22, r11
9e2: 01 c0 rjmp .+2 ; 0x9e6 <__stack+0xe7>
9e4: 6b 2d mov r22, r11
rtc.w_year(curent_year); //Met à jour le DS1307
9e6: 8d e0 ldi r24, 0x0D ; 13
9e8: 91 e0 ldi r25, 0x01 ; 1
9ea: 0e 94 ec 0a call 0x15d8 ; 0x15d8 <_ZN6ds13076w_yearEh>
9ee: e7 c0 rjmp .+462 ; 0xbbe <__stack+0x2bf>
}
break;
}
PORTC &= LOW(1<<SR_SECONDE|1<<SR_MINUTE|1<<SR_HEUR); //Active tous les registre à décalage
9f0: 88 b1 in r24, 0x08 ; 8
9f2: 88 7f andi r24, 0xF8 ; 248
9f4: 88 b9 out 0x08, r24 ; 8
9f6: 8f e9 ldi r24, 0x9F ; 159
9f8: 9f e0 ldi r25, 0x0F ; 15
9fa: 01 97 sbiw r24, 0x01 ; 1
9fc: f1 f7 brne .-4 ; 0x9fa <__stack+0xfb>
9fe: 00 c0 rjmp .+0 ; 0xa00 <__stack+0x101>
a00: 00 00 nop
if (PINB & (1<<BP_CONF)) //Si le BP Conf est activé
{
while(PINB & (1<<BP_CONF)) //Attente que le BP sois relaché
_delay_ms(1);
int pousse = 1;
for( int a = 0 ; pousse <= 6 ; a++) //Boucle infinie tant qu'on a pas poussé 6 fois sur le bp et init de la variable pour clignotement
a02: c7 30 cpi r28, 0x07 ; 7
a04: d1 05 cpc r29, r1
a06: 0c f0 brlt .+2 ; 0xa0a <__stack+0x10b>
a08: e6 c0 rjmp .+460 ; 0xbd6 <__stack+0x2d7>
a0a: 5b ce rjmp .-842 ; 0x6c2 <_Z6boutonv+0x2c>
{
if(a >= (tmps_clignotement*2))
a = 0;
a0c: c1 e0 ldi r28, 0x01 ; 1
a0e: d0 e0 ldi r29, 0x00 ; 0
a10: 00 e0 ldi r16, 0x00 ; 0
a12: 10 e0 ldi r17, 0x00 ; 0
curent_heur = 0x00;
else
curent_heur = ((curent_heur&0x0F)+1)|(curent_heur&0xF0); //Incrémente de 1
rtc.w_heur(curent_heur, 0); //Met à jour le DS1307
}
else if(PINB & (1<<BP_MOINS))
a14: 0f 2e mov r0, r31
a16: f8 ee ldi r31, 0xE8 ; 232
a18: ef 2e mov r14, r31
a1a: f0 2d mov r31, r0
a1c: 0f 2e mov r0, r31
a1e: f3 e0 ldi r31, 0x03 ; 3
a20: ff 2e mov r15, r31
a22: f0 2d mov r31, r0
if((curent_months&0x0F) == 0) // Si 1e digit = 0
curent_months = ((((curent_months&0xF0)>>4)-1)<<4)|0x09; //Décrémente de 10
else
curent_months = ((curent_months&0x0F)-1)|(curent_months&0xF0); //Décrémente de 1
if(curent_months < 0x01)
curent_months = 0x12;
a24: 0f 2e mov r0, r31
a26: f2 e1 ldi r31, 0x12 ; 18
a28: cf 2e mov r12, r31
a2a: f0 2d mov r31, r0
if((curent_months&0x0F) == 0x09) // Si 1e digit = 9
curent_months = (((curent_months&0xF0)>>4)+1)<<4; //Incrémente de 10
else
curent_months = ((curent_months&0x0F)+1)|(curent_months&0xF0); //Incrémente de 1
if(curent_months > 0x12)
curent_months = 0x01;
a2c: dd 24 eor r13, r13
a2e: d3 94 inc r13
if((curent_year&0x0F) == 0 && curent_year != 0x00) // Si 1e digit = 0
curent_year = ((((curent_year&0xF0)>>4)-1)<<4)|0x09; //Décrémente de 10
else if (curent_year != 0x00)
curent_year = ((curent_year&0x0F)-1)|(curent_year&0xF0); //Décrémente de 1
else
curent_year = 0x99;
a30: 0f 2e mov r0, r31
a32: f9 e9 ldi r31, 0x99 ; 153
a34: bf 2e mov r11, r31
a36: f0 2d mov r31, r0
a38: 4b ce rjmp .-874 ; 0x6d0 <_Z6boutonv+0x3a>
affichage_heur();
if(PINB & (1<<BP_PLUS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
_delay_ms(1);
uint8_t curent_minute = rtc.r_minute();//Lecture du temps DS1307
a3a: 8d e0 ldi r24, 0x0D ; 13
a3c: 91 e0 ldi r25, 0x01 ; 1
a3e: 0e 94 b4 0a call 0x1568 ; 0x1568 <_ZN6ds13078r_minuteEv>
if((curent_minute&0x0F) == 0x09) // Si 1e digit = 9
a42: 98 2f mov r25, r24
a44: 9f 70 andi r25, 0x0F ; 15
a46: 99 30 cpi r25, 0x09 ; 9
a48: 09 f0 breq .+2 ; 0xa4c <__stack+0x14d>
a4a: 91 ce rjmp .-734 ; 0x76e <_Z6boutonv+0xd8>
a4c: 8c ce rjmp .-744 ; 0x766 <_Z6boutonv+0xd0>
a4e: ef e9 ldi r30, 0x9F ; 159
a50: ff e0 ldi r31, 0x0F ; 15
a52: 31 97 sbiw r30, 0x01 ; 1
a54: f1 f7 brne .-4 ; 0xa52 <__stack+0x153>
a56: 00 c0 rjmp .+0 ; 0xa58 <__stack+0x159>
a58: 00 00 nop
a5a: 01 97 sbiw r24, 0x01 ; 1
clignotement(SR_MINUTE, false);
else
affichage_heur();
if(PINB & (1<<BP_PLUS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
a5c: 00 97 sbiw r24, 0x00 ; 0
a5e: 69 f3 breq .-38 ; 0xa3a <__stack+0x13b>
a60: 7f ce rjmp .-770 ; 0x760 <_Z6boutonv+0xca>
}
else if(PINB & (1<<BP_MOINS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_MOINS)) ; b++)
_delay_ms(1);
uint8_t curent_minute = rtc.r_minute();//Lecture du temps DS1307
a62: 8d e0 ldi r24, 0x0D ; 13
a64: 91 e0 ldi r25, 0x01 ; 1
a66: 0e 94 b4 0a call 0x1568 ; 0x1568 <_ZN6ds13078r_minuteEv>
if((curent_minute&0x0F) == 0x00) // Si 1e digit = 0
a6a: 98 2f mov r25, r24
a6c: 9f 70 andi r25, 0x0F ; 15
a6e: 09 f4 brne .+2 ; 0xa72 <__stack+0x173>
a70: 8f ce rjmp .-738 ; 0x790 <_Z6boutonv+0xfa>
a72: 9c ce rjmp .-712 ; 0x7ac <_Z6boutonv+0x116>
a74: ef e9 ldi r30, 0x9F ; 159
a76: ff e0 ldi r31, 0x0F ; 15
a78: 31 97 sbiw r30, 0x01 ; 1
a7a: f1 f7 brne .-4 ; 0xa78 <__stack+0x179>
a7c: 00 c0 rjmp .+0 ; 0xa7e <__stack+0x17f>
a7e: 00 00 nop
a80: 01 97 sbiw r24, 0x01 ; 1
curent_minute = 0x00;
rtc.w_minute(curent_minute); //Met à jour le DS1307
}
else if(PINB & (1<<BP_MOINS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_MOINS)) ; b++)
a82: 00 97 sbiw r24, 0x00 ; 0
a84: 71 f3 breq .-36 ; 0xa62 <__stack+0x163>
a86: 81 ce rjmp .-766 ; 0x78a <_Z6boutonv+0xf4>
affichage_heur();
if(PINB & (1<<BP_PLUS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
_delay_ms(1);
uint8_t curent_heur = rtc.r_heur(); //Lecture du temps DS1307
a88: 8d e0 ldi r24, 0x0D ; 13
a8a: 91 e0 ldi r25, 0x01 ; 1
a8c: 0e 94 b8 0a call 0x1570 ; 0x1570 <_ZN6ds13076r_heurEv>
if((curent_heur&0x0F) == 0x09) // Si 1e digit = 9
a90: 98 2f mov r25, r24
a92: 9f 70 andi r25, 0x0F ; 15
a94: 99 30 cpi r25, 0x09 ; 9
a96: 09 f0 breq .+2 ; 0xa9a <__stack+0x19b>
a98: ae ce rjmp .-676 ; 0x7f6 <_Z6boutonv+0x160>
a9a: a9 ce rjmp .-686 ; 0x7ee <_Z6boutonv+0x158>
a9c: ef e9 ldi r30, 0x9F ; 159
a9e: ff e0 ldi r31, 0x0F ; 15
aa0: 31 97 sbiw r30, 0x01 ; 1
aa2: f1 f7 brne .-4 ; 0xaa0 <__stack+0x1a1>
aa4: 00 c0 rjmp .+0 ; 0xaa6 <__stack+0x1a7>
aa6: 00 00 nop
aa8: 01 97 sbiw r24, 0x01 ; 1
clignotement(SR_HEUR, false);
else
affichage_heur();
if(PINB & (1<<BP_PLUS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
aaa: 00 97 sbiw r24, 0x00 ; 0
aac: 69 f3 breq .-38 ; 0xa88 <__stack+0x189>
aae: 9c ce rjmp .-712 ; 0x7e8 <_Z6boutonv+0x152>
}
else if(PINB & (1<<BP_MOINS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_MOINS)); b++)
_delay_ms(1);
uint8_t curent_heur = rtc.r_heur(); //Lecture du temps DS1307
ab0: 8d e0 ldi r24, 0x0D ; 13
ab2: 91 e0 ldi r25, 0x01 ; 1
ab4: 0e 94 b8 0a call 0x1570 ; 0x1570 <_ZN6ds13076r_heurEv>
if(curent_heur == 0x00) //Si arrive à 00H, /!\ Attention ne décrémente pas la date !!
ab8: 88 23 and r24, r24
aba: 09 f4 brne .+2 ; 0xabe <__stack+0x1bf>
abc: c6 ce rjmp .-628 ; 0x84a <_Z6boutonv+0x1b4>
abe: b0 ce rjmp .-672 ; 0x820 <_Z6boutonv+0x18a>
ac0: ef e9 ldi r30, 0x9F ; 159
ac2: ff e0 ldi r31, 0x0F ; 15
ac4: 31 97 sbiw r30, 0x01 ; 1
ac6: f1 f7 brne .-4 ; 0xac4 <__stack+0x1c5>
ac8: 00 c0 rjmp .+0 ; 0xaca <__stack+0x1cb>
aca: 00 00 nop
acc: 01 97 sbiw r24, 0x01 ; 1
curent_heur = ((curent_heur&0x0F)+1)|(curent_heur&0xF0); //Incrémente de 1
rtc.w_heur(curent_heur, 0); //Met à jour le DS1307
}
else if(PINB & (1<<BP_MOINS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_MOINS)); b++)
ace: 00 97 sbiw r24, 0x00 ; 0
ad0: 79 f3 breq .-34 ; 0xab0 <__stack+0x1b1>
ad2: a3 ce rjmp .-698 ; 0x81a <_Z6boutonv+0x184>
affichage_date();
if(PINB & (1<<BP_PLUS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
_delay_ms(1);
uint8_t curent_day = rtc.r_jour(); //Lecture du temps DS1307
ad4: 8d e0 ldi r24, 0x0D ; 13
ad6: 91 e0 ldi r25, 0x01 ; 1
ad8: 0e 94 bc 0a call 0x1578 ; 0x1578 <_ZN6ds13076r_jourEv>
if((curent_day&0x0F) == 0x09) // Si 1e digit = 9
adc: 98 2f mov r25, r24
ade: 9f 70 andi r25, 0x0F ; 15
ae0: 99 30 cpi r25, 0x09 ; 9
ae2: 09 f0 breq .+2 ; 0xae6 <__stack+0x1e7>
ae4: d0 ce rjmp .-608 ; 0x886 <_Z6boutonv+0x1f0>
ae6: cb ce rjmp .-618 ; 0x87e <_Z6boutonv+0x1e8>
ae8: ef e9 ldi r30, 0x9F ; 159
aea: ff e0 ldi r31, 0x0F ; 15
aec: 31 97 sbiw r30, 0x01 ; 1
aee: f1 f7 brne .-4 ; 0xaec <__stack+0x1ed>
af0: 00 c0 rjmp .+0 ; 0xaf2 <__stack+0x1f3>
af2: 00 00 nop
af4: 01 97 sbiw r24, 0x01 ; 1
clignotement(SR_JOURS, true);
else
affichage_date();
if(PINB & (1<<BP_PLUS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
af6: 00 97 sbiw r24, 0x00 ; 0
af8: 69 f3 breq .-38 ; 0xad4 <__stack+0x1d5>
afa: be ce rjmp .-644 ; 0x878 <_Z6boutonv+0x1e2>
}
else if(PINB & (1<<BP_MOINS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & 1<<BP_MOINS); b++)
_delay_ms(1);
uint8_t curent_heur = rtc.r_jour(); //Lecture du temps DS1307
afc: 8d e0 ldi r24, 0x0D ; 13
afe: 91 e0 ldi r25, 0x01 ; 1
b00: 0e 94 bc 0a call 0x1578 ; 0x1578 <_ZN6ds13076r_jourEv>
if((curent_heur&0x0F) == 0) // Si 1e digit = 0
b04: 98 2f mov r25, r24
b06: 9f 70 andi r25, 0x0F ; 15
b08: 09 f4 brne .+2 ; 0xb0c <__stack+0x20d>
b0a: d0 ce rjmp .-608 ; 0x8ac <_Z6boutonv+0x216>
b0c: dc ce rjmp .-584 ; 0x8c6 <_Z6boutonv+0x230>
b0e: ef e9 ldi r30, 0x9F ; 159
b10: ff e0 ldi r31, 0x0F ; 15
b12: 31 97 sbiw r30, 0x01 ; 1
b14: f1 f7 brne .-4 ; 0xb12 <__stack+0x213>
b16: 00 c0 rjmp .+0 ; 0xb18 <__stack+0x219>
b18: 00 00 nop
b1a: 01 97 sbiw r24, 0x01 ; 1
curent_day = 0x00;
rtc.w_date(curent_day); //Met à jour le DS1307
}
else if(PINB & (1<<BP_MOINS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & 1<<BP_MOINS); b++)
b1c: 00 97 sbiw r24, 0x00 ; 0
b1e: 71 f3 breq .-36 ; 0xafc <__stack+0x1fd>
b20: c2 ce rjmp .-636 ; 0x8a6 <_Z6boutonv+0x210>
affichage_date();
if(PINB & (1<<BP_PLUS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
_delay_ms(1);
uint8_t curent_months = rtc.r_moi();//Lecture du temps DS1307
b22: 8d e0 ldi r24, 0x0D ; 13
b24: 91 e0 ldi r25, 0x01 ; 1
b26: 0e 94 c0 0a call 0x1580 ; 0x1580 <_ZN6ds13075r_moiEv>
if((curent_months&0x0F) == 0x09) // Si 1e digit = 9
b2a: 98 2f mov r25, r24
b2c: 9f 70 andi r25, 0x0F ; 15
b2e: 99 30 cpi r25, 0x09 ; 9
b30: 09 f0 breq .+2 ; 0xb34 <__stack+0x235>
b32: eb ce rjmp .-554 ; 0x90a <__stack+0xb>
b34: e6 ce rjmp .-564 ; 0x902 <__stack+0x3>
b36: ef e9 ldi r30, 0x9F ; 159
b38: ff e0 ldi r31, 0x0F ; 15
b3a: 31 97 sbiw r30, 0x01 ; 1
b3c: f1 f7 brne .-4 ; 0xb3a <__stack+0x23b>
b3e: 00 c0 rjmp .+0 ; 0xb40 <__stack+0x241>
b40: 00 00 nop
b42: 01 97 sbiw r24, 0x01 ; 1
clignotement(SR_MOIS, true);
else
affichage_date();
if(PINB & (1<<BP_PLUS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
b44: 00 97 sbiw r24, 0x00 ; 0
b46: 69 f3 breq .-38 ; 0xb22 <__stack+0x223>
b48: d9 ce rjmp .-590 ; 0x8fc <_Z6boutonv+0x266>
}
else if(PINB & (1<<BP_MOINS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & 1<<BP_MOINS); b++)
_delay_ms(1);
uint8_t curent_months = rtc.r_moi();//Lecture du temps DS1307
b4a: 8d e0 ldi r24, 0x0D ; 13
b4c: 91 e0 ldi r25, 0x01 ; 1
b4e: 0e 94 c0 0a call 0x1580 ; 0x1580 <_ZN6ds13075r_moiEv>
if((curent_months&0x0F) == 0) // Si 1e digit = 0
b52: 98 2f mov r25, r24
b54: 9f 70 andi r25, 0x0F ; 15
b56: 09 f4 brne .+2 ; 0xb5a <__stack+0x25b>
b58: eb ce rjmp .-554 ; 0x930 <__stack+0x31>
b5a: f7 ce rjmp .-530 ; 0x94a <__stack+0x4b>
b5c: ef e9 ldi r30, 0x9F ; 159
b5e: ff e0 ldi r31, 0x0F ; 15
b60: 31 97 sbiw r30, 0x01 ; 1
b62: f1 f7 brne .-4 ; 0xb60 <__stack+0x261>
b64: 00 c0 rjmp .+0 ; 0xb66 <__stack+0x267>
b66: 00 00 nop
b68: 01 97 sbiw r24, 0x01 ; 1
curent_months = 0x01;
rtc.w_moi(curent_months); //Met à jour le DS1307
}
else if(PINB & (1<<BP_MOINS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & 1<<BP_MOINS); b++)
b6a: 00 97 sbiw r24, 0x00 ; 0
b6c: 71 f3 breq .-36 ; 0xb4a <__stack+0x24b>
b6e: dd ce rjmp .-582 ; 0x92a <__stack+0x2b>
b70: ef e9 ldi r30, 0x9F ; 159
b72: ff e0 ldi r31, 0x0F ; 15
b74: 31 97 sbiw r30, 0x01 ; 1
b76: f1 f7 brne .-4 ; 0xb74 <__stack+0x275>
b78: 00 c0 rjmp .+0 ; 0xb7a <__stack+0x27b>
b7a: 00 00 nop
b7c: 01 97 sbiw r24, 0x01 ; 1
clignotement(SR_ANNEE, true);
else
affichage_date();
if(PINB & (1<<BP_PLUS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & (1<<BP_PLUS)); b++)
b7e: 00 97 sbiw r24, 0x00 ; 0
b80: 09 f0 breq .+2 ; 0xb84 <__stack+0x285>
b82: fe ce rjmp .-516 ; 0x980 <__stack+0x81>
_delay_ms(1);
uint8_t curent_year = rtc.r_year();//Lecture du temps DS1307
b84: 8d e0 ldi r24, 0x0D ; 13
b86: 91 e0 ldi r25, 0x01 ; 1
b88: 0e 94 c4 0a call 0x1588 ; 0x1588 <_ZN6ds13076r_yearEv>
if((curent_year&0x0F) == 0x09) // Si 1e digit = 9
b8c: 98 2f mov r25, r24
b8e: 9f 70 andi r25, 0x0F ; 15
b90: 99 30 cpi r25, 0x09 ; 9
b92: 09 f0 breq .+2 ; 0xb96 <__stack+0x297>
b94: fc ce rjmp .-520 ; 0x98e <__stack+0x8f>
b96: f7 ce rjmp .-530 ; 0x986 <__stack+0x87>
}
else if(PINB & (1<<BP_MOINS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & 1<<BP_MOINS); b++)
_delay_ms(1);
uint8_t curent_year = rtc.r_year();//Lecture du temps DS1307
b98: 8d e0 ldi r24, 0x0D ; 13
b9a: 91 e0 ldi r25, 0x01 ; 1
b9c: 0e 94 c4 0a call 0x1588 ; 0x1588 <_ZN6ds13076r_yearEv>
if((curent_year&0x0F) == 0 && curent_year != 0x00) // Si 1e digit = 0
ba0: 98 2f mov r25, r24
ba2: 9f 70 andi r25, 0x0F ; 15
ba4: 09 f4 brne .+2 ; 0xba8 <__stack+0x2a9>
ba6: 06 cf rjmp .-500 ; 0x9b4 <__stack+0xb5>
ba8: 14 cf rjmp .-472 ; 0x9d2 <__stack+0xd3>
baa: ef e9 ldi r30, 0x9F ; 159
bac: ff e0 ldi r31, 0x0F ; 15
bae: 31 97 sbiw r30, 0x01 ; 1
bb0: f1 f7 brne .-4 ; 0xbae <__stack+0x2af>
bb2: 00 c0 rjmp .+0 ; 0xbb4 <__stack+0x2b5>
bb4: 00 00 nop
bb6: 01 97 sbiw r24, 0x01 ; 1
curent_year = 0x00;
rtc.w_year(curent_year); //Met à jour le DS1307
}
else if(PINB & (1<<BP_MOINS))
{
for(int b = 0 ; b < tmps_max_bp_plus_moins && (PINB & 1<<BP_MOINS); b++)
bb8: 00 97 sbiw r24, 0x00 ; 0
bba: 71 f3 breq .-36 ; 0xb98 <__stack+0x299>
bbc: f8 ce rjmp .-528 ; 0x9ae <__stack+0xaf>
rtc.w_year(curent_year); //Met à jour le DS1307
}
break;
}
PORTC &= LOW(1<<SR_SECONDE|1<<SR_MINUTE|1<<SR_HEUR); //Active tous les registre à décalage
bbe: 88 b1 in r24, 0x08 ; 8
bc0: 88 7f andi r24, 0xF8 ; 248
bc2: 88 b9 out 0x08, r24 ; 8
bc4: 8f e9 ldi r24, 0x9F ; 159
bc6: 9f e0 ldi r25, 0x0F ; 15
bc8: 01 97 sbiw r24, 0x01 ; 1
bca: f1 f7 brne .-4 ; 0xbc8 <__stack+0x2c9>
bcc: 00 c0 rjmp .+0 ; 0xbce <__stack+0x2cf>
bce: 00 00 nop
if (PINB & (1<<BP_CONF)) //Si le BP Conf est activé
{
while(PINB & (1<<BP_CONF)) //Attente que le BP sois relaché
_delay_ms(1);
int pousse = 1;
for( int a = 0 ; pousse <= 6 ; a++) //Boucle infinie tant qu'on a pas poussé 6 fois sur le bp et init de la variable pour clignotement
bd0: 0f 5f subi r16, 0xFF ; 255
bd2: 1f 4f sbci r17, 0xFF ; 255
bd4: 78 cd rjmp .-1296 ; 0x6c6 <_Z6boutonv+0x30>
}
PORTC &= LOW(1<<SR_SECONDE|1<<SR_MINUTE|1<<SR_HEUR); //Active tous les registre à décalage
_delay_ms(1); //Attente de 1ms pour le comptage de la variable a
}
}
}
bd6: df 91 pop r29
bd8: cf 91 pop r28
bda: 1f 91 pop r17
bdc: 0f 91 pop r16
bde: ff 90 pop r15
be0: ef 90 pop r14
be2: df 90 pop r13
be4: cf 90 pop r12
be6: bf 90 pop r11
be8: 08 95 ret
00000bea <_Z11uart_ds1307v>:
void uart_ds1307()
{
bea: cf 92 push r12
bec: df 92 push r13
bee: ef 92 push r14
bf0: ff 92 push r15
bf2: 0f 93 push r16
bf4: 1f 93 push r17
bf6: cf 93 push r28
bf8: df 93 push r29
if(usart == 0xCF)
bfa: 80 91 02 01 lds r24, 0x0102
bfe: 8f 3c cpi r24, 0xCF ; 207
c00: 09 f0 breq .+2 ; 0xc04 <_Z11uart_ds1307v+0x1a>
c02: bd c0 rjmp .+378 ; 0xd7e <_Z11uart_ds1307v+0x194>
c04: b1 c0 rjmp .+354 ; 0xd68 <_Z11uart_ds1307v+0x17e>
bool cfg = true;
for(int a = 0; cfg ; a++)
{
usart = USART_Receive();
if(a>100)
a=0;
c06: 0c 2d mov r16, r12
c08: 1d 2d mov r17, r13
if(usart == 0xC1)
c0a: 81 3c cpi r24, 0xC1 ; 193
c0c: 49 f5 brne .+82 ; 0xc60 <_Z11uart_ds1307v+0x76>
{
usart = USART_Receive();
c0e: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
c12: 80 93 02 01 sts 0x0102, r24
for(int b = 0; !usart ; b++)
c16: 88 23 and r24, r24
c18: 09 f4 brne .+2 ; 0xc1c <_Z11uart_ds1307v+0x32>
c1a: 9d c0 rjmp .+314 ; 0xd56 <_Z11uart_ds1307v+0x16c>
c1c: 16 c0 rjmp .+44 ; 0xc4a <_Z11uart_ds1307v+0x60>
{
usart = USART_Receive();
c1e: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
c22: 80 93 02 01 sts 0x0102, r24
affichage_heur();
c26: 0e 94 98 00 call 0x130 ; 0x130 <_Z14affichage_heurv>
if(b>100)
c2a: c5 36 cpi r28, 0x65 ; 101
c2c: d1 05 cpc r29, r1
c2e: 14 f0 brlt .+4 ; 0xc34 <_Z11uart_ds1307v+0x4a>
b=0;
c30: ce 2d mov r28, r14
c32: df 2d mov r29, r15
c34: 8f e9 ldi r24, 0x9F ; 159
c36: 9f e0 ldi r25, 0x0F ; 15
c38: 01 97 sbiw r24, 0x01 ; 1
c3a: f1 f7 brne .-4 ; 0xc38 <_Z11uart_ds1307v+0x4e>
c3c: 00 c0 rjmp .+0 ; 0xc3e <_Z11uart_ds1307v+0x54>
c3e: 00 00 nop
if(a>100)
a=0;
if(usart == 0xC1)
{
usart = USART_Receive();
for(int b = 0; !usart ; b++)
c40: 21 96 adiw r28, 0x01 ; 1
c42: 80 91 02 01 lds r24, 0x0102
c46: 88 23 and r24, r24
c48: 51 f3 breq .-44 ; 0xc1e <_Z11uart_ds1307v+0x34>
affichage_heur();
if(b>100)
b=0;
_delay_ms(1);
}
rtc.w_seconde(int_to_bcd(usart));
c4a: 90 e0 ldi r25, 0x00 ; 0
c4c: 0e 94 60 00 call 0xc0 ; 0xc0 <_Z10int_to_bcdi>
c50: 68 2f mov r22, r24
c52: 8d e0 ldi r24, 0x0D ; 13
c54: 91 e0 ldi r25, 0x01 ; 1
c56: 0e 94 c8 0a call 0x1590 ; 0x1590 <_ZN6ds13079w_secondeEh>
USART_Transmit(0xC1);
c5a: 81 ec ldi r24, 0xC1 ; 193
c5c: 0e 94 2e 0b call 0x165c ; 0x165c <_Z14USART_Transmith>
}
if(usart == 0xC2)
c60: 80 91 02 01 lds r24, 0x0102
c64: 82 3c cpi r24, 0xC2 ; 194
c66: 49 f5 brne .+82 ; 0xcba <_Z11uart_ds1307v+0xd0>
{
usart = USART_Receive();
c68: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
c6c: 80 93 02 01 sts 0x0102, r24
for(int b = 0; !usart ; b++)
c70: 88 23 and r24, r24
c72: 09 f4 brne .+2 ; 0xc76 <_Z11uart_ds1307v+0x8c>
c74: 67 c0 rjmp .+206 ; 0xd44 <_Z11uart_ds1307v+0x15a>
c76: 16 c0 rjmp .+44 ; 0xca4 <_Z11uart_ds1307v+0xba>
{
usart = USART_Receive();
c78: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
c7c: 80 93 02 01 sts 0x0102, r24
affichage_heur();
c80: 0e 94 98 00 call 0x130 ; 0x130 <_Z14affichage_heurv>
if(b>100)
c84: c5 36 cpi r28, 0x65 ; 101
c86: d1 05 cpc r29, r1
c88: 14 f0 brlt .+4 ; 0xc8e <_Z11uart_ds1307v+0xa4>
b=0;
c8a: ce 2d mov r28, r14
c8c: df 2d mov r29, r15
c8e: 8f e9 ldi r24, 0x9F ; 159
c90: 9f e0 ldi r25, 0x0F ; 15
c92: 01 97 sbiw r24, 0x01 ; 1
c94: f1 f7 brne .-4 ; 0xc92 <_Z11uart_ds1307v+0xa8>
c96: 00 c0 rjmp .+0 ; 0xc98 <_Z11uart_ds1307v+0xae>
c98: 00 00 nop
USART_Transmit(0xC1);
}
if(usart == 0xC2)
{
usart = USART_Receive();
for(int b = 0; !usart ; b++)
c9a: 21 96 adiw r28, 0x01 ; 1
c9c: 80 91 02 01 lds r24, 0x0102
ca0: 88 23 and r24, r24
ca2: 51 f3 breq .-44 ; 0xc78 <_Z11uart_ds1307v+0x8e>
affichage_heur();
if(b>100)
b=0;
_delay_ms(1);
}
rtc.w_minute(int_to_bcd(usart));
ca4: 90 e0 ldi r25, 0x00 ; 0
ca6: 0e 94 60 00 call 0xc0 ; 0xc0 <_Z10int_to_bcdi>
caa: 68 2f mov r22, r24
cac: 8d e0 ldi r24, 0x0D ; 13
cae: 91 e0 ldi r25, 0x01 ; 1
cb0: 0e 94 ce 0a call 0x159c ; 0x159c <_ZN6ds13078w_minuteEh>
USART_Transmit(0xC2);
cb4: 82 ec ldi r24, 0xC2 ; 194
cb6: 0e 94 2e 0b call 0x165c ; 0x165c <_Z14USART_Transmith>
}
if(usart == 0xC3)
cba: 80 91 02 01 lds r24, 0x0102
cbe: 83 3c cpi r24, 0xC3 ; 195
cc0: 49 f5 brne .+82 ; 0xd14 <_Z11uart_ds1307v+0x12a>
{
usart = USART_Receive();
cc2: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
cc6: 80 93 02 01 sts 0x0102, r24
for(int b = 0; !usart ; b++)
cca: 88 23 and r24, r24
ccc: 91 f1 breq .+100 ; 0xd32 <_Z11uart_ds1307v+0x148>
cce: 16 c0 rjmp .+44 ; 0xcfc <_Z11uart_ds1307v+0x112>
{
usart = USART_Receive();
cd0: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
cd4: 80 93 02 01 sts 0x0102, r24
affichage_heur();
cd8: 0e 94 98 00 call 0x130 ; 0x130 <_Z14affichage_heurv>
if(b>100)
cdc: c5 36 cpi r28, 0x65 ; 101
cde: d1 05 cpc r29, r1
ce0: 14 f0 brlt .+4 ; 0xce6 <_Z11uart_ds1307v+0xfc>
b=0;
ce2: ce 2d mov r28, r14
ce4: df 2d mov r29, r15
ce6: 8f e9 ldi r24, 0x9F ; 159
ce8: 9f e0 ldi r25, 0x0F ; 15
cea: 01 97 sbiw r24, 0x01 ; 1
cec: f1 f7 brne .-4 ; 0xcea <_Z11uart_ds1307v+0x100>
cee: 00 c0 rjmp .+0 ; 0xcf0 <_Z11uart_ds1307v+0x106>
cf0: 00 00 nop
USART_Transmit(0xC2);
}
if(usart == 0xC3)
{
usart = USART_Receive();
for(int b = 0; !usart ; b++)
cf2: 21 96 adiw r28, 0x01 ; 1
cf4: 80 91 02 01 lds r24, 0x0102
cf8: 88 23 and r24, r24
cfa: 51 f3 breq .-44 ; 0xcd0 <_Z11uart_ds1307v+0xe6>
affichage_heur();
if(b>100)
b=0;
_delay_ms(1);
}
rtc.w_heur(int_to_bcd(usart), 0);
cfc: 90 e0 ldi r25, 0x00 ; 0
cfe: 0e 94 60 00 call 0xc0 ; 0xc0 <_Z10int_to_bcdi>
d02: 40 e0 ldi r20, 0x00 ; 0
d04: 68 2f mov r22, r24
d06: 8d e0 ldi r24, 0x0D ; 13
d08: 91 e0 ldi r25, 0x01 ; 1
d0a: 0e 94 d4 0a call 0x15a8 ; 0x15a8 <_ZN6ds13076w_heurEhh>
USART_Transmit(0xC3);
d0e: 83 ec ldi r24, 0xC3 ; 195
d10: 0e 94 2e 0b call 0x165c ; 0x165c <_Z14USART_Transmith>
}
if(usart == 0xC4)
d14: 80 91 02 01 lds r24, 0x0102
d18: 84 3c cpi r24, 0xC4 ; 196
d1a: 89 f1 breq .+98 ; 0xd7e <_Z11uart_ds1307v+0x194>
void uart_ds1307()
{
if(usart == 0xCF)
{
bool cfg = true;
for(int a = 0; cfg ; a++)
d1c: 0f 5f subi r16, 0xFF ; 255
d1e: 1f 4f sbci r17, 0xFF ; 255
{
usart = USART_Receive();
d20: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
d24: 80 93 02 01 sts 0x0102, r24
if(a>100)
d28: 05 36 cpi r16, 0x65 ; 101
d2a: 11 05 cpc r17, r1
d2c: 0c f0 brlt .+2 ; 0xd30 <_Z11uart_ds1307v+0x146>
d2e: 6b cf rjmp .-298 ; 0xc06 <_Z11uart_ds1307v+0x1c>
d30: 6c cf rjmp .-296 ; 0xc0a <_Z11uart_ds1307v+0x20>
if(usart == 0xC3)
{
usart = USART_Receive();
for(int b = 0; !usart ; b++)
{
usart = USART_Receive();
d32: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
d36: 80 93 02 01 sts 0x0102, r24
affichage_heur();
d3a: 0e 94 98 00 call 0x130 ; 0x130 <_Z14affichage_heurv>
USART_Transmit(0xC2);
}
if(usart == 0xC3)
{
usart = USART_Receive();
for(int b = 0; !usart ; b++)
d3e: cc 2d mov r28, r12
d40: dd 2d mov r29, r13
d42: d1 cf rjmp .-94 ; 0xce6 <_Z11uart_ds1307v+0xfc>
if(usart == 0xC2)
{
usart = USART_Receive();
for(int b = 0; !usart ; b++)
{
usart = USART_Receive();
d44: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
d48: 80 93 02 01 sts 0x0102, r24
affichage_heur();
d4c: 0e 94 98 00 call 0x130 ; 0x130 <_Z14affichage_heurv>
USART_Transmit(0xC1);
}
if(usart == 0xC2)
{
usart = USART_Receive();
for(int b = 0; !usart ; b++)
d50: cc 2d mov r28, r12
d52: dd 2d mov r29, r13
d54: 9c cf rjmp .-200 ; 0xc8e <_Z11uart_ds1307v+0xa4>
if(usart == 0xC1)
{
usart = USART_Receive();
for(int b = 0; !usart ; b++)
{
usart = USART_Receive();
d56: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
d5a: 80 93 02 01 sts 0x0102, r24
affichage_heur();
d5e: 0e 94 98 00 call 0x130 ; 0x130 <_Z14affichage_heurv>
if(a>100)
a=0;
if(usart == 0xC1)
{
usart = USART_Receive();
for(int b = 0; !usart ; b++)
d62: cc 2d mov r28, r12
d64: dd 2d mov r29, r13
d66: 66 cf rjmp .-308 ; 0xc34 <_Z11uart_ds1307v+0x4a>
if(usart == 0xCF)
{
bool cfg = true;
for(int a = 0; cfg ; a++)
{
usart = USART_Receive();
d68: 0e 94 36 0b call 0x166c ; 0x166c <_Z13USART_Receivev>
d6c: 80 93 02 01 sts 0x0102, r24
d70: 00 e0 ldi r16, 0x00 ; 0
d72: 10 e0 ldi r17, 0x00 ; 0
if(a>100)
a=0;
if(usart == 0xC1)
{
usart = USART_Receive();
for(int b = 0; !usart ; b++)
d74: c1 2c mov r12, r1
d76: d1 2c mov r13, r1
{
usart = USART_Receive();
affichage_heur();
if(b>100)
b=0;
d78: ec 2c mov r14, r12
d7a: fd 2c mov r15, r13
d7c: 46 cf rjmp .-372 ; 0xc0a <_Z11uart_ds1307v+0x20>
{
cfg =false;
}
}
}
}
d7e: df 91 pop r29
d80: cf 91 pop r28
d82: 1f 91 pop r17
d84: 0f 91 pop r16
d86: ff 90 pop r15
d88: ef 90 pop r14
d8a: df 90 pop r13
d8c: cf 90 pop r12
d8e: 08 95 ret
00000d90 <_GLOBAL__sub_I_rtc>:
d90: 0f 93 push r16
d92: 1f 93 push r17
/* Création des objets */
ds1307 rtc;
d94: 8d e0 ldi r24, 0x0D ; 13
d96: 91 e0 ldi r25, 0x01 ; 1
d98: 0e 94 1e 0a call 0x143c ; 0x143c <_ZN6ds1307C1Ev>
hc74595 shiftRegister(SHIFT_REGISTER_DATA, SHIFT_REGISTER_CLK, SHIFT_REGISTER_CONFIRM, &PORTD);
d9c: 0b e2 ldi r16, 0x2B ; 43
d9e: 10 e0 ldi r17, 0x00 ; 0
da0: 25 e0 ldi r18, 0x05 ; 5
da2: 30 e0 ldi r19, 0x00 ; 0
da4: 47 e0 ldi r20, 0x07 ; 7
da6: 50 e0 ldi r21, 0x00 ; 0
da8: 66 e0 ldi r22, 0x06 ; 6
daa: 70 e0 ldi r23, 0x00 ; 0
dac: 83 e0 ldi r24, 0x03 ; 3
dae: 91 e0 ldi r25, 0x01 ; 1
db0: 0e 94 dd 06 call 0xdba ; 0xdba <_ZN7hc74595C1EiiiPVh>
{
cfg =false;
}
}
}
}
db4: 1f 91 pop r17
db6: 0f 91 pop r16
db8: 08 95 ret
00000dba <_ZN7hc74595C1EiiiPVh>:
#define F_CPU 16000000UL
#include <avr/io.h>
#include <util/delay.h>
#include "hc74595.h"
hc74595::hc74595(int data, int clk, int stcp,volatile uint8_t *port_uc/*, volatile uint8_t *ddr_uc*/)
dba: 0f 93 push r16
dbc: 1f 93 push r17
dbe: fc 01 movw r30, r24
{
pin_DATA = data;
dc0: 60 83 st Z, r22
dc2: 71 83 std Z+1, r23 ; 0x01
pin_CLK = clk;
dc4: 42 83 std Z+2, r20 ; 0x02
dc6: 53 83 std Z+3, r21 ; 0x03
pin_STCP = stcp;
dc8: 24 83 std Z+4, r18 ; 0x04
dca: 35 83 std Z+5, r19 ; 0x05
port = port_uc;
dcc: 17 83 std Z+7, r17 ; 0x07
dce: 06 83 std Z+6, r16 ; 0x06
ddr = --port_uc;
dd0: d8 01 movw r26, r16
dd2: 11 97 sbiw r26, 0x01 ; 1
dd4: b1 87 std Z+9, r27 ; 0x09
dd6: a0 87 std Z+8, r26 ; 0x08
*ddr |= (0x01 << data | 0x01 << clk | 0x01 << stcp);
dd8: 5c 91 ld r21, X
dda: 81 e0 ldi r24, 0x01 ; 1
ddc: 90 e0 ldi r25, 0x00 ; 0
dde: fc 01 movw r30, r24
de0: 02 c0 rjmp .+4 ; 0xde6 <_ZN7hc74595C1EiiiPVh+0x2c>
de2: ee 0f add r30, r30
de4: ff 1f adc r31, r31
de6: 2a 95 dec r18
de8: e2 f7 brpl .-8 ; 0xde2 <_ZN7hc74595C1EiiiPVh+0x28>
dea: 9f 01 movw r18, r30
dec: 25 2b or r18, r21
dee: fc 01 movw r30, r24
df0: 02 c0 rjmp .+4 ; 0xdf6 <_ZN7hc74595C1EiiiPVh+0x3c>
df2: ee 0f add r30, r30
df4: ff 1f adc r31, r31
df6: 4a 95 dec r20
df8: e2 f7 brpl .-8 ; 0xdf2 <_ZN7hc74595C1EiiiPVh+0x38>
dfa: af 01 movw r20, r30
dfc: 42 2b or r20, r18
dfe: 02 c0 rjmp .+4 ; 0xe04 <_ZN7hc74595C1EiiiPVh+0x4a>
e00: 88 0f add r24, r24
e02: 99 1f adc r25, r25
e04: 6a 95 dec r22
e06: e2 f7 brpl .-8 ; 0xe00 <_ZN7hc74595C1EiiiPVh+0x46>
e08: 84 2b or r24, r20
e0a: 8c 93 st X, r24
}
e0c: 1f 91 pop r17
e0e: 0f 91 pop r16
e10: 08 95 ret
00000e12 <_ZN7hc745954sendEhb>:
void hc74595::send(uint8_t data, bool inverted) //Envoi des donnée au Shift Register
{
e12: 0f 93 push r16
e14: 1f 93 push r17
e16: cf 93 push r28
e18: df 93 push r29
e1a: fc 01 movw r30, r24
for(int a = 0; a < 8 ; a++)
e1c: 80 e0 ldi r24, 0x00 ; 0
e1e: 90 e0 ldi r25, 0x00 ; 0
*port &= ~(0x01 << pin_DATA);
*port|= 0x01 << pin_CLK; //Met l'orloge à 1
}
else
{
*port &= ~(0x01 << pin_CLK); //Met l'orloge à 0
e20: 21 e0 ldi r18, 0x01 ; 1
e22: 30 e0 ldi r19, 0x00 ; 0
if(data & (0x80 >> a)) //Regarde la valeur de chaque bit
e24: 00 e8 ldi r16, 0x80 ; 128
e26: 10 e0 ldi r17, 0x00 ; 0
e28: 70 e0 ldi r23, 0x00 ; 0
void hc74595::send(uint8_t data, bool inverted) //Envoi des donnée au Shift Register
{
for(int a = 0; a < 8 ; a++)
{
if(!inverted)
e2a: 41 11 cpse r20, r1
e2c: 3d c0 rjmp .+122 ; 0xea8 <_ZN7hc745954sendEhb+0x96>
{
*port &= ~(0x01 << pin_CLK); //Met l'orloge à 0
e2e: a6 81 ldd r26, Z+6 ; 0x06
e30: b7 81 ldd r27, Z+7 ; 0x07
e32: 5c 91 ld r21, X
e34: e9 01 movw r28, r18
e36: 02 80 ldd r0, Z+2 ; 0x02
e38: 02 c0 rjmp .+4 ; 0xe3e <_ZN7hc745954sendEhb+0x2c>
e3a: cc 0f add r28, r28
e3c: dd 1f adc r29, r29
e3e: 0a 94 dec r0
e40: e2 f7 brpl .-8 ; 0xe3a <_ZN7hc745954sendEhb+0x28>
e42: c0 95 com r28
e44: c5 23 and r28, r21
e46: cc 93 st X, r28
if(data & (0x01 << a)) //Regarde la valeur de chaque bit
e48: db 01 movw r26, r22
e4a: 08 2e mov r0, r24
e4c: 02 c0 rjmp .+4 ; 0xe52 <_ZN7hc745954sendEhb+0x40>
e4e: b5 95 asr r27
e50: a7 95 ror r26
e52: 0a 94 dec r0
e54: e2 f7 brpl .-8 ; 0xe4e <_ZN7hc745954sendEhb+0x3c>
e56: a0 ff sbrs r26, 0
e58: 0d c0 rjmp .+26 ; 0xe74 <_ZN7hc745954sendEhb+0x62>
*port |= 0x01 << pin_DATA;
e5a: a6 81 ldd r26, Z+6 ; 0x06
e5c: b7 81 ldd r27, Z+7 ; 0x07
e5e: 5c 91 ld r21, X
e60: e9 01 movw r28, r18
e62: 00 80 ld r0, Z
e64: 02 c0 rjmp .+4 ; 0xe6a <_ZN7hc745954sendEhb+0x58>
e66: cc 0f add r28, r28
e68: dd 1f adc r29, r29
e6a: 0a 94 dec r0
e6c: e2 f7 brpl .-8 ; 0xe66 <_ZN7hc745954sendEhb+0x54>
e6e: c5 2b or r28, r21
e70: cc 93 st X, r28
e72: 0d c0 rjmp .+26 ; 0xe8e <_ZN7hc745954sendEhb+0x7c>
else
*port &= ~(0x01 << pin_DATA);
e74: a6 81 ldd r26, Z+6 ; 0x06
e76: b7 81 ldd r27, Z+7 ; 0x07
e78: 5c 91 ld r21, X
e7a: e9 01 movw r28, r18
e7c: 00 80 ld r0, Z
e7e: 02 c0 rjmp .+4 ; 0xe84 <_ZN7hc745954sendEhb+0x72>
e80: cc 0f add r28, r28
e82: dd 1f adc r29, r29
e84: 0a 94 dec r0
e86: e2 f7 brpl .-8 ; 0xe80 <_ZN7hc745954sendEhb+0x6e>
e88: c0 95 com r28
e8a: c5 23 and r28, r21
e8c: cc 93 st X, r28
*port|= 0x01 << pin_CLK; //Met l'orloge à 1
e8e: a6 81 ldd r26, Z+6 ; 0x06
e90: b7 81 ldd r27, Z+7 ; 0x07
e92: 5c 91 ld r21, X
e94: e9 01 movw r28, r18
e96: 02 80 ldd r0, Z+2 ; 0x02
e98: 02 c0 rjmp .+4 ; 0xe9e <_ZN7hc745954sendEhb+0x8c>
e9a: cc 0f add r28, r28
e9c: dd 1f adc r29, r29
e9e: 0a 94 dec r0
ea0: e2 f7 brpl .-8 ; 0xe9a <_ZN7hc745954sendEhb+0x88>
ea2: c5 2b or r28, r21
ea4: cc 93 st X, r28
ea6: 3e c0 rjmp .+124 ; 0xf24 <_ZN7hc745954sendEhb+0x112>
}
else
{
*port &= ~(0x01 << pin_CLK); //Met l'orloge à 0
ea8: a6 81 ldd r26, Z+6 ; 0x06
eaa: b7 81 ldd r27, Z+7 ; 0x07
eac: 5c 91 ld r21, X
eae: e9 01 movw r28, r18
eb0: 02 80 ldd r0, Z+2 ; 0x02
eb2: 02 c0 rjmp .+4 ; 0xeb8 <_ZN7hc745954sendEhb+0xa6>
eb4: cc 0f add r28, r28
eb6: dd 1f adc r29, r29
eb8: 0a 94 dec r0
eba: e2 f7 brpl .-8 ; 0xeb4 <_ZN7hc745954sendEhb+0xa2>
ebc: c0 95 com r28
ebe: c5 23 and r28, r21
ec0: cc 93 st X, r28
if(data & (0x80 >> a)) //Regarde la valeur de chaque bit
ec2: d8 01 movw r26, r16
ec4: 08 2e mov r0, r24
ec6: 02 c0 rjmp .+4 ; 0xecc <_ZN7hc745954sendEhb+0xba>
ec8: b5 95 asr r27
eca: a7 95 ror r26
ecc: 0a 94 dec r0
ece: e2 f7 brpl .-8 ; 0xec8 <_ZN7hc745954sendEhb+0xb6>
ed0: a6 23 and r26, r22
ed2: b7 23 and r27, r23
ed4: ab 2b or r26, r27
ed6: 69 f0 breq .+26 ; 0xef2 <_ZN7hc745954sendEhb+0xe0>
*port |= 0x01 << pin_DATA;
ed8: a6 81 ldd r26, Z+6 ; 0x06
eda: b7 81 ldd r27, Z+7 ; 0x07
edc: 5c 91 ld r21, X
ede: e9 01 movw r28, r18
ee0: 00 80 ld r0, Z
ee2: 02 c0 rjmp .+4 ; 0xee8 <_ZN7hc745954sendEhb+0xd6>
ee4: cc 0f add r28, r28
ee6: dd 1f adc r29, r29
ee8: 0a 94 dec r0
eea: e2 f7 brpl .-8 ; 0xee4 <_ZN7hc745954sendEhb+0xd2>
eec: c5 2b or r28, r21
eee: cc 93 st X, r28
ef0: 0d c0 rjmp .+26 ; 0xf0c <_ZN7hc745954sendEhb+0xfa>
else
*port &= ~(0x01 << pin_DATA);
ef2: a6 81 ldd r26, Z+6 ; 0x06
ef4: b7 81 ldd r27, Z+7 ; 0x07
ef6: 5c 91 ld r21, X
ef8: e9 01 movw r28, r18
efa: 00 80 ld r0, Z
efc: 02 c0 rjmp .+4 ; 0xf02 <_ZN7hc745954sendEhb+0xf0>
efe: cc 0f add r28, r28
f00: dd 1f adc r29, r29
f02: 0a 94 dec r0
f04: e2 f7 brpl .-8 ; 0xefe <_ZN7hc745954sendEhb+0xec>
f06: c0 95 com r28
f08: c5 23 and r28, r21
f0a: cc 93 st X, r28
*port |= 0x01 << pin_CLK; //Met l'orloge à 1
f0c: a6 81 ldd r26, Z+6 ; 0x06
f0e: b7 81 ldd r27, Z+7 ; 0x07
f10: 5c 91 ld r21, X
f12: e9 01 movw r28, r18
f14: 02 80 ldd r0, Z+2 ; 0x02
f16: 02 c0 rjmp .+4 ; 0xf1c <_ZN7hc745954sendEhb+0x10a>
f18: cc 0f add r28, r28
f1a: dd 1f adc r29, r29
f1c: 0a 94 dec r0
f1e: e2 f7 brpl .-8 ; 0xf18 <_ZN7hc745954sendEhb+0x106>
f20: c5 2b or r28, r21
f22: cc 93 st X, r28
*ddr |= (0x01 << data | 0x01 << clk | 0x01 << stcp);
}
void hc74595::send(uint8_t data, bool inverted) //Envoi des donnée au Shift Register
{
for(int a = 0; a < 8 ; a++)
f24: 01 96 adiw r24, 0x01 ; 1
f26: 88 30 cpi r24, 0x08 ; 8
f28: 91 05 cpc r25, r1
f2a: 09 f0 breq .+2 ; 0xf2e <_ZN7hc745954sendEhb+0x11c>
f2c: 7e cf rjmp .-260 ; 0xe2a <_ZN7hc745954sendEhb+0x18>
else
*port &= ~(0x01 << pin_DATA);
*port |= 0x01 << pin_CLK; //Met l'orloge à 1
}
}
}
f2e: df 91 pop r29
f30: cf 91 pop r28
f32: 1f 91 pop r17
f34: 0f 91 pop r16
f36: 08 95 ret
00000f38 <_ZN7hc745957confirmEv>:
void hc74595::confirm() //Envoi le signal du storage register
{
f38: fc 01 movw r30, r24
*port |= 0x01 << pin_STCP;
f3a: a6 81 ldd r26, Z+6 ; 0x06
f3c: b7 81 ldd r27, Z+7 ; 0x07
f3e: 4c 91 ld r20, X
f40: 21 e0 ldi r18, 0x01 ; 1
f42: 30 e0 ldi r19, 0x00 ; 0
f44: c9 01 movw r24, r18
f46: 04 80 ldd r0, Z+4 ; 0x04
f48: 02 c0 rjmp .+4 ; 0xf4e <_ZN7hc745957confirmEv+0x16>
f4a: 88 0f add r24, r24
f4c: 99 1f adc r25, r25
f4e: 0a 94 dec r0
f50: e2 f7 brpl .-8 ; 0xf4a <_ZN7hc745957confirmEv+0x12>
f52: 84 2b or r24, r20
f54: 8c 93 st X, r24
#else
//round up by default
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
#endif
__builtin_avr_delay_cycles(__ticks_dc);
f56: 85 e0 ldi r24, 0x05 ; 5
f58: 8a 95 dec r24
f5a: f1 f7 brne .-4 ; 0xf58 <_ZN7hc745957confirmEv+0x20>
f5c: 00 00 nop
_delay_us(1);
*port &= ~(0x01 << pin_STCP);
f5e: a6 81 ldd r26, Z+6 ; 0x06
f60: b7 81 ldd r27, Z+7 ; 0x07
f62: 4c 91 ld r20, X
f64: c9 01 movw r24, r18
f66: 04 80 ldd r0, Z+4 ; 0x04
f68: 02 c0 rjmp .+4 ; 0xf6e <_ZN7hc745957confirmEv+0x36>
f6a: 88 0f add r24, r24
f6c: 99 1f adc r25, r25
f6e: 0a 94 dec r0
f70: e2 f7 brpl .-8 ; 0xf6a <_ZN7hc745957confirmEv+0x32>
f72: 80 95 com r24
f74: 84 23 and r24, r20
f76: 8c 93 st X, r24
f78: 08 95 ret
00000f7a <_ZN5dcf772loEv>:
}
else
parasite_flag = true;
}
void dcf77::lo()
{
f7a: cf 92 push r12
f7c: df 92 push r13
f7e: ef 92 push r14
f80: ff 92 push r15
f82: 0f 93 push r16
f84: 1f 93 push r17
f86: cf 93 push r28
f88: df 93 push r29
f8a: ec 01 movw r28, r24
time_check = millis() - time_high_dcf77;
f8c: 0e 94 f2 0a call 0x15e4 ; 0x15e4 <_Z6millisv>
f90: cc 80 ldd r12, Y+4 ; 0x04
f92: dd 80 ldd r13, Y+5 ; 0x05
f94: ee 80 ldd r14, Y+6 ; 0x06
f96: ff 80 ldd r15, Y+7 ; 0x07
f98: 8b 01 movw r16, r22
f9a: 0c 19 sub r16, r12
f9c: 1d 09 sbc r17, r13
f9e: 1f 8b std Y+23, r17 ; 0x17
fa0: 0e 8b std Y+22, r16 ; 0x16
if( time_check >= temps_haut_min || time_high_dcf77 == 0)
fa2: 04 3f cpi r16, 0xF4 ; 244
fa4: 11 40 sbci r17, 0x01 ; 1
fa6: 20 f4 brcc .+8 ; 0xfb0 <_ZN5dcf772loEv+0x36>
fa8: cd 28 or r12, r13
faa: ce 28 or r12, r14
fac: cf 28 or r12, r15
fae: 71 f5 brne .+92 ; 0x100c <_ZN5dcf772loEv+0x92>
{
PORTB &= ~(1<<PINB5);//Led de debug à 0
fb0: 2d 98 cbi 0x05, 5 ; 5
parasite_flag = false;
fb2: 1d 8a std Y+21, r1 ; 0x15
time_high_dcf77 = millis() - time_high_dcf77; //Calcul du temps Haut
fb4: 0e 94 f2 0a call 0x15e4 ; 0x15e4 <_Z6millisv>
fb8: 0c 81 ldd r16, Y+4 ; 0x04
fba: 1d 81 ldd r17, Y+5 ; 0x05
fbc: 2e 81 ldd r18, Y+6 ; 0x06
fbe: 3f 81 ldd r19, Y+7 ; 0x07
fc0: ab 01 movw r20, r22
fc2: bc 01 movw r22, r24
fc4: 40 1b sub r20, r16
fc6: 51 0b sbc r21, r17
fc8: 62 0b sbc r22, r18
fca: 73 0b sbc r23, r19
fcc: 4c 83 std Y+4, r20 ; 0x04
fce: 5d 83 std Y+5, r21 ; 0x05
fd0: 6e 83 std Y+6, r22 ; 0x06
fd2: 7f 83 std Y+7, r23 ; 0x07
time_low_dcf77 = millis(); //Démarage du comptage du temps bas
fd4: 0e 94 f2 0a call 0x15e4 ; 0x15e4 <_Z6millisv>
fd8: 68 83 st Y, r22
fda: 79 83 std Y+1, r23 ; 0x01
fdc: 8a 83 std Y+2, r24 ; 0x02
fde: 9b 83 std Y+3, r25 ; 0x03
if(time_high_dcf77 > time_no_modulation | dcf77_flag_start) //Si le Temps bas est > à 800, début de la transmition
fe0: 81 e0 ldi r24, 0x01 ; 1
fe2: 4c 81 ldd r20, Y+4 ; 0x04
fe4: 5d 81 ldd r21, Y+5 ; 0x05
fe6: 6e 81 ldd r22, Y+6 ; 0x06
fe8: 7f 81 ldd r23, Y+7 ; 0x07
fea: 49 3e cpi r20, 0xE9 ; 233
fec: 53 40 sbci r21, 0x03 ; 3
fee: 61 05 cpc r22, r1
ff0: 71 05 cpc r23, r1
ff2: 08 f4 brcc .+2 ; 0xff6 <_ZN5dcf772loEv+0x7c>
ff4: 80 e0 ldi r24, 0x00 ; 0
ff6: 81 11 cpse r24, r1
ff8: 03 c0 rjmp .+6 ; 0x1000 <_ZN5dcf772loEv+0x86>
ffa: 88 85 ldd r24, Y+8 ; 0x08
ffc: 88 23 and r24, r24
ffe: 19 f0 breq .+6 ; 0x1006 <_ZN5dcf772loEv+0x8c>
{
dcf77_flag_start = 1;
1000: 81 e0 ldi r24, 0x01 ; 1
1002: 88 87 std Y+8, r24 ; 0x08
1004: 05 c0 rjmp .+10 ; 0x1010 <_ZN5dcf772loEv+0x96>
}
else
{
dcf77_status = en_attente_de_signal;
1006: 1a 8a std Y+18, r1 ; 0x12
1008: 19 8a std Y+17, r1 ; 0x11
100a: 02 c0 rjmp .+4 ; 0x1010 <_ZN5dcf772loEv+0x96>
}
}
else
parasite_flag = true;
100c: 81 e0 ldi r24, 0x01 ; 1
100e: 8d 8b std Y+21, r24 ; 0x15
}
1010: df 91 pop r29
1012: cf 91 pop r28
1014: 1f 91 pop r17
1016: 0f 91 pop r16
1018: ff 90 pop r15
101a: ef 90 pop r14
101c: df 90 pop r13
101e: cf 90 pop r12
1020: 08 95 ret
00001022 <_ZN5dcf776decodeEh>:
bool dcf77::decode(uint8_t bit)
{
1022: fc 01 movw r30, r24
bool flag_no_error = true;
if(bit_dcode_n == 0 && !bit) //Bit 00 Toujours à 0 si le contraire erreur
1024: 23 89 ldd r18, Z+19 ; 0x13
1026: 34 89 ldd r19, Z+20 ; 0x14
1028: 21 15 cp r18, r1
102a: 31 05 cpc r19, r1
102c: 31 f4 brne .+12 ; 0x103a <_ZN5dcf776decodeEh+0x18>
102e: 66 23 and r22, r22
1030: 09 f4 brne .+2 ; 0x1034 <_ZN5dcf776decodeEh+0x12>
1032: f4 c0 rjmp .+488 ; 0x121c <_ZN5dcf776decodeEh+0x1fa>
flag_no_error = false;
else if(bit_dcode_n >= 1 && bit_dcode_n <= 19); //Bits 01 à 19 ne nous interesse pas
1034: 40 e0 ldi r20, 0x00 ; 0
1036: 50 e0 ldi r21, 0x00 ; 0
1038: 3c c0 rjmp .+120 ; 0x10b2 <_ZN5dcf776decodeEh+0x90>
103a: a9 01 movw r20, r18
103c: c9 01 movw r24, r18
103e: 01 97 sbiw r24, 0x01 ; 1
1040: 43 97 sbiw r24, 0x13 ; 19
1042: 08 f4 brcc .+2 ; 0x1046 <_ZN5dcf776decodeEh+0x24>
1044: ed c0 rjmp .+474 ; 0x1220 <_ZN5dcf776decodeEh+0x1fe>
else if (bit_dcode_n == 20 && !bit) //Bit 20 Toujours à 1
1046: 24 31 cpi r18, 0x14 ; 20
1048: 31 05 cpc r19, r1
104a: 19 f4 brne .+6 ; 0x1052 <_ZN5dcf776decodeEh+0x30>
104c: 61 11 cpse r22, r1
104e: fc c0 rjmp .+504 ; 0x1248 <_ZN5dcf776decodeEh+0x226>
1050: e9 c0 rjmp .+466 ; 0x1224 <_ZN5dcf776decodeEh+0x202>
flag_no_error = false;
else if (bit_dcode_n >= 21 && bit_dcode_n <= 27) //Bit 21 à 27 = Minute
1052: c9 01 movw r24, r18
1054: 45 97 sbiw r24, 0x15 ; 21
1056: 07 97 sbiw r24, 0x07 ; 7
1058: 18 f5 brcc .+70 ; 0x10a0 <_ZN5dcf776decodeEh+0x7e>
{
if(bit)
105a: 66 23 and r22, r22
105c: 81 f0 breq .+32 ; 0x107e <_ZN5dcf776decodeEh+0x5c>
dcf77_Minute |= 1 << (bit_dcode_n-21);
105e: c9 01 movw r24, r18
1060: 45 97 sbiw r24, 0x15 ; 21
1062: 41 e0 ldi r20, 0x01 ; 1
1064: 50 e0 ldi r21, 0x00 ; 0
1066: ba 01 movw r22, r20
1068: 02 c0 rjmp .+4 ; 0x106e <_ZN5dcf776decodeEh+0x4c>
106a: 66 0f add r22, r22
106c: 77 1f adc r23, r23
106e: 8a 95 dec r24
1070: e2 f7 brpl .-8 ; 0x106a <_ZN5dcf776decodeEh+0x48>
1072: cb 01 movw r24, r22
1074: 93 85 ldd r25, Z+11 ; 0x0b
1076: 89 2b or r24, r25
1078: 83 87 std Z+11, r24 ; 0x0b
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
107a: 81 e0 ldi r24, 0x01 ; 1
107c: e0 c0 rjmp .+448 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
else if (bit_dcode_n >= 21 && bit_dcode_n <= 27) //Bit 21 à 27 = Minute
{
if(bit)
dcf77_Minute |= 1 << (bit_dcode_n-21);
else
dcf77_Minute &= ~(1 << (bit_dcode_n-21));
107e: c9 01 movw r24, r18
1080: 45 97 sbiw r24, 0x15 ; 21
1082: 41 e0 ldi r20, 0x01 ; 1
1084: 50 e0 ldi r21, 0x00 ; 0
1086: ba 01 movw r22, r20
1088: 02 c0 rjmp .+4 ; 0x108e <_ZN5dcf776decodeEh+0x6c>
108a: 66 0f add r22, r22
108c: 77 1f adc r23, r23
108e: 8a 95 dec r24
1090: e2 f7 brpl .-8 ; 0x108a <_ZN5dcf776decodeEh+0x68>
1092: cb 01 movw r24, r22
1094: 80 95 com r24
1096: 93 85 ldd r25, Z+11 ; 0x0b
1098: 89 23 and r24, r25
109a: 83 87 std Z+11, r24 ; 0x0b
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
109c: 81 e0 ldi r24, 0x01 ; 1
109e: cf c0 rjmp .+414 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
if(bit)
dcf77_Minute |= 1 << (bit_dcode_n-21);
else
dcf77_Minute &= ~(1 << (bit_dcode_n-21));
}
else if(bit_dcode_n == 28 && (dcf77_Minute&0x01) && !bit || bit_dcode_n == 28 && !(dcf77_Minute&0x01) && bit) //Bit de parité des minutes
10a0: 2c 31 cpi r18, 0x1C ; 28
10a2: 31 05 cpc r19, r1
10a4: 31 f4 brne .+12 ; 0x10b2 <_ZN5dcf776decodeEh+0x90>
10a6: 83 85 ldd r24, Z+11 ; 0x0b
10a8: 80 ff sbrs r24, 0
10aa: e0 c0 rjmp .+448 ; 0x126c <_ZN5dcf776decodeEh+0x24a>
10ac: 61 11 cpse r22, r1
10ae: d2 c0 rjmp .+420 ; 0x1254 <_ZN5dcf776decodeEh+0x232>
10b0: bb c0 rjmp .+374 ; 0x1228 <_ZN5dcf776decodeEh+0x206>
flag_no_error = false;
else if(bit_dcode_n >= 29 && bit_dcode_n <= 34) //Bit 29 à 34 = Heure
10b2: ca 01 movw r24, r20
10b4: 4d 97 sbiw r24, 0x1d ; 29
10b6: 06 97 sbiw r24, 0x06 ; 6
10b8: 18 f5 brcc .+70 ; 0x1100 <_ZN5dcf776decodeEh+0xde>
{
if(bit)
10ba: 66 23 and r22, r22
10bc: 81 f0 breq .+32 ; 0x10de <_ZN5dcf776decodeEh+0xbc>
dcf77_Heur |= 1 << (bit_dcode_n-29);
10be: c9 01 movw r24, r18
10c0: 4d 97 sbiw r24, 0x1d ; 29
10c2: 41 e0 ldi r20, 0x01 ; 1
10c4: 50 e0 ldi r21, 0x00 ; 0
10c6: ba 01 movw r22, r20
10c8: 02 c0 rjmp .+4 ; 0x10ce <_ZN5dcf776decodeEh+0xac>
10ca: 66 0f add r22, r22
10cc: 77 1f adc r23, r23
10ce: 8a 95 dec r24
10d0: e2 f7 brpl .-8 ; 0x10ca <_ZN5dcf776decodeEh+0xa8>
10d2: cb 01 movw r24, r22
10d4: 94 85 ldd r25, Z+12 ; 0x0c
10d6: 89 2b or r24, r25
10d8: 84 87 std Z+12, r24 ; 0x0c
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
10da: 81 e0 ldi r24, 0x01 ; 1
10dc: b0 c0 rjmp .+352 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
else if(bit_dcode_n >= 29 && bit_dcode_n <= 34) //Bit 29 à 34 = Heure
{
if(bit)
dcf77_Heur |= 1 << (bit_dcode_n-29);
else
dcf77_Heur &= ~(1 << (bit_dcode_n-29));
10de: c9 01 movw r24, r18
10e0: 4d 97 sbiw r24, 0x1d ; 29
10e2: 41 e0 ldi r20, 0x01 ; 1
10e4: 50 e0 ldi r21, 0x00 ; 0
10e6: ba 01 movw r22, r20
10e8: 02 c0 rjmp .+4 ; 0x10ee <_ZN5dcf776decodeEh+0xcc>
10ea: 66 0f add r22, r22
10ec: 77 1f adc r23, r23
10ee: 8a 95 dec r24
10f0: e2 f7 brpl .-8 ; 0x10ea <_ZN5dcf776decodeEh+0xc8>
10f2: cb 01 movw r24, r22
10f4: 80 95 com r24
10f6: 94 85 ldd r25, Z+12 ; 0x0c
10f8: 89 23 and r24, r25
10fa: 84 87 std Z+12, r24 ; 0x0c
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
10fc: 81 e0 ldi r24, 0x01 ; 1
10fe: 9f c0 rjmp .+318 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
if(bit)
dcf77_Heur |= 1 << (bit_dcode_n-29);
else
dcf77_Heur &= ~(1 << (bit_dcode_n-29));
}
else if(bit_dcode_n == 35 && (dcf77_Heur&0x01) && !bit || bit_dcode_n == 35 && !(dcf77_Heur&0x01) && bit) //Bit de parité des Heure
1100: 23 32 cpi r18, 0x23 ; 35
1102: 31 05 cpc r19, r1
1104: 81 f4 brne .+32 ; 0x1126 <_ZN5dcf776decodeEh+0x104>
1106: 84 85 ldd r24, Z+12 ; 0x0c
1108: 80 ff sbrs r24, 0
110a: 09 c0 rjmp .+18 ; 0x111e <_ZN5dcf776decodeEh+0xfc>
110c: 61 11 cpse r22, r1
110e: 0b c0 rjmp .+22 ; 0x1126 <_ZN5dcf776decodeEh+0x104>
1110: 8d c0 rjmp .+282 ; 0x122c <_ZN5dcf776decodeEh+0x20a>
1112: 23 32 cpi r18, 0x23 ; 35
1114: 31 05 cpc r19, r1
1116: 39 f4 brne .+14 ; 0x1126 <_ZN5dcf776decodeEh+0x104>
1118: 84 85 ldd r24, Z+12 ; 0x0c
111a: 80 fd sbrc r24, 0
111c: 04 c0 rjmp .+8 ; 0x1126 <_ZN5dcf776decodeEh+0x104>
111e: 66 23 and r22, r22
1120: 09 f4 brne .+2 ; 0x1124 <_ZN5dcf776decodeEh+0x102>
1122: 9e c0 rjmp .+316 ; 0x1260 <_ZN5dcf776decodeEh+0x23e>
1124: 85 c0 rjmp .+266 ; 0x1230 <_ZN5dcf776decodeEh+0x20e>
flag_no_error = false;
else if(bit_dcode_n >= 36 && bit_dcode_n <= 41) //Bit 36 à 41 = Jours du moi
1126: ca 01 movw r24, r20
1128: 84 97 sbiw r24, 0x24 ; 36
112a: 06 97 sbiw r24, 0x06 ; 6
112c: 18 f5 brcc .+70 ; 0x1174 <_ZN5dcf776decodeEh+0x152>
{
if(bit)
112e: 66 23 and r22, r22
1130: 81 f0 breq .+32 ; 0x1152 <_ZN5dcf776decodeEh+0x130>
dcf77_Daymonth |= 1 << (bit_dcode_n-36);
1132: c9 01 movw r24, r18
1134: 84 97 sbiw r24, 0x24 ; 36
1136: 41 e0 ldi r20, 0x01 ; 1
1138: 50 e0 ldi r21, 0x00 ; 0
113a: ba 01 movw r22, r20
113c: 02 c0 rjmp .+4 ; 0x1142 <_ZN5dcf776decodeEh+0x120>
113e: 66 0f add r22, r22
1140: 77 1f adc r23, r23
1142: 8a 95 dec r24
1144: e2 f7 brpl .-8 ; 0x113e <_ZN5dcf776decodeEh+0x11c>
1146: cb 01 movw r24, r22
1148: 95 85 ldd r25, Z+13 ; 0x0d
114a: 89 2b or r24, r25
114c: 85 87 std Z+13, r24 ; 0x0d
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
114e: 81 e0 ldi r24, 0x01 ; 1
1150: 76 c0 rjmp .+236 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
else if(bit_dcode_n >= 36 && bit_dcode_n <= 41) //Bit 36 à 41 = Jours du moi
{
if(bit)
dcf77_Daymonth |= 1 << (bit_dcode_n-36);
else
dcf77_Daymonth &= ~(1 << (bit_dcode_n-36));
1152: c9 01 movw r24, r18
1154: 84 97 sbiw r24, 0x24 ; 36
1156: 41 e0 ldi r20, 0x01 ; 1
1158: 50 e0 ldi r21, 0x00 ; 0
115a: ba 01 movw r22, r20
115c: 02 c0 rjmp .+4 ; 0x1162 <_ZN5dcf776decodeEh+0x140>
115e: 66 0f add r22, r22
1160: 77 1f adc r23, r23
1162: 8a 95 dec r24
1164: e2 f7 brpl .-8 ; 0x115e <_ZN5dcf776decodeEh+0x13c>
1166: cb 01 movw r24, r22
1168: 80 95 com r24
116a: 95 85 ldd r25, Z+13 ; 0x0d
116c: 89 23 and r24, r25
116e: 85 87 std Z+13, r24 ; 0x0d
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
1170: 81 e0 ldi r24, 0x01 ; 1
1172: 65 c0 rjmp .+202 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
if(bit)
dcf77_Daymonth |= 1 << (bit_dcode_n-36);
else
dcf77_Daymonth &= ~(1 << (bit_dcode_n-36));
}
else if(bit_dcode_n >= 42 && bit_dcode_n <= 44); //Bit 42 à 44 = Jours de la semaine, ne nous interesse pas
1174: ca 01 movw r24, r20
1176: 8a 97 sbiw r24, 0x2a ; 42
1178: 83 30 cpi r24, 0x03 ; 3
117a: 91 05 cpc r25, r1
117c: 08 f4 brcc .+2 ; 0x1180 <_ZN5dcf776decodeEh+0x15e>
117e: 5a c0 rjmp .+180 ; 0x1234 <_ZN5dcf776decodeEh+0x212>
else if(bit_dcode_n >= 45 && bit_dcode_n <= 49) //Bit 45 à 49 = Mois
1180: 03 97 sbiw r24, 0x03 ; 3
1182: 05 97 sbiw r24, 0x05 ; 5
1184: 18 f5 brcc .+70 ; 0x11cc <_ZN5dcf776decodeEh+0x1aa>
{
if(bit)
1186: 66 23 and r22, r22
1188: 81 f0 breq .+32 ; 0x11aa <_ZN5dcf776decodeEh+0x188>
dcf77_Month |= 1 << (bit_dcode_n-45);
118a: c9 01 movw r24, r18
118c: 8d 97 sbiw r24, 0x2d ; 45
118e: 41 e0 ldi r20, 0x01 ; 1
1190: 50 e0 ldi r21, 0x00 ; 0
1192: ba 01 movw r22, r20
1194: 02 c0 rjmp .+4 ; 0x119a <_ZN5dcf776decodeEh+0x178>
1196: 66 0f add r22, r22
1198: 77 1f adc r23, r23
119a: 8a 95 dec r24
119c: e2 f7 brpl .-8 ; 0x1196 <_ZN5dcf776decodeEh+0x174>
119e: cb 01 movw r24, r22
11a0: 97 85 ldd r25, Z+15 ; 0x0f
11a2: 89 2b or r24, r25
11a4: 87 87 std Z+15, r24 ; 0x0f
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
11a6: 81 e0 ldi r24, 0x01 ; 1
11a8: 4a c0 rjmp .+148 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
else if(bit_dcode_n >= 45 && bit_dcode_n <= 49) //Bit 45 à 49 = Mois
{
if(bit)
dcf77_Month |= 1 << (bit_dcode_n-45);
else
dcf77_Month &= ~(1 << (bit_dcode_n-45));
11aa: c9 01 movw r24, r18
11ac: 8d 97 sbiw r24, 0x2d ; 45
11ae: 41 e0 ldi r20, 0x01 ; 1
11b0: 50 e0 ldi r21, 0x00 ; 0
11b2: ba 01 movw r22, r20
11b4: 02 c0 rjmp .+4 ; 0x11ba <_ZN5dcf776decodeEh+0x198>
11b6: 66 0f add r22, r22
11b8: 77 1f adc r23, r23
11ba: 8a 95 dec r24
11bc: e2 f7 brpl .-8 ; 0x11b6 <_ZN5dcf776decodeEh+0x194>
11be: cb 01 movw r24, r22
11c0: 80 95 com r24
11c2: 97 85 ldd r25, Z+15 ; 0x0f
11c4: 89 23 and r24, r25
11c6: 87 87 std Z+15, r24 ; 0x0f
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
11c8: 81 e0 ldi r24, 0x01 ; 1
11ca: 39 c0 rjmp .+114 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
if(bit)
dcf77_Month |= 1 << (bit_dcode_n-45);
else
dcf77_Month &= ~(1 << (bit_dcode_n-45));
}
else if(bit_dcode_n>= 50 && bit_dcode_n <= 57) //Bit 50 à 57 = Année
11cc: 42 53 subi r20, 0x32 ; 50
11ce: 51 09 sbc r21, r1
11d0: 48 30 cpi r20, 0x08 ; 8
11d2: 51 05 cpc r21, r1
11d4: 88 f5 brcc .+98 ; 0x1238 <_ZN5dcf776decodeEh+0x216>
{
if(bit)
11d6: 66 23 and r22, r22
11d8: 81 f0 breq .+32 ; 0x11fa <_ZN5dcf776decodeEh+0x1d8>
dcf77_Year |= 1 << (bit_dcode_n-50);
11da: c9 01 movw r24, r18
11dc: c2 97 sbiw r24, 0x32 ; 50
11de: 41 e0 ldi r20, 0x01 ; 1
11e0: 50 e0 ldi r21, 0x00 ; 0
11e2: ba 01 movw r22, r20
11e4: 02 c0 rjmp .+4 ; 0x11ea <_ZN5dcf776decodeEh+0x1c8>
11e6: 66 0f add r22, r22
11e8: 77 1f adc r23, r23
11ea: 8a 95 dec r24
11ec: e2 f7 brpl .-8 ; 0x11e6 <_ZN5dcf776decodeEh+0x1c4>
11ee: cb 01 movw r24, r22
11f0: 90 89 ldd r25, Z+16 ; 0x10
11f2: 89 2b or r24, r25
11f4: 80 8b std Z+16, r24 ; 0x10
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
11f6: 81 e0 ldi r24, 0x01 ; 1
11f8: 22 c0 rjmp .+68 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
else if(bit_dcode_n>= 50 && bit_dcode_n <= 57) //Bit 50 à 57 = Année
{
if(bit)
dcf77_Year |= 1 << (bit_dcode_n-50);
else
dcf77_Year &= ~(1 << (bit_dcode_n-50));
11fa: c9 01 movw r24, r18
11fc: c2 97 sbiw r24, 0x32 ; 50
11fe: 41 e0 ldi r20, 0x01 ; 1
1200: 50 e0 ldi r21, 0x00 ; 0
1202: ba 01 movw r22, r20
1204: 02 c0 rjmp .+4 ; 0x120a <_ZN5dcf776decodeEh+0x1e8>
1206: 66 0f add r22, r22
1208: 77 1f adc r23, r23
120a: 8a 95 dec r24
120c: e2 f7 brpl .-8 ; 0x1206 <_ZN5dcf776decodeEh+0x1e4>
120e: cb 01 movw r24, r22
1210: 80 95 com r24
1212: 90 89 ldd r25, Z+16 ; 0x10
1214: 89 23 and r24, r25
1216: 80 8b std Z+16, r24 ; 0x10
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
1218: 81 e0 ldi r24, 0x01 ; 1
121a: 11 c0 rjmp .+34 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
if(bit_dcode_n == 0 && !bit) //Bit 00 Toujours à 0 si le contraire erreur
flag_no_error = false;
121c: 80 e0 ldi r24, 0x00 ; 0
121e: 0f c0 rjmp .+30 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
1220: 81 e0 ldi r24, 0x01 ; 1
1222: 0d c0 rjmp .+26 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
if(bit_dcode_n == 0 && !bit) //Bit 00 Toujours à 0 si le contraire erreur
flag_no_error = false;
else if(bit_dcode_n >= 1 && bit_dcode_n <= 19); //Bits 01 à 19 ne nous interesse pas
else if (bit_dcode_n == 20 && !bit) //Bit 20 Toujours à 1
flag_no_error = false;
1224: 80 e0 ldi r24, 0x00 ; 0
1226: 0b c0 rjmp .+22 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
dcf77_Minute |= 1 << (bit_dcode_n-21);
else
dcf77_Minute &= ~(1 << (bit_dcode_n-21));
}
else if(bit_dcode_n == 28 && (dcf77_Minute&0x01) && !bit || bit_dcode_n == 28 && !(dcf77_Minute&0x01) && bit) //Bit de parité des minutes
flag_no_error = false;
1228: 80 e0 ldi r24, 0x00 ; 0
122a: 09 c0 rjmp .+18 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
dcf77_Heur |= 1 << (bit_dcode_n-29);
else
dcf77_Heur &= ~(1 << (bit_dcode_n-29));
}
else if(bit_dcode_n == 35 && (dcf77_Heur&0x01) && !bit || bit_dcode_n == 35 && !(dcf77_Heur&0x01) && bit) //Bit de parité des Heure
flag_no_error = false;
122c: 80 e0 ldi r24, 0x00 ; 0
122e: 07 c0 rjmp .+14 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
1230: 80 e0 ldi r24, 0x00 ; 0
1232: 05 c0 rjmp .+10 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
else
parasite_flag = true;
}
bool dcf77::decode(uint8_t bit)
{
bool flag_no_error = true;
1234: 81 e0 ldi r24, 0x01 ; 1
1236: 03 c0 rjmp .+6 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
1238: 81 e0 ldi r24, 0x01 ; 1
123a: 01 c0 rjmp .+2 ; 0x123e <_ZN5dcf776decodeEh+0x21c>
dcf77_Minute |= 1 << (bit_dcode_n-21);
else
dcf77_Minute &= ~(1 << (bit_dcode_n-21));
}
else if(bit_dcode_n == 28 && (dcf77_Minute&0x01) && !bit || bit_dcode_n == 28 && !(dcf77_Minute&0x01) && bit) //Bit de parité des minutes
flag_no_error = false;
123c: 80 e0 ldi r24, 0x00 ; 0
dcf77_Year |= 1 << (bit_dcode_n-50);
else
dcf77_Year &= ~(1 << (bit_dcode_n-50));
}
else if(bit_dcode_n == 58 && (dcf77_Month&0x01) && !bit || bit_dcode_n && !(dcf77_Month&0x01) && bit);//Parity
bit_dcode_n++;
123e: 2f 5f subi r18, 0xFF ; 255
1240: 3f 4f sbci r19, 0xFF ; 255
1242: 34 8b std Z+20, r19 ; 0x14
1244: 23 8b std Z+19, r18 ; 0x13
1246: 08 95 ret
if(bit_dcode_n == 0 && !bit) //Bit 00 Toujours à 0 si le contraire erreur
flag_no_error = false;
else if(bit_dcode_n >= 1 && bit_dcode_n <= 19); //Bits 01 à 19 ne nous interesse pas
else if (bit_dcode_n == 20 && !bit) //Bit 20 Toujours à 1
flag_no_error = false;
else if (bit_dcode_n >= 21 && bit_dcode_n <= 27) //Bit 21 à 27 = Minute
1248: c9 01 movw r24, r18
124a: 45 97 sbiw r24, 0x15 ; 21
124c: 07 97 sbiw r24, 0x07 ; 7
124e: 08 f4 brcc .+2 ; 0x1252 <_ZN5dcf776decodeEh+0x230>
1250: 06 cf rjmp .-500 ; 0x105e <_ZN5dcf776decodeEh+0x3c>
1252: 0f c0 rjmp .+30 ; 0x1272 <_ZN5dcf776decodeEh+0x250>
else
dcf77_Minute &= ~(1 << (bit_dcode_n-21));
}
else if(bit_dcode_n == 28 && (dcf77_Minute&0x01) && !bit || bit_dcode_n == 28 && !(dcf77_Minute&0x01) && bit) //Bit de parité des minutes
flag_no_error = false;
else if(bit_dcode_n >= 29 && bit_dcode_n <= 34) //Bit 29 à 34 = Heure
1254: c9 01 movw r24, r18
1256: 4d 97 sbiw r24, 0x1d ; 29
1258: 06 97 sbiw r24, 0x06 ; 6
125a: 08 f4 brcc .+2 ; 0x125e <_ZN5dcf776decodeEh+0x23c>
125c: 2e cf rjmp .-420 ; 0x10ba <_ZN5dcf776decodeEh+0x98>
125e: 59 cf rjmp .-334 ; 0x1112 <_ZN5dcf776decodeEh+0xf0>
else
dcf77_Heur &= ~(1 << (bit_dcode_n-29));
}
else if(bit_dcode_n == 35 && (dcf77_Heur&0x01) && !bit || bit_dcode_n == 35 && !(dcf77_Heur&0x01) && bit) //Bit de parité des Heure
flag_no_error = false;
else if(bit_dcode_n >= 36 && bit_dcode_n <= 41) //Bit 36 à 41 = Jours du moi
1260: ca 01 movw r24, r20
1262: 84 97 sbiw r24, 0x24 ; 36
1264: 06 97 sbiw r24, 0x06 ; 6
1266: 08 f4 brcc .+2 ; 0x126a <_ZN5dcf776decodeEh+0x248>
1268: 74 cf rjmp .-280 ; 0x1152 <_ZN5dcf776decodeEh+0x130>
126a: 84 cf rjmp .-248 ; 0x1174 <_ZN5dcf776decodeEh+0x152>
if(bit)
dcf77_Minute |= 1 << (bit_dcode_n-21);
else
dcf77_Minute &= ~(1 << (bit_dcode_n-21));
}
else if(bit_dcode_n == 28 && (dcf77_Minute&0x01) && !bit || bit_dcode_n == 28 && !(dcf77_Minute&0x01) && bit) //Bit de parité des minutes
126c: 66 23 and r22, r22
126e: 91 f3 breq .-28 ; 0x1254 <_ZN5dcf776decodeEh+0x232>
1270: e5 cf rjmp .-54 ; 0x123c <_ZN5dcf776decodeEh+0x21a>
flag_no_error = false;
else if(bit_dcode_n >= 29 && bit_dcode_n <= 34) //Bit 29 à 34 = Heure
1272: c9 01 movw r24, r18
1274: 4d 97 sbiw r24, 0x1d ; 29
1276: 06 97 sbiw r24, 0x06 ; 6
1278: 08 f4 brcc .+2 ; 0x127c <_ZN5dcf776decodeEh+0x25a>
127a: 1f cf rjmp .-450 ; 0x10ba <_ZN5dcf776decodeEh+0x98>
127c: 54 cf rjmp .-344 ; 0x1126 <_ZN5dcf776decodeEh+0x104>
0000127e <_ZN5dcf772hiEv>:
dcf77_flag_start = 0;
dcf77_bit_count = 0;
cli();
}
void dcf77::hi()
{
127e: 8f 92 push r8
1280: 9f 92 push r9
1282: af 92 push r10
1284: bf 92 push r11
1286: ff 92 push r15
1288: 0f 93 push r16
128a: 1f 93 push r17
128c: cf 93 push r28
128e: df 93 push r29
1290: ec 01 movw r28, r24
time_check = millis() - time_low_dcf77;
1292: 0e 94 f2 0a call 0x15e4 ; 0x15e4 <_Z6millisv>
1296: 88 80 ld r8, Y
1298: 99 80 ldd r9, Y+1 ; 0x01
129a: aa 80 ldd r10, Y+2 ; 0x02
129c: bb 80 ldd r11, Y+3 ; 0x03
129e: 8b 01 movw r16, r22
12a0: 08 19 sub r16, r8
12a2: 19 09 sbc r17, r9
12a4: 1f 8b std Y+23, r17 ; 0x17
12a6: 0e 8b std Y+22, r16 ; 0x16
if( time_check >= temps_bas_min || time_low_dcf77 == 0)
12a8: 04 31 cpi r16, 0x14 ; 20
12aa: 11 05 cpc r17, r1
12ac: 28 f4 brcc .+10 ; 0x12b8 <_ZN5dcf772hiEv+0x3a>
12ae: 89 28 or r8, r9
12b0: 8a 28 or r8, r10
12b2: 8b 28 or r8, r11
12b4: 09 f0 breq .+2 ; 0x12b8 <_ZN5dcf772hiEv+0x3a>
12b6: 56 c0 rjmp .+172 ; 0x1364 <_ZN5dcf772hiEv+0xe6>
{
PORTB |= 1<<PINB5; //Led de Debug à 1
12b8: 2d 9a sbi 0x05, 5 ; 5
parasite_flag = false;
12ba: 1d 8a std Y+21, r1 ; 0x15
time_high_dcf77 = millis(); //Démarage du comptage du temps haut
12bc: 0e 94 f2 0a call 0x15e4 ; 0x15e4 <_Z6millisv>
12c0: 6c 83 std Y+4, r22 ; 0x04
12c2: 7d 83 std Y+5, r23 ; 0x05
12c4: 8e 83 std Y+6, r24 ; 0x06
12c6: 9f 83 std Y+7, r25 ; 0x07
time_low_dcf77 = millis() - time_low_dcf77; //Calcul du Temps bas
12c8: 0e 94 f2 0a call 0x15e4 ; 0x15e4 <_Z6millisv>
12cc: 08 81 ld r16, Y
12ce: 19 81 ldd r17, Y+1 ; 0x01
12d0: 2a 81 ldd r18, Y+2 ; 0x02
12d2: 3b 81 ldd r19, Y+3 ; 0x03
12d4: ab 01 movw r20, r22
12d6: bc 01 movw r22, r24
12d8: 40 1b sub r20, r16
12da: 51 0b sbc r21, r17
12dc: 62 0b sbc r22, r18
12de: 73 0b sbc r23, r19
12e0: 48 83 st Y, r20
12e2: 59 83 std Y+1, r21 ; 0x01
12e4: 6a 83 std Y+2, r22 ; 0x02
12e6: 7b 83 std Y+3, r23 ; 0x03
if(dcf77_flag_start && dcf77_bit_count <= 58) //Démarage de la démodulation si toute les condition sont OK
12e8: 88 85 ldd r24, Y+8 ; 0x08
12ea: 88 23 and r24, r24
12ec: 79 f1 breq .+94 ; 0x134c <_ZN5dcf772hiEv+0xce>
12ee: 89 85 ldd r24, Y+9 ; 0x09
12f0: 9a 85 ldd r25, Y+10 ; 0x0a
12f2: cb 97 sbiw r24, 0x3b ; 59
12f4: 7c f5 brge .+94 ; 0x1354 <_ZN5dcf772hiEv+0xd6>
{
dcf77_status = decodage_en_cours; //En cours de décodage
12f6: 81 e0 ldi r24, 0x01 ; 1
12f8: 90 e0 ldi r25, 0x00 ; 0
12fa: 9a 8b std Y+18, r25 ; 0x12
12fc: 89 8b std Y+17, r24 ; 0x11
int bit;
if(time_low_dcf77 >= time_low_dcf77_min_0 && time_low_dcf77 <= time_low_dcf77_max_0) //Si le temp bas est <= 100ms le bit est à 0
12fe: db 01 movw r26, r22
1300: ca 01 movw r24, r20
1302: 80 55 subi r24, 0x50 ; 80
1304: 91 09 sbc r25, r1
1306: a1 09 sbc r26, r1
1308: b1 09 sbc r27, r1
130a: 89 97 sbiw r24, 0x29 ; 41
130c: a1 05 cpc r26, r1
130e: b1 05 cpc r27, r1
1310: 50 f0 brcs .+20 ; 0x1326 <_ZN5dcf772hiEv+0xa8>
bit = 0;
else if(time_low_dcf77 >= time_low_dcf77_min_1 && time_low_dcf77 <= time_low_dcf77_max_1) //Si le temp bas est <= 200ms le bit est à 1
1312: 44 5b subi r20, 0xB4 ; 180
1314: 51 09 sbc r21, r1
1316: 61 09 sbc r22, r1
1318: 71 09 sbc r23, r1
131a: 49 32 cpi r20, 0x29 ; 41
131c: 51 05 cpc r21, r1
131e: 61 05 cpc r22, r1
1320: 71 05 cpc r23, r1
1322: 18 f0 brcs .+6 ; 0x132a <_ZN5dcf772hiEv+0xac>
1324: 04 c0 rjmp .+8 ; 0x132e <_ZN5dcf772hiEv+0xb0>
if(dcf77_flag_start && dcf77_bit_count <= 58) //Démarage de la démodulation si toute les condition sont OK
{
dcf77_status = decodage_en_cours; //En cours de décodage
int bit;
if(time_low_dcf77 >= time_low_dcf77_min_0 && time_low_dcf77 <= time_low_dcf77_max_0) //Si le temp bas est <= 100ms le bit est à 0
bit = 0;
1326: f1 2c mov r15, r1
1328: 02 c0 rjmp .+4 ; 0x132e <_ZN5dcf772hiEv+0xb0>
else if(time_low_dcf77 >= time_low_dcf77_min_1 && time_low_dcf77 <= time_low_dcf77_max_1) //Si le temp bas est <= 200ms le bit est à 1
bit = 1;
132a: ff 24 eor r15, r15
132c: f3 94 inc r15
{
//dcf77_bit_count = 0;
//dcf77_flag_start = 0;
//return;
}
if(dcf77::decode(bit))
132e: 6f 2d mov r22, r15
1330: ce 01 movw r24, r28
1332: 0e 94 11 08 call 0x1022 ; 0x1022 <_ZN5dcf776decodeEh>
1336: 88 23 and r24, r24
1338: 19 f0 breq .+6 ; 0x1340 <_ZN5dcf772hiEv+0xc2>
{
dcf77_bit_count = 0;
133a: 1a 86 std Y+10, r1 ; 0x0a
133c: 19 86 std Y+9, r1 ; 0x09
dcf77_flag_start = 0;
133e: 18 86 std Y+8, r1 ; 0x08
//return;
}
dcf77_bit_count++;
1340: 89 85 ldd r24, Y+9 ; 0x09
1342: 9a 85 ldd r25, Y+10 ; 0x0a
1344: 01 96 adiw r24, 0x01 ; 1
1346: 9a 87 std Y+10, r25 ; 0x0a
1348: 89 87 std Y+9, r24 ; 0x09
134a: 0e c0 rjmp .+28 ; 0x1368 <_ZN5dcf772hiEv+0xea>
}
else if(dcf77_bit_count > 58)//Après le décodage 60e bit
134c: 89 85 ldd r24, Y+9 ; 0x09
134e: 9a 85 ldd r25, Y+10 ; 0x0a
1350: cb 97 sbiw r24, 0x3b ; 59
1352: 54 f0 brlt .+20 ; 0x1368 <_ZN5dcf772hiEv+0xea>
{
//atc_.stop_capture(); //Arêt de la capture
dcf77_flag_start = 0; //Remise a zero du drapeau de démarage
1354: 18 86 std Y+8, r1 ; 0x08
dcf77_bit_count = 0; //Mise à zero le nombre de bit decodé
1356: 1a 86 std Y+10, r1 ; 0x0a
1358: 19 86 std Y+9, r1 ; 0x09
dcf77_status = decodage_effectuer;
135a: 82 e0 ldi r24, 0x02 ; 2
135c: 90 e0 ldi r25, 0x00 ; 0
135e: 9a 8b std Y+18, r25 ; 0x12
1360: 89 8b std Y+17, r24 ; 0x11
1362: 02 c0 rjmp .+4 ; 0x1368 <_ZN5dcf772hiEv+0xea>
// lcd1.set_cursor(5, 1);
// lcd1.print_text("Wt S.F.");
}
}
else
parasite_flag = true;
1364: 81 e0 ldi r24, 0x01 ; 1
1366: 8d 8b std Y+21, r24 ; 0x15
}
1368: df 91 pop r29
136a: cf 91 pop r28
136c: 1f 91 pop r17
136e: 0f 91 pop r16
1370: ff 90 pop r15
1372: bf 90 pop r11
1374: af 90 pop r10
1376: 9f 90 pop r9
1378: 8f 90 pop r8
137a: 08 95 ret
0000137c <__vector_1>:
uint8_t dcf77::year()
{
return dcf77_Year;
}
ISR(INT0_vect)//Vecteur d'interuption INT0
{
137c: 1f 92 push r1
137e: 0f 92 push r0
1380: 0f b6 in r0, 0x3f ; 63
1382: 0f 92 push r0
1384: 11 24 eor r1, r1
1386: 2f 93 push r18
1388: 3f 93 push r19
138a: 4f 93 push r20
138c: 5f 93 push r21
138e: 6f 93 push r22
1390: 7f 93 push r23
1392: 8f 93 push r24
1394: 9f 93 push r25
1396: af 93 push r26
1398: bf 93 push r27
139a: ef 93 push r30
139c: ff 93 push r31
return 1;
}
static __inline__ uint8_t __iCliRetVal(void)
{
cli();
139e: f8 94 cli
ATOMIC_BLOCK(ATOMIC_FORCEON)
{
if(((PIND&(1<<PIND2))>>PIND2))//Si c'est au niveau haut
13a0: 4a 9b sbis 0x09, 2 ; 9
13a2: 05 c0 rjmp .+10 ; 0x13ae <__vector_1+0x32>
{
atc_.hi();
13a4: 8f e0 ldi r24, 0x0F ; 15
13a6: 91 e0 ldi r25, 0x01 ; 1
13a8: 0e 94 3f 09 call 0x127e ; 0x127e <_ZN5dcf772hiEv>
13ac: 04 c0 rjmp .+8 ; 0x13b6 <__vector_1+0x3a>
}
else //Passage au niveau bas
{
atc_.lo();
13ae: 8f e0 ldi r24, 0x0F ; 15
13b0: 91 e0 ldi r25, 0x01 ; 1
13b2: 0e 94 bd 07 call 0xf7a ; 0xf7a <_ZN5dcf772loEv>
return 1;
}
static __inline__ void __iSeiParam(const uint8_t *__s)
{
sei();
13b6: 78 94 sei
}
}
13b8: ff 91 pop r31
13ba: ef 91 pop r30
13bc: bf 91 pop r27
13be: af 91 pop r26
13c0: 9f 91 pop r25
13c2: 8f 91 pop r24
13c4: 7f 91 pop r23
13c6: 6f 91 pop r22
13c8: 5f 91 pop r21
13ca: 4f 91 pop r20
13cc: 3f 91 pop r19
13ce: 2f 91 pop r18
13d0: 0f 90 pop r0
13d2: 0f be out 0x3f, r0 ; 63
13d4: 0f 90 pop r0
13d6: 1f 90 pop r1
13d8: 18 95 reti
000013da <_GLOBAL__sub_I_atc_>:
#ifndef DCF77_H_
#define DCF77_H_
#include <stdint.h>
class dcf77
13da: 10 92 0f 01 sts 0x010F, r1
13de: 10 92 10 01 sts 0x0110, r1
13e2: 10 92 11 01 sts 0x0111, r1
13e6: 10 92 12 01 sts 0x0112, r1
13ea: 10 92 13 01 sts 0x0113, r1
13ee: 10 92 14 01 sts 0x0114, r1
13f2: 10 92 15 01 sts 0x0115, r1
13f6: 10 92 16 01 sts 0x0116, r1
13fa: 10 92 17 01 sts 0x0117, r1
13fe: 10 92 19 01 sts 0x0119, r1
1402: 10 92 18 01 sts 0x0118, r1
1406: 10 92 1a 01 sts 0x011A, r1
140a: 10 92 1b 01 sts 0x011B, r1
140e: 10 92 1c 01 sts 0x011C, r1
1412: 10 92 1d 01 sts 0x011D, r1
1416: 10 92 1e 01 sts 0x011E, r1
141a: 10 92 1f 01 sts 0x011F, r1
141e: 10 92 21 01 sts 0x0121, r1
1422: 10 92 20 01 sts 0x0120, r1
1426: 10 92 23 01 sts 0x0123, r1
142a: 10 92 22 01 sts 0x0122, r1
142e: 10 92 24 01 sts 0x0124, r1
1432: 10 92 26 01 sts 0x0126, r1
1436: 10 92 25 01 sts 0x0125, r1
143a: 08 95 ret
0000143c <_ZN6ds1307C1Ev>:
#define LED_GREEN 1<<PINB4 /*Ici direct en Hex*/
#define LED_BLUE 1<<PINB5 /*Ici direct en Hex*/
ds1307::ds1307()
{
iic_error = false;
143c: fc 01 movw r30, r24
143e: 11 82 std Z+1, r1 ; 0x01
1440: 08 95 ret
00001442 <_ZN6ds13075writeEih>:
}
void ds1307::write(int adresse_m, uint8_t data)
{
//SCK Config à 80Khz (MAX DS1307 = 100Khz)
TWBR = 0x5C; //Bit rate division à 92
1442: 8c e5 ldi r24, 0x5C ; 92
1444: 80 93 b8 00 sts 0x00B8, r24
TWSR &= ~((1<<TWPS1)|(1<<TWPS0)) ; // Prescale à 1
1448: e9 eb ldi r30, 0xB9 ; 185
144a: f0 e0 ldi r31, 0x00 ; 0
144c: 80 81 ld r24, Z
144e: 8c 7f andi r24, 0xFC ; 252
1450: 80 83 st Z, r24
//I2C Init
TWCR = (1<<TWEN); //Active l'I2C
1452: ec eb ldi r30, 0xBC ; 188
1454: f0 e0 ldi r31, 0x00 ; 0
1456: 84 e0 ldi r24, 0x04 ; 4
1458: 80 83 st Z, r24
TWCR = (1<<TWEN)|(1<<TWSTA)|(1<<TWINT); //Envoi la condiont de démarage
145a: 84 ea ldi r24, 0xA4 ; 164
145c: 80 83 st Z, r24
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
145e: 80 81 ld r24, Z
1460: 88 23 and r24, r24
1462: ec f7 brge .-6 ; 0x145e <_ZN6ds13075writeEih+0x1c>
{
}
//DS1307 adresse write
TWDR = adresse_DS1307; //Inscrit l'adresse, Mode write
1464: 80 ed ldi r24, 0xD0 ; 208
1466: 80 93 bb 00 sts 0x00BB, r24
TWCR = (1<<TWEN)|(1<<TWINT); //Envoi l'adresse
146a: 84 e8 ldi r24, 0x84 ; 132
146c: 80 93 bc 00 sts 0x00BC, r24
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
1470: ec eb ldi r30, 0xBC ; 188
1472: f0 e0 ldi r31, 0x00 ; 0
1474: 80 81 ld r24, Z
1476: 88 23 and r24, r24
1478: ec f7 brge .-6 ; 0x1474 <_ZN6ds13075writeEih+0x32>
{
}
//Adresse memoir send
TWDR = adresse_m; //Inscrit l'adresse mémoire
147a: 60 93 bb 00 sts 0x00BB, r22
TWCR = (1<<TWEN)|(1<<TWINT); //Envoi l'adresse
147e: 84 e8 ldi r24, 0x84 ; 132
1480: 80 93 bc 00 sts 0x00BC, r24
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
1484: ec eb ldi r30, 0xBC ; 188
1486: f0 e0 ldi r31, 0x00 ; 0
1488: 80 81 ld r24, Z
148a: 88 23 and r24, r24
148c: ec f7 brge .-6 ; 0x1488 <_ZN6ds13075writeEih+0x46>
{
}
//Data send
TWDR = data; //Inscrit les donnée
148e: 40 93 bb 00 sts 0x00BB, r20
TWCR = (1<<TWEN)|(1<<TWINT); //Envoi les donnée
1492: 84 e8 ldi r24, 0x84 ; 132
1494: 80 93 bc 00 sts 0x00BC, r24
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
1498: ec eb ldi r30, 0xBC ; 188
149a: f0 e0 ldi r31, 0x00 ; 0
149c: 80 81 ld r24, Z
149e: 88 23 and r24, r24
14a0: ec f7 brge .-6 ; 0x149c <_ZN6ds13075writeEih+0x5a>
{
}
//Stop condition
TWCR = (1<<TWEN)|(1<<TWINT)|(1<<TWSTO);
14a2: 84 e9 ldi r24, 0x94 ; 148
14a4: 80 93 bc 00 sts 0x00BC, r24
while((TWCR&(1<<TWSTO)))
14a8: ec eb ldi r30, 0xBC ; 188
14aa: f0 e0 ldi r31, 0x00 ; 0
14ac: 80 81 ld r24, Z
14ae: 84 fd sbrc r24, 4
14b0: fd cf rjmp .-6 ; 0x14ac <_ZN6ds13075writeEih+0x6a>
{
}
TWCR &= (~(1<<TWEN));
14b2: ec eb ldi r30, 0xBC ; 188
14b4: f0 e0 ldi r31, 0x00 ; 0
14b6: 80 81 ld r24, Z
14b8: 8b 7f andi r24, 0xFB ; 251
14ba: 80 83 st Z, r24
14bc: 08 95 ret
000014be <_ZN6ds13074readEh>:
}
uint8_t ds1307::read(uint8_t adresse_m)
{
TWBR = 0x5C; //Bit rate division à 92
14be: 8c e5 ldi r24, 0x5C ; 92
14c0: 80 93 b8 00 sts 0x00B8, r24
TWSR &= ~((1<<TWPS1)|(1<<TWPS0)); // Prescale à 1
14c4: e9 eb ldi r30, 0xB9 ; 185
14c6: f0 e0 ldi r31, 0x00 ; 0
14c8: 80 81 ld r24, Z
14ca: 8c 7f andi r24, 0xFC ; 252
14cc: 80 83 st Z, r24
//I2C Init
TWCR = (1<<TWEN); //Active l'I2C
14ce: ec eb ldi r30, 0xBC ; 188
14d0: f0 e0 ldi r31, 0x00 ; 0
14d2: 84 e0 ldi r24, 0x04 ; 4
14d4: 80 83 st Z, r24
TWCR = (1<<TWEN)|(1<<TWSTA)|(1<<TWINT); //Envoi la condiont de démarage
14d6: 84 ea ldi r24, 0xA4 ; 164
14d8: 80 83 st Z, r24
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
14da: 80 81 ld r24, Z
14dc: 88 23 and r24, r24
14de: ec f7 brge .-6 ; 0x14da <_ZN6ds13074readEh+0x1c>
}
//DS1307 adresse write
TWDR = adresse_DS1307; //Inscrit l'adresse, Mode write
14e0: 80 ed ldi r24, 0xD0 ; 208
14e2: 80 93 bb 00 sts 0x00BB, r24
TWCR = (1<<TWEN)|(1<<TWINT); //Envoi l'adresse
14e6: 84 e8 ldi r24, 0x84 ; 132
14e8: 80 93 bc 00 sts 0x00BC, r24
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
14ec: ec eb ldi r30, 0xBC ; 188
14ee: f0 e0 ldi r31, 0x00 ; 0
14f0: 80 81 ld r24, Z
14f2: 88 23 and r24, r24
14f4: ec f7 brge .-6 ; 0x14f0 <_ZN6ds13074readEh+0x32>
{
}
//DS1307 adresse mem
TWDR = adresse_m; //Inscrit l'adresse mémoir
14f6: 60 93 bb 00 sts 0x00BB, r22
TWCR = (1<<TWEN)|(1<<TWINT); //Envoi l'adresse
14fa: 84 e8 ldi r24, 0x84 ; 132
14fc: 80 93 bc 00 sts 0x00BC, r24
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
1500: ec eb ldi r30, 0xBC ; 188
1502: f0 e0 ldi r31, 0x00 ; 0
1504: 80 81 ld r24, Z
1506: 88 23 and r24, r24
1508: ec f7 brge .-6 ; 0x1504 <_ZN6ds13074readEh+0x46>
{
}
//Restart condition
TWCR = (1<<TWEN)|(1<<TWSTA)|(1<<TWINT); //Envoi la condiont de démarage
150a: 84 ea ldi r24, 0xA4 ; 164
150c: 80 93 bc 00 sts 0x00BC, r24
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
1510: ec eb ldi r30, 0xBC ; 188
1512: f0 e0 ldi r31, 0x00 ; 0
1514: 80 81 ld r24, Z
1516: 88 23 and r24, r24
1518: ec f7 brge .-6 ; 0x1514 <_ZN6ds13074readEh+0x56>
{
}
//DS1307 adresse + read
TWDR = adresse_DS1307|0x01; //Inscrit l'adresse + Mode read
151a: 81 ed ldi r24, 0xD1 ; 209
151c: 80 93 bb 00 sts 0x00BB, r24
TWCR = (1<<TWEN)|(1<<TWINT); //Envoi l'adresse
1520: 84 e8 ldi r24, 0x84 ; 132
1522: 80 93 bc 00 sts 0x00BC, r24
while(!(TWCR&(1<<TWINT))) //Attente de l'envoi
1526: ec eb ldi r30, 0xBC ; 188
1528: f0 e0 ldi r31, 0x00 ; 0
152a: 80 81 ld r24, Z
152c: 88 23 and r24, r24
152e: ec f7 brge .-6 ; 0x152a <_ZN6ds13074readEh+0x6c>
{
}
//Receive
TWCR = (1<<TWEN)|(1<<TWINT); //Demande de réception
1530: 84 e8 ldi r24, 0x84 ; 132
1532: 80 93 bc 00 sts 0x00BC, r24
while(!(TWCR&(1<<TWINT))) //Attente de la réception
1536: ec eb ldi r30, 0xBC ; 188
1538: f0 e0 ldi r31, 0x00 ; 0
153a: 80 81 ld r24, Z
153c: 88 23 and r24, r24
153e: ec f7 brge .-6 ; 0x153a <_ZN6ds13074readEh+0x7c>
}
uint8_t data = TWDR;
1540: 80 91 bb 00 lds r24, 0x00BB
//Stop condition
TWCR = (1<<TWEN)|(1<<TWINT)|(1<<TWSTO);
1544: 94 e9 ldi r25, 0x94 ; 148
1546: 90 93 bc 00 sts 0x00BC, r25
while((TWCR&(1<<TWSTO)))
154a: ec eb ldi r30, 0xBC ; 188
154c: f0 e0 ldi r31, 0x00 ; 0
154e: 90 81 ld r25, Z
1550: 94 fd sbrc r25, 4
1552: fd cf rjmp .-6 ; 0x154e <_ZN6ds13074readEh+0x90>
{
}
TWCR&=(~(1<<TWEN));
1554: ec eb ldi r30, 0xBC ; 188
1556: f0 e0 ldi r31, 0x00 ; 0
1558: 90 81 ld r25, Z
155a: 9b 7f andi r25, 0xFB ; 251
155c: 90 83 st Z, r25
return data;
}
155e: 08 95 ret
00001560 <_ZN6ds13079r_secondeEv>:
uint8_t ds1307::r_seconde()
{
return ds1307::read(0x00);
1560: 60 e0 ldi r22, 0x00 ; 0
1562: 0e 94 5f 0a call 0x14be ; 0x14be <_ZN6ds13074readEh>
}
1566: 08 95 ret
00001568 <_ZN6ds13078r_minuteEv>:
uint8_t ds1307::r_minute()
{
return ds1307::read(0x01);
1568: 61 e0 ldi r22, 0x01 ; 1
156a: 0e 94 5f 0a call 0x14be ; 0x14be <_ZN6ds13074readEh>
}
156e: 08 95 ret
00001570 <_ZN6ds13076r_heurEv>:
uint8_t ds1307::r_heur()
{
return ds1307::read(0x02);
1570: 62 e0 ldi r22, 0x02 ; 2
1572: 0e 94 5f 0a call 0x14be ; 0x14be <_ZN6ds13074readEh>
}
1576: 08 95 ret
00001578 <_ZN6ds13076r_jourEv>:
uint8_t ds1307::r_jour()
{
return ds1307::read(0x04);
1578: 64 e0 ldi r22, 0x04 ; 4
157a: 0e 94 5f 0a call 0x14be ; 0x14be <_ZN6ds13074readEh>
}
157e: 08 95 ret
00001580 <_ZN6ds13075r_moiEv>:
uint8_t ds1307::r_moi()
{
return ds1307::read(0x05);
1580: 65 e0 ldi r22, 0x05 ; 5
1582: 0e 94 5f 0a call 0x14be ; 0x14be <_ZN6ds13074readEh>
}
1586: 08 95 ret
00001588 <_ZN6ds13076r_yearEv>:
uint8_t ds1307::r_year()
{
return ds1307::read(0x06);
1588: 66 e0 ldi r22, 0x06 ; 6
158a: 0e 94 5f 0a call 0x14be ; 0x14be <_ZN6ds13074readEh>
}
158e: 08 95 ret
00001590 <_ZN6ds13079w_secondeEh>:
void ds1307::w_seconde(uint8_t data)
{
1590: 46 2f mov r20, r22
ds1307::write(0x00, data);
1592: 60 e0 ldi r22, 0x00 ; 0
1594: 70 e0 ldi r23, 0x00 ; 0
1596: 0e 94 21 0a call 0x1442 ; 0x1442 <_ZN6ds13075writeEih>
159a: 08 95 ret
0000159c <_ZN6ds13078w_minuteEh>:
}
void ds1307::w_minute(uint8_t data)
{
159c: 46 2f mov r20, r22
ds1307::write(0x01, data);
159e: 61 e0 ldi r22, 0x01 ; 1
15a0: 70 e0 ldi r23, 0x00 ; 0
15a2: 0e 94 21 0a call 0x1442 ; 0x1442 <_ZN6ds13075writeEih>
15a6: 08 95 ret
000015a8 <_ZN6ds13076w_heurEhh>:
}
void ds1307::w_heur(uint8_t data, uint8_t pm)
{
if(pm)
15a8: 44 23 and r20, r20
15aa: 19 f0 breq .+6 ; 0x15b2 <_ZN6ds13076w_heurEhh+0xa>
data |= (1<<6);
15ac: 46 2f mov r20, r22
15ae: 40 64 ori r20, 0x40 ; 64
15b0: 02 c0 rjmp .+4 ; 0x15b6 <_ZN6ds13076w_heurEhh+0xe>
else
data &= ~(1<<6);
15b2: 46 2f mov r20, r22
15b4: 4f 7b andi r20, 0xBF ; 191
ds1307::write(0x02, data);
15b6: 62 e0 ldi r22, 0x02 ; 2
15b8: 70 e0 ldi r23, 0x00 ; 0
15ba: 0e 94 21 0a call 0x1442 ; 0x1442 <_ZN6ds13075writeEih>
15be: 08 95 ret
000015c0 <_ZN6ds13076w_dateEh>:
}
void ds1307::w_date(uint8_t data)
{
15c0: 46 2f mov r20, r22
ds1307::write(0x04, data);
15c2: 64 e0 ldi r22, 0x04 ; 4
15c4: 70 e0 ldi r23, 0x00 ; 0
15c6: 0e 94 21 0a call 0x1442 ; 0x1442 <_ZN6ds13075writeEih>
15ca: 08 95 ret
000015cc <_ZN6ds13075w_moiEh>:
}
void ds1307::w_moi(uint8_t data)
{
15cc: 46 2f mov r20, r22
ds1307::write(0x05, data);
15ce: 65 e0 ldi r22, 0x05 ; 5
15d0: 70 e0 ldi r23, 0x00 ; 0
15d2: 0e 94 21 0a call 0x1442 ; 0x1442 <_ZN6ds13075writeEih>
15d6: 08 95 ret
000015d8 <_ZN6ds13076w_yearEh>:
}
void ds1307::w_year(uint8_t data)
{
15d8: 46 2f mov r20, r22
ds1307::write(0x06, data);
15da: 66 e0 ldi r22, 0x06 ; 6
15dc: 70 e0 ldi r23, 0x00 ; 0
15de: 0e 94 21 0a call 0x1442 ; 0x1442 <_ZN6ds13075writeEih>
15e2: 08 95 ret
000015e4 <_Z6millisv>:
return 1;
}
static __inline__ uint8_t __iCliRetVal(void)
{
cli();
15e4: f8 94 cli
{
unsigned long millis_return;
// Ensure this cannot be disrupted
ATOMIC_BLOCK(ATOMIC_FORCEON) {
millis_return = timer1_millis;
15e6: 60 91 27 01 lds r22, 0x0127
15ea: 70 91 28 01 lds r23, 0x0128
15ee: 80 91 29 01 lds r24, 0x0129
15f2: 90 91 2a 01 lds r25, 0x012A
return 1;
}
static __inline__ void __iSeiParam(const uint8_t *__s)
{
sei();
15f6: 78 94 sei
}
return millis_return;
}
15f8: 08 95 ret
000015fa <__vector_11>:
ISR (TIMER1_COMPA_vect)
{
15fa: 1f 92 push r1
15fc: 0f 92 push r0
15fe: 0f b6 in r0, 0x3f ; 63
1600: 0f 92 push r0
1602: 11 24 eor r1, r1
1604: 8f 93 push r24
1606: 9f 93 push r25
1608: af 93 push r26
160a: bf 93 push r27
timer1_millis++;
160c: 80 91 27 01 lds r24, 0x0127
1610: 90 91 28 01 lds r25, 0x0128
1614: a0 91 29 01 lds r26, 0x0129
1618: b0 91 2a 01 lds r27, 0x012A
161c: 01 96 adiw r24, 0x01 ; 1
161e: a1 1d adc r26, r1
1620: b1 1d adc r27, r1
1622: 80 93 27 01 sts 0x0127, r24
1626: 90 93 28 01 sts 0x0128, r25
162a: a0 93 29 01 sts 0x0129, r26
162e: b0 93 2a 01 sts 0x012A, r27
}
1632: bf 91 pop r27
1634: af 91 pop r26
1636: 9f 91 pop r25
1638: 8f 91 pop r24
163a: 0f 90 pop r0
163c: 0f be out 0x3f, r0 ; 63
163e: 0f 90 pop r0
1640: 1f 90 pop r1
1642: 18 95 reti
00001644 <_Z9USART_iniv>:
#define BAUD 9600
#define MYUBRR (((F_CPU / (BAUD * 16UL))) - 1)
void USART_ini()
{
UBRR0H = (unsigned char)(MYUBRR>>8);
1644: 10 92 c5 00 sts 0x00C5, r1
UBRR0L = (unsigned char)MYUBRR;
1648: 87 e6 ldi r24, 0x67 ; 103
164a: 80 93 c4 00 sts 0x00C4, r24
UCSR0B = (1<<RXEN0)|(1<<TXEN0);
164e: 88 e1 ldi r24, 0x18 ; 24
1650: 80 93 c1 00 sts 0x00C1, r24
UCSR0C = ((1<<UCSZ00)|(1<<UCSZ01));
1654: 86 e0 ldi r24, 0x06 ; 6
1656: 80 93 c2 00 sts 0x00C2, r24
165a: 08 95 ret
0000165c <_Z14USART_Transmith>:
}
void USART_Transmit( unsigned char data )
{
/* Wait for empty transmit buffer */
while ( !( UCSR0A & (1<<UDRE0)) )
165c: e0 ec ldi r30, 0xC0 ; 192
165e: f0 e0 ldi r31, 0x00 ; 0
1660: 90 81 ld r25, Z
1662: 95 ff sbrs r25, 5
1664: fd cf rjmp .-6 ; 0x1660 <_Z14USART_Transmith+0x4>
;
/* Put data into buffer, sends the data */
UDR0 = data;
1666: 80 93 c6 00 sts 0x00C6, r24
166a: 08 95 ret
0000166c <_Z13USART_Receivev>:
}
unsigned char USART_Receive( void )
{
/* Wait for data to be received */
if((UCSR0A & (1<<RXC0)))
166c: 80 91 c0 00 lds r24, 0x00C0
1670: 88 23 and r24, r24
1672: 1c f4 brge .+6 ; 0x167a <_Z13USART_Receivev+0xe>
return UDR0;
1674: 80 91 c6 00 lds r24, 0x00C6
1678: 08 95 ret
else
return false;
167a: 80 e0 ldi r24, 0x00 ; 0
167c: 08 95 ret
0000167e <main>:
#include <util/delay.h>
#include <avr/interrupt.h>
#include "./fonction.h" //Inclusion des fonction
int main(void) //Fonction Principale
{
setup_pins(); //Configuration des pins et du registre à décalage
167e: 0e 94 77 00 call 0xee ; 0xee <_Z10setup_pinsv>
while(1)//Boucle infinie
{
routine_affichage(); //Routinne d'affihage des tube nixie
1682: 0e 94 3e 01 call 0x27c ; 0x27c <_Z17routine_affichagev>
bouton(); //Gestion des boutons de configuration
1686: 0e 94 4b 03 call 0x696 ; 0x696 <_Z6boutonv>
couleur(); //Gestion des LED RGB
168a: 0e 94 d9 02 call 0x5b2 ; 0x5b2 <_Z7couleurv>
uart_ds1307();
168e: 0e 94 f5 05 call 0xbea ; 0xbea <_Z11uart_ds1307v>
1692: f7 cf rjmp .-18 ; 0x1682 <main+0x4>
00001694 <__tablejump2__>:
1694: ee 0f add r30, r30
1696: ff 1f adc r31, r31
00001698 <__tablejump__>:
1698: 05 90 lpm r0, Z+
169a: f4 91 lpm r31, Z
169c: e0 2d mov r30, r0
169e: 09 94 ijmp
000016a0 <_exit>:
16a0: f8 94 cli
000016a2 <__stop_program>:
16a2: ff cf rjmp .-2 ; 0x16a2 <__stop_program>