182 lines
6.6 KiB
Plaintext
182 lines
6.6 KiB
Plaintext
|
|
||
|
Door.elf: file format elf32-avr
|
||
|
|
||
|
Sections:
|
||
|
Idx Name Size VMA LMA File off Algn
|
||
|
0 .text 000000a0 00000000 00000000 00000074 2**1
|
||
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||
|
1 .data 00000000 00800060 000000a0 00000114 2**0
|
||
|
CONTENTS, ALLOC, LOAD, DATA
|
||
|
2 .stab 000006b4 00000000 00000000 00000114 2**2
|
||
|
CONTENTS, READONLY, DEBUGGING
|
||
|
3 .stabstr 00000082 00000000 00000000 000007c8 2**0
|
||
|
CONTENTS, READONLY, DEBUGGING
|
||
|
4 .comment 0000002f 00000000 00000000 0000084a 2**0
|
||
|
CONTENTS, READONLY
|
||
|
5 .debug_aranges 00000038 00000000 00000000 00000879 2**0
|
||
|
CONTENTS, READONLY, DEBUGGING
|
||
|
6 .debug_info 000001c5 00000000 00000000 000008b1 2**0
|
||
|
CONTENTS, READONLY, DEBUGGING
|
||
|
7 .debug_abbrev 00000107 00000000 00000000 00000a76 2**0
|
||
|
CONTENTS, READONLY, DEBUGGING
|
||
|
8 .debug_line 000001bf 00000000 00000000 00000b7d 2**0
|
||
|
CONTENTS, READONLY, DEBUGGING
|
||
|
9 .debug_frame 00000054 00000000 00000000 00000d3c 2**2
|
||
|
CONTENTS, READONLY, DEBUGGING
|
||
|
10 .debug_str 00000122 00000000 00000000 00000d90 2**0
|
||
|
CONTENTS, READONLY, DEBUGGING
|
||
|
11 .debug_loc 00000046 00000000 00000000 00000eb2 2**0
|
||
|
CONTENTS, READONLY, DEBUGGING
|
||
|
12 .debug_ranges 00000028 00000000 00000000 00000ef8 2**0
|
||
|
CONTENTS, READONLY, DEBUGGING
|
||
|
|
||
|
Disassembly of section .text:
|
||
|
|
||
|
00000000 <__vectors>:
|
||
|
0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end>
|
||
|
2: 17 c0 rjmp .+46 ; 0x32 <__bad_interrupt>
|
||
|
4: 16 c0 rjmp .+44 ; 0x32 <__bad_interrupt>
|
||
|
6: 15 c0 rjmp .+42 ; 0x32 <__bad_interrupt>
|
||
|
8: 14 c0 rjmp .+40 ; 0x32 <__bad_interrupt>
|
||
|
a: 13 c0 rjmp .+38 ; 0x32 <__bad_interrupt>
|
||
|
c: 12 c0 rjmp .+36 ; 0x32 <__bad_interrupt>
|
||
|
e: 11 c0 rjmp .+34 ; 0x32 <__bad_interrupt>
|
||
|
10: 10 c0 rjmp .+32 ; 0x32 <__bad_interrupt>
|
||
|
12: 0f c0 rjmp .+30 ; 0x32 <__bad_interrupt>
|
||
|
14: 0e c0 rjmp .+28 ; 0x32 <__bad_interrupt>
|
||
|
16: 0d c0 rjmp .+26 ; 0x32 <__bad_interrupt>
|
||
|
18: 0c c0 rjmp .+24 ; 0x32 <__bad_interrupt>
|
||
|
1a: 0b c0 rjmp .+22 ; 0x32 <__bad_interrupt>
|
||
|
1c: 0a c0 rjmp .+20 ; 0x32 <__bad_interrupt>
|
||
|
1e: 09 c0 rjmp .+18 ; 0x32 <__bad_interrupt>
|
||
|
20: 08 c0 rjmp .+16 ; 0x32 <__bad_interrupt>
|
||
|
22: 07 c0 rjmp .+14 ; 0x32 <__bad_interrupt>
|
||
|
24: 06 c0 rjmp .+12 ; 0x32 <__bad_interrupt>
|
||
|
|
||
|
00000026 <__ctors_end>:
|
||
|
26: 11 24 eor r1, r1
|
||
|
28: 1f be out 0x3f, r1 ; 63
|
||
|
2a: cf ed ldi r28, 0xDF ; 223
|
||
|
2c: cd bf out 0x3d, r28 ; 61
|
||
|
2e: 11 d0 rcall .+34 ; 0x52 <main>
|
||
|
30: 35 c0 rjmp .+106 ; 0x9c <_exit>
|
||
|
|
||
|
00000032 <__bad_interrupt>:
|
||
|
32: e6 cf rjmp .-52 ; 0x0 <__vectors>
|
||
|
|
||
|
00000034 <_Z8Init_AINv>:
|
||
|
// The Analog Comparator's positive input is
|
||
|
// connected to the AIN0 pin
|
||
|
// The Analog Comparator's negative input is
|
||
|
// connected to the AIN1 pin
|
||
|
// Analog Comparator Input Capture by Timer/Counter 1: Off
|
||
|
ACSR=(0<<ACD) | (0<<ACBG) | (0<<ACO) | (0<<ACI) | (0<<ACIE) | (0<<ACIC) | (0<<ACIS1) | (0<<ACIS0);
|
||
|
34: 18 b8 out 0x08, r1 ; 8
|
||
|
// Digital input buffer on AIN0: Off
|
||
|
// Digital input buffer on AIN1: Off
|
||
|
DIDR=(1<<AIN0D) | (1<<AIN1D);
|
||
|
36: 83 e0 ldi r24, 0x03 ; 3
|
||
|
38: 81 b9 out 0x01, r24 ; 1
|
||
|
3a: 08 95 ret
|
||
|
|
||
|
0000003c <_Z11Init_Outputv>:
|
||
|
}
|
||
|
|
||
|
void Init_Output()
|
||
|
{
|
||
|
DDRB |= (1<<PINB2);
|
||
|
3c: ba 9a sbi 0x17, 2 ; 23
|
||
|
DDRD |= (1<<PIND5);
|
||
|
3e: 8d 9a sbi 0x11, 5 ; 17
|
||
|
40: 08 95 ret
|
||
|
|
||
|
00000042 <_Z10Init_Timerv>:
|
||
|
// OC0B output: Inverted PWM
|
||
|
// Timer Period: 0,06375 ms
|
||
|
// Output Pulse(s):
|
||
|
// OC0A Period: 0,06375 ms Width: 0,25 us
|
||
|
// OC0B Period: 0,06375 ms Width: 0,06325 ms
|
||
|
TCCR0A=(1<<COM0A1) | (0<<COM0A0) | (1<<COM0B1) | (1<<COM0B0) | (0<<WGM01) | (1<<WGM00);
|
||
|
42: 81 eb ldi r24, 0xB1 ; 177
|
||
|
44: 80 bf out 0x30, r24 ; 48
|
||
|
TCCR0B=(0<<WGM02) | (0<<CS02) | (0<<CS01) | (1<<CS00);
|
||
|
46: 81 e0 ldi r24, 0x01 ; 1
|
||
|
48: 83 bf out 0x33, r24 ; 51
|
||
|
TCNT0=0x00;
|
||
|
4a: 12 be out 0x32, r1 ; 50
|
||
|
OCR0A=0x00;
|
||
|
4c: 16 be out 0x36, r1 ; 54
|
||
|
OCR0B=0x00;
|
||
|
4e: 1c be out 0x3c, r1 ; 60
|
||
|
50: 08 95 ret
|
||
|
|
||
|
00000052 <main>:
|
||
|
}
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
Init_AIN();
|
||
|
52: f0 df rcall .-32 ; 0x34 <_Z8Init_AINv>
|
||
|
Init_Output();
|
||
|
54: f3 df rcall .-26 ; 0x3c <_Z11Init_Outputv>
|
||
|
Init_Timer();
|
||
|
56: f5 df rcall .-22 ; 0x42 <_Z10Init_Timerv>
|
||
|
while(1)
|
||
|
{
|
||
|
if(ACSR & (1<<ACO)) {
|
||
|
58: 45 9b sbis 0x08, 5 ; 8
|
||
|
5a: 10 c0 rjmp .+32 ; 0x7c <main+0x2a>
|
||
|
if(OCR0A != 0) {
|
||
|
5c: 86 b7 in r24, 0x36 ; 54
|
||
|
5e: 88 23 and r24, r24
|
||
|
60: d9 f3 breq .-10 ; 0x58 <main+0x6>
|
||
|
OCR0A--;
|
||
|
62: 86 b7 in r24, 0x36 ; 54
|
||
|
64: 81 50 subi r24, 0x01 ; 1
|
||
|
66: 86 bf out 0x36, r24 ; 54
|
||
|
OCR0B--;
|
||
|
68: 8c b7 in r24, 0x3c ; 60
|
||
|
6a: 81 50 subi r24, 0x01 ; 1
|
||
|
6c: 8c bf out 0x3c, r24 ; 60
|
||
|
#else
|
||
|
//round up by default
|
||
|
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
|
||
|
#endif
|
||
|
|
||
|
__builtin_avr_delay_cycles(__ticks_dc);
|
||
|
6e: 8f ec ldi r24, 0xCF ; 207
|
||
|
70: 97 e0 ldi r25, 0x07 ; 7
|
||
|
72: 01 97 sbiw r24, 0x01 ; 1
|
||
|
74: f1 f7 brne .-4 ; 0x72 <main+0x20>
|
||
|
76: 00 c0 rjmp .+0 ; 0x78 <main+0x26>
|
||
|
78: 00 00 nop
|
||
|
7a: ee cf rjmp .-36 ; 0x58 <main+0x6>
|
||
|
_delay_ms(1);
|
||
|
}
|
||
|
} else {
|
||
|
if(OCR0A != 0xFF) {
|
||
|
7c: 86 b7 in r24, 0x36 ; 54
|
||
|
7e: 8f 3f cpi r24, 0xFF ; 255
|
||
|
80: 59 f3 breq .-42 ; 0x58 <main+0x6>
|
||
|
OCR0A++;
|
||
|
82: 86 b7 in r24, 0x36 ; 54
|
||
|
84: 8f 5f subi r24, 0xFF ; 255
|
||
|
86: 86 bf out 0x36, r24 ; 54
|
||
|
OCR0B++;
|
||
|
88: 8c b7 in r24, 0x3c ; 60
|
||
|
8a: 8f 5f subi r24, 0xFF ; 255
|
||
|
8c: 8c bf out 0x3c, r24 ; 60
|
||
|
8e: 8f ed ldi r24, 0xDF ; 223
|
||
|
90: 9e e2 ldi r25, 0x2E ; 46
|
||
|
92: 01 97 sbiw r24, 0x01 ; 1
|
||
|
94: f1 f7 brne .-4 ; 0x92 <main+0x40>
|
||
|
96: 00 c0 rjmp .+0 ; 0x98 <main+0x46>
|
||
|
98: 00 00 nop
|
||
|
9a: de cf rjmp .-68 ; 0x58 <main+0x6>
|
||
|
|
||
|
0000009c <_exit>:
|
||
|
9c: f8 94 cli
|
||
|
|
||
|
0000009e <__stop_program>:
|
||
|
9e: ff cf rjmp .-2 ; 0x9e <__stop_program>
|