?? adc.lss
字號:
adc.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 000006e4 00000000 00000000 00000094 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000014 00800060 000006e4 00000778 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .bss 0000000e 00800074 00800074 0000078c 2**0
ALLOC
3 .noinit 00000000 00800082 00800082 0000078c 2**0
CONTENTS
4 .eeprom 00000000 00810000 00810000 0000078c 2**0
CONTENTS
5 .debug_aranges 0000003c 00000000 00000000 0000078c 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_pubnames 000000c0 00000000 00000000 000007c8 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_info 00000291 00000000 00000000 00000888 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_abbrev 00000174 00000000 00000000 00000b19 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_line 0000031d 00000000 00000000 00000c8d 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_str 000000ea 00000000 00000000 00000faa 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 12 c0 rjmp .+36 ; 0x26
2: 2c c0 rjmp .+88 ; 0x5c
4: 2a c0 rjmp .+84 ; 0x5a
6: 29 c0 rjmp .+82 ; 0x5a
8: 28 c0 rjmp .+80 ; 0x5a
a: 27 c0 rjmp .+78 ; 0x5a
c: 26 c0 rjmp .+76 ; 0x5a
e: 25 c0 rjmp .+74 ; 0x5a
10: 24 c0 rjmp .+72 ; 0x5a
12: 23 c0 rjmp .+70 ; 0x5a
14: 22 c0 rjmp .+68 ; 0x5a
16: 21 c0 rjmp .+66 ; 0x5a
18: 20 c0 rjmp .+64 ; 0x5a
1a: 1f c0 rjmp .+62 ; 0x5a
1c: 61 c0 rjmp .+194 ; 0xe0
1e: 1d c0 rjmp .+58 ; 0x5a
20: 1c c0 rjmp .+56 ; 0x5a
22: 1b c0 rjmp .+54 ; 0x5a
24: 1a c0 rjmp .+52 ; 0x5a
00000026 <__ctors_end>:
26: 11 24 eor r1, r1
28: 1f be out 0x3f, r1 ; 63
2a: cf e5 ldi r28, 0x5F ; 95
2c: d4 e0 ldi r29, 0x04 ; 4
2e: de bf out 0x3e, r29 ; 62
30: cd bf out 0x3d, r28 ; 61
00000032 <__do_copy_data>:
32: 10 e0 ldi r17, 0x00 ; 0
34: a0 e6 ldi r26, 0x60 ; 96
36: b0 e0 ldi r27, 0x00 ; 0
38: e4 ee ldi r30, 0xE4 ; 228
3a: f6 e0 ldi r31, 0x06 ; 6
3c: 02 c0 rjmp .+4 ; 0x42
0000003e <.do_copy_data_loop>:
3e: 05 90 lpm r0, Z+
40: 0d 92 st X+, r0
00000042 <.do_copy_data_start>:
42: a4 37 cpi r26, 0x74 ; 116
44: b1 07 cpc r27, r17
46: d9 f7 brne .-10 ; 0x3e
00000048 <__do_clear_bss>:
48: 10 e0 ldi r17, 0x00 ; 0
4a: a4 e7 ldi r26, 0x74 ; 116
4c: b0 e0 ldi r27, 0x00 ; 0
4e: 01 c0 rjmp .+2 ; 0x52
00000050 <.do_clear_bss_loop>:
50: 1d 92 st X+, r1
00000052 <.do_clear_bss_start>:
52: a2 38 cpi r26, 0x82 ; 130
54: b1 07 cpc r27, r17
56: e1 f7 brne .-8 ; 0x50
58: aa c0 rjmp .+340 ; 0x1ae
0000005a <__bad_interrupt>:
5a: d2 cf rjmp .-92 ; 0x0
0000005c <__vector_1>:
#define uint unsigned int
#define uchar unsigned char
float g_value;
SIGNAL(SIG_INTERRUPT0)
{GICR&=~_BV(INT0);
5c: 1f 92 push r1
5e: 0f 92 push r0
60: 0f b6 in r0, 0x3f ; 63
62: 0f 92 push r0
64: 11 24 eor r1, r1
66: 2f 93 push r18
68: 3f 93 push r19
6a: 4f 93 push r20
6c: 5f 93 push r21
6e: 6f 93 push r22
70: 7f 93 push r23
72: 8f 93 push r24
74: 9f 93 push r25
76: af 93 push r26
78: bf 93 push r27
7a: ef 93 push r30
7c: ff 93 push r31
7e: 8b b7 in r24, 0x3b ; 59
80: 8f 7b andi r24, 0xBF ; 191
82: 8b bf out 0x3b, r24 ; 59
delay();delay();delay();delay();delay();delay();delay();delay();delay();delay();
84: 3e d1 rcall .+636 ; 0x302
86: 3d d1 rcall .+634 ; 0x302
88: 3c d1 rcall .+632 ; 0x302
8a: 3b d1 rcall .+630 ; 0x302
8c: 3a d1 rcall .+628 ; 0x302
8e: 39 d1 rcall .+626 ; 0x302
90: 38 d1 rcall .+624 ; 0x302
92: 37 d1 rcall .+622 ; 0x302
94: 36 d1 rcall .+620 ; 0x302
96: 35 d1 rcall .+618 ; 0x302
delay();delay();delay();delay();delay();delay();delay();delay();delay();delay();
98: 34 d1 rcall .+616 ; 0x302
9a: 33 d1 rcall .+614 ; 0x302
9c: 32 d1 rcall .+612 ; 0x302
9e: 31 d1 rcall .+610 ; 0x302
a0: 30 d1 rcall .+608 ; 0x302
a2: 2f d1 rcall .+606 ; 0x302
a4: 2e d1 rcall .+604 ; 0x302
a6: 2d d1 rcall .+602 ; 0x302
a8: 2c d1 rcall .+600 ; 0x302
aa: 2b d1 rcall .+598 ; 0x302
delay();delay();delay();delay();delay();delay();delay();delay();
ac: 2a d1 rcall .+596 ; 0x302
ae: 29 d1 rcall .+594 ; 0x302
b0: 28 d1 rcall .+592 ; 0x302
b2: 27 d1 rcall .+590 ; 0x302
b4: 26 d1 rcall .+588 ; 0x302
b6: 25 d1 rcall .+586 ; 0x302
b8: 24 d1 rcall .+584 ; 0x302
ba: 23 d1 rcall .+582 ; 0x302
ADCSRA|=_BV(ADSC);
bc: 36 9a sbi 0x06, 6 ; 6
be: ff 91 pop r31
c0: ef 91 pop r30
c2: bf 91 pop r27
c4: af 91 pop r26
c6: 9f 91 pop r25
c8: 8f 91 pop r24
ca: 7f 91 pop r23
cc: 6f 91 pop r22
ce: 5f 91 pop r21
d0: 4f 91 pop r20
d2: 3f 91 pop r19
d4: 2f 91 pop r18
d6: 0f 90 pop r0
d8: 0f be out 0x3f, r0 ; 63
da: 0f 90 pop r0
dc: 1f 90 pop r1
de: 18 95 reti
000000e0 <__vector_14>:
}
SIGNAL(SIG_ADC)
{uint p;
e0: 1f 92 push r1
e2: 0f 92 push r0
e4: 0f b6 in r0, 0x3f ; 63
e6: 0f 92 push r0
e8: 11 24 eor r1, r1
ea: 0f 93 push r16
ec: 1f 93 push r17
ee: 2f 93 push r18
f0: 3f 93 push r19
f2: 4f 93 push r20
f4: 5f 93 push r21
f6: 6f 93 push r22
f8: 7f 93 push r23
fa: 8f 93 push r24
fc: 9f 93 push r25
fe: af 93 push r26
100: bf 93 push r27
102: ef 93 push r30
104: ff 93 push r31
cli();
106: f8 94 cli
p=ADCL;
108: 84 b1 in r24, 0x04 ; 4
10a: 08 2f mov r16, r24
10c: 11 27 eor r17, r17
p|=(uint)(ADCH<<8);
10e: 85 b1 in r24, 0x05 ; 5
110: 99 27 eor r25, r25
112: 98 2f mov r25, r24
114: 88 27 eor r24, r24
116: 08 2b or r16, r24
118: 19 2b or r17, r25
g_value=p*2.56;
11a: c8 01 movw r24, r16
11c: aa 27 eor r26, r26
11e: 97 fd sbrc r25, 7
120: a0 95 com r26
122: ba 2f mov r27, r26
124: bc 01 movw r22, r24
126: cd 01 movw r24, r26
128: f1 d1 rcall .+994 ; 0x50c
12a: 17 ff sbrs r17, 7
12c: 05 c0 rjmp .+10 ; 0x138
12e: 20 e0 ldi r18, 0x00 ; 0
130: 30 e0 ldi r19, 0x00 ; 0
132: 40 e8 ldi r20, 0x80 ; 128
134: 57 e4 ldi r21, 0x47 ; 71
136: 58 d1 rcall .+688 ; 0x3e8
138: 2a e0 ldi r18, 0x0A ; 10
13a: 37 ed ldi r19, 0xD7 ; 215
13c: 43 e2 ldi r20, 0x23 ; 35
13e: 50 e4 ldi r21, 0x40 ; 64
140: 54 d2 rcall .+1192 ; 0x5ea
142: dc 01 movw r26, r24
144: cb 01 movw r24, r22
g_value=g_value/1023;
146: 20 e0 ldi r18, 0x00 ; 0
148: 30 ec ldi r19, 0xC0 ; 192
14a: 4f e7 ldi r20, 0x7F ; 127
14c: 54 e4 ldi r21, 0x44 ; 68
14e: bc 01 movw r22, r24
150: cd 01 movw r24, r26
152: 94 d1 rcall .+808 ; 0x47c
154: dc 01 movw r26, r24
156: cb 01 movw r24, r22
g_value=g_value*1000;
158: 20 e0 ldi r18, 0x00 ; 0
15a: 30 e0 ldi r19, 0x00 ; 0
15c: 4a e7 ldi r20, 0x7A ; 122
15e: 54 e4 ldi r21, 0x44 ; 68
160: bc 01 movw r22, r24
162: cd 01 movw r24, r26
164: 42 d2 rcall .+1156 ; 0x5ea
166: dc 01 movw r26, r24
168: cb 01 movw r24, r22
16a: 80 93 7e 00 sts 0x007E, r24
16e: 90 93 7f 00 sts 0x007F, r25
172: a0 93 80 00 sts 0x0080, r26
176: b0 93 81 00 sts 0x0081, r27
anjian(g_value);
17a: bc 01 movw r22, r24
17c: cd 01 movw r24, r26
17e: 2c d0 rcall .+88 ; 0x1d8
GICR|=_BV(INT0);
180: 8b b7 in r24, 0x3b ; 59
182: 80 64 ori r24, 0x40 ; 64
184: 8b bf out 0x3b, r24 ; 59
sei();
186: 78 94 sei
188: ff 91 pop r31
18a: ef 91 pop r30
18c: bf 91 pop r27
18e: af 91 pop r26
190: 9f 91 pop r25
192: 8f 91 pop r24
194: 7f 91 pop r23
196: 6f 91 pop r22
198: 5f 91 pop r21
19a: 4f 91 pop r20
19c: 3f 91 pop r19
19e: 2f 91 pop r18
1a0: 1f 91 pop r17
1a2: 0f 91 pop r16
1a4: 0f 90 pop r0
1a6: 0f be out 0x3f, r0 ; 63
1a8: 0f 90 pop r0
1aa: 1f 90 pop r1
1ac: 18 95 reti
000001ae <main>:
}
int main(void)
{
1ae: cf e5 ldi r28, 0x5F ; 95
1b0: d4 e0 ldi r29, 0x04 ; 4
1b2: de bf out 0x3e, r29 ; 62
1b4: cd bf out 0x3d, r28 ; 61
ioint();PORTB|=_BV(PB3);
1b6: 0a d1 rcall .+532 ; 0x3cc
1b8: c3 9a sbi 0x18, 3 ; 24
PORTC&=~_BV(PC2);PORTC&=~_BV(PC3);PORTC&=~_BV(PC5);
1ba: aa 98 cbi 0x15, 2 ; 21
1bc: ab 98 cbi 0x15, 3 ; 21
1be: ad 98 cbi 0x15, 5 ; 21
ADMUX=0XC0;//左對齊,通道1
1c0: 80 ec ldi r24, 0xC0 ; 192
1c2: 87 b9 out 0x07, r24 ; 7
ADCSRA=_BV(ADIE)|_BV(ADEN)|_BV(ADPS1)|_BV(ADPS0);
1c4: 8b e8 ldi r24, 0x8B ; 139
1c6: 86 b9 out 0x06, r24 ; 6
MCUCR|=_BV(ISC01);
1c8: 85 b7 in r24, 0x35 ; 53
1ca: 82 60 ori r24, 0x02 ; 2
1cc: 85 bf out 0x35, r24 ; 53
GICR|=_BV(INT0);
1ce: 8b b7 in r24, 0x3b ; 59
1d0: 80 64 ori r24, 0x40 ; 64
1d2: 8b bf out 0x3b, r24 ; 59
sei();
1d4: 78 94 sei
while(1)
1d6: ff cf rjmp .-2 ; 0x1d6
000001d8 <anjian>:
#include<avr/io.h>
#include<dianya.h>
#define uint unsigned int
void anjian(float a)
{
1d8: ef 92 push r14
1da: ff 92 push r15
1dc: 0f 93 push r16
1de: 1f 93 push r17
1e0: 7b 01 movw r14, r22
1e2: 8c 01 movw r16, r24
if(a<=950) //1
1e4: 20 e0 ldi r18, 0x00 ; 0
1e6: 30 e8 ldi r19, 0x80 ; 128
1e8: 4d e6 ldi r20, 0x6D ; 109
1ea: 54 e4 ldi r21, 0x44 ; 68
1ec: 99 d1 rcall .+818 ; 0x520
1ee: 18 16 cp r1, r24
1f0: 14 f0 brlt .+4 ; 0x1f6
{//PORTC&=~_BV(PC5);PORTC|=_BV(PC2);PORTC|=_BV(PC3);}///5
PORTB&=~_BV(PB3);}
1f2: c3 98 cbi 0x18, 3 ; 24
1f4: 81 c0 rjmp .+258 ; 0x2f8
else
//if(a>200&&a<600)//2
//{PORTC&=~_BV(PC3);PORTC|=_BV(PC5);PORTC|=_BV(PC2);}///3
//else
if(a>750&&a<=950)//3
{PORTC&=~_BV(PC2);PORTC|=_BV(PC3);PORTC|=_BV(PC5);}///2
else
if(a>950&&a<=1200)//4
1f6: 20 e0 ldi r18, 0x00 ; 0
1f8: 30 e8 ldi r19, 0x80 ; 128
1fa: 4d e6 ldi r20, 0x6D ; 109
1fc: 54 e4 ldi r21, 0x44 ; 68
1fe: c8 01 movw r24, r16
200: b7 01 movw r22, r14
202: 91 d1 rcall .+802 ; 0x526
204: 18 16 cp r1, r24
206: 6c f4 brge .+26 ; 0x222
208: 20 e0 ldi r18, 0x00 ; 0
20a: 30 e0 ldi r19, 0x00 ; 0
20c: 46 e9 ldi r20, 0x96 ; 150
20e: 54 e4 ldi r21, 0x44 ; 68
210: c8 01 movw r24, r16
212: b7 01 movw r22, r14
214: 85 d1 rcall .+778 ; 0x520
216: 18 16 cp r1, r24
218: 24 f0 brlt .+8 ; 0x222
{PORTC|=_BV(PC2);PORTC&=~_BV(PC3);PORTC&=~_BV(PC5);}///5.3
21a: aa 9a sbi 0x15, 2 ; 21
21c: ab 98 cbi 0x15, 3 ; 21
21e: ad 98 cbi 0x15, 5 ; 21
220: 6b c0 rjmp .+214 ; 0x2f8
else
if(a>1200&&a<=1450)//5
222: 20 e0 ldi r18, 0x00 ; 0
224: 30 e0 ldi r19, 0x00 ; 0
226: 46 e9 ldi r20, 0x96 ; 150
228: 54 e4 ldi r21, 0x44 ; 68
22a: c8 01 movw r24, r16
22c: b7 01 movw r22, r14
22e: 7b d1 rcall .+758 ; 0x526
230: 18 16 cp r1, r24
232: 64 f4 brge .+24 ; 0x24c
234: 20 e0 ldi r18, 0x00 ; 0
236: 30 e4 ldi r19, 0x40 ; 64
238: 45 eb ldi r20, 0xB5 ; 181
23a: 54 e4 ldi r21, 0x44 ; 68
23c: c8 01 movw r24, r16
23e: b7 01 movw r22, r14
240: 6f d1 rcall .+734 ; 0x520
242: 18 16 cp r1, r24
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -