/IR-TX-BL/tags/V0.01/Doku/IR-Ctrl_Schaltplan.GIF |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/IR-TX-BL/tags/V0.01/Doku/README.TXT |
---|
0,0 → 1,77 |
Readme zur "PPM2PentaxIR" (geändert 2.12.2007) |
Auslösen und Zoomen von Pentax Fotokameres per IR, gesteuert durch Servoausgang (PPM) |
Hardwarebasis für die Entwicklung ist eine unbestückte Holger BL-CTRL V1.0 Platinen. |
Auf dieser Platinen wurden lediglich folgende Bauteile bestückt. |
(Bauteilwerte wie bei original BL Bestückung beibehalten) |
IC1 ATMEGA8 - A |
R3 100 |
R10 18K |
R26 4K7 |
R27 1K |
R33 1K |
R32 10 |
C3 100n |
C7 100n |
C11 100n |
C12 10uF/16V |
LED1 LED0805 Grün |
LED2 LED0805 Rot |
Es läst sich natürlich LED1 und LED2 sowie die zugehörigen Vorwiderstände (R27 und R33) einsparen falls man diese eh nicht verwenden möchte, |
zumal Sie eher für Debugzwecke eingesetzt wurden. |
Das PPM Signal (vom Servoausgang) muss an das PPM Pad der BL Platine (Pin12 ATMEGA) |
Masse kann praktisch an einen beliebigen Massepunkt an der BL Platinen. Die Versorgungsspannung geht bei mir einfach direkt an das Ausgangspad |
des nicht vorhanden Spannungsreglers (IC2) bzw. an den Anschlusspunkt welcher auf der BL Paltine mit 5V versehen ist. |
Da kein Spannungsregler verwendet wird ist strickt darauf zu achten, das keine zu hohen Spannungen für die Versorgung verwendet werden, |
die üblichen 4,5 bis 5,x Volt eines Empfänger Ausgangs kann der Amtel gut ab. Besser wäre es natürlich einen Spannungsregler zu verwenden, |
dann aber statt des 5V Reglers einen 3.3 Volt Typ. Hier sollte dann jedoch der RC Oscilator des Atmegas geprüft werden, da zu erwarten ist |
das die Frequenz nicht mehr besonders gut stimmt (tut sie 5V wohl auch nicht) |
Die IR Diode (ich habe fast beliebige Typen ausprobiert welche ich im Bestand hatte) wird an Masse und an das Basispad des nicht bestückten T1 angeschlossen. |
Hierbei dient R3 nun als Vorwiderstand für die LED, deshalb ist R3 auch der einzige Widerstand welcher gegenüber der original BL Bestückung vom Wert her |
geändert ist. |
Wichtig: |
Beim Programieren des ATMegas muß auf die richtigen Fusesettings geachtet werden, der Controller muß mit internem 8Mhz Osc laufen. |
Ich habe zum setzen der Fusebits PonyPorg verwendet. |
Das Programieren des Controller läuft bei mir mit AVRdude unter "Programmers Notepad" aus der WinAVR Installation. |
Wird das mitgelieferte "makefile" verwendet so ist dort als Programmer "PonySer auf Com1" ausgewähl, so das man mit einem Sercon Interface direkt |
aus WinAvr das Programm auf den ATMega progen kann. (geht nur per echter Seriel Schnittstelle, kein USB zu RS232 Wandler) |
Die Bedienung ist derzeit relativ einfach. Bei Mittelstellung des Kanals (Knüppel Mittel) passiert nichts, wird der Kanal nun in die eine Richtung |
gesteuert so wird eine neue Zoomstufe eingestellt (drei Zoomstuffen gibt es bei der Pentax per IR Steuerung), wird der Kanal in |
die andere Richtung gesteuert, so wird ein Bild ausgelöst. |
Schaltpunkte sind derzeit fix bei ca. nach oben 1750us und 1250us nach unten jeweils mit einer Hysterese von 100us. |
Eine normale Graupneranlage gibt üblicherweise bei Kanal Mittelstellung etwas 1500us aus, mit einem Hub in beide Richtungen von ca. 600us |
(bei 100% Servoweg), also 1100us bis 1900us. Somit liegen die Schaltpunkte etwa auf halbem Weg. |
Anzumerken ist jedoch, das der Interne RC Oscilator des ATMEGA8 ohne spezielle Kalibrierung nicht besonders genau ist und somit doch ganz |
schöne Abweichungen auftretten können. Hiermit verschieben sich dann natürlich auch die Schaltpunkte nach oben oder unten. |
Es befindet sich sicher noch die ein oder andere Stelle im Code welche man besser machen oder eleganter lösen könnte. |
Das ganze ist mein erstes Atmel AVR Project und dann auch noch in C , ich bin eigentlich ein eingefleischter |
PIC Assembler Fritze :-) also verzeiht mir den Programmierstiel zumal das ganze innerhalb eines Tages fertig wurde. |
Wenn jemand gerne andere IR Codes ausgeben lassen möchte und genau weis wie diese ausehen, bzw. ich dies rausfinden kann so bin ich auch gerne |
bereits das zu implementieren. |
Viel Spaß beim nachbauen und verbessern. |
Walter Meyer |
30.11.2007 |
freakware GmbH division south |
/IR-TX-BL/tags/V0.01/IR-Tx.pnproj |
---|
0,0 → 1,0 |
<Project name="IR-Tx"><File path="main.c"></File><File path="main.h"></File><File path="uart.h"></File><File path="uart.c"></File></Project> |
/IR-TX-BL/tags/V0.01/IR-Tx.pnps |
---|
0,0 → 1,0 |
<pd><ViewState><e p="IR-Tx" x="true"></e></ViewState></pd> |
/IR-TX-BL/tags/V0.01/IR-Tx.pnws |
---|
0,0 → 1,0 |
<Workspace><File path="c:\mikrokopter\ir-tx_\tags\v0.01\main.c"></File><Project path="c:\mikrokopter\ir-tx_\tags\v0.01\ir-tx.pnproj"></Project></Workspace> |
/IR-TX-BL/tags/V0.01/IR-Tx_V0_01.elf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/IR-TX-BL/tags/V0.01/IR-Tx_V0_01.hex |
---|
0,0 → 1,102 |
:1000000012C02CC02BC02AC029C03AC027C026C0AD |
:1000100026C0AFC023C022C021C020C01FC01EC048 |
:100020001DC01CC01BC011241FBECFE5D4E0DEBF25 |
:10003000CDBF10E0A0E6B0E0E6E3F6E002C0059038 |
:100040000D92A636B107D9F710E0A6E6B0E001C0E0 |
:100050001D92AC37B107E1F711D1ECC2D1CF1F929D |
:100060000F920FB60F9211248F9380916A008F5FC9 |
:1000700080936A008F910F900FBE0F901F9018957C |
:100080001F920F920FB60F9211242F933F934F930D |
:100090008F939F930EB406FE0CC08EB58F7B8EBDE2 |
:1000A00010926A0086B597B59093710080937000A6 |
:1000B0004CC08EB580648EBD26B537B580916A0080 |
:1000C0008091700090917100281B390B30936F0064 |
:1000D00020936E00C9018955924087509740A8F53A |
:1000E00088E02533380718F084E398E005C02458E9 |
:1000F000334030F484E893E090936F0080936E0077 |
:100100002091660030916700C90143E0880F991F74 |
:100110004A95E1F7821B930B20916E0030916F009E |
:10012000820F931F23E0969587952A95E1F7909388 |
:100130006F0080936E00909367008093660081E06B |
:1001400090E090936900809368009F918F914F9108 |
:100150003F912F910F900FBE0F901F90189589E03F |
:1001600085BD8CE683BD85E083BF89B78E7F89BF5F |
:1001700008951F920F920FB60F9211248F939F93A1 |
:1001800090916B009230B1F0933020F4913009F0EF |
:1001900052C006C09330E9F0943009F04CC036C02C |
:1001A00085B5806185BD82E080936B0010926D0003 |
:1001B0008AE90BC085B58F7E85BD83E080936B0097 |
:1001C00080916C0086FD03C088EF82BF39C088EE45 |
:1001D000FCCF85B5806185BD88EF82BF80916C00C2 |
:1001E000880F80936C0080916D008F5F80936D000D |
:1001F00080916D00873020F482E080936B0020C0F6 |
:1002000084E080936B0010926D001AC085B58F7EDC |
:1002100085BD8CE382BF80916D00843118F490938A |
:100220006B0003C085E080936B0080916D008F5F51 |
:1002300080936D0005C089B78E7F89BF10926B00D7 |
:100240009F918F910F900FBE0F901F901895982F30 |
:1002500080916B008823E1F781E080936B0090939D |
:100260006C0088B718BE89B7816089BF08951FBC2C |
:1002700082EC8EBD89B7846289BF089588E084BB13 |
:1002800015BA80E881BB12BA8EE087BB18BA44D099 |
:100290001FBC82EC8EBD89B7846289BF60DF789411 |
:1002A00080916800909169000197D1F710926900E0 |
:1002B000109268008091660090916700875D96407B |
:1002C00058F081E4C4DFAB9A80916600909167009A |
:1002D00083579640C8F7AB9880916600909167006D |
:1002E000825E9440E8F6979A80E4B1DF80916600E0 |
:1002F0009091670086549540C8F39798D1CF1F938B |
:10030000182F8A3011F48DE0FADF5D9BFECF1CB907 |
:1003100080E090E01F910895599A88E18AB986E8B3 |
:1003200080BD89E189B960E070E08FE791E001D09C |
:100330000895EF92FF920F931F93CF93DF938C0159 |
:100340007B01892B11F4672BC9F16EE070E081E02D |
:1003500090E03BD0FC01009789F1DC0180E88383C9 |
:10036000E114F10471F0F386E28681E883838091E1 |
:10037000720090917300892B21F4F0937300E09345 |
:10038000720001151105E1F01187008783818260F9 |
:1003900083838091740090917500892B89F4F09388 |
:1003A0007500E09374008091760090917700892B1E |
:1003B00039F4F0937700E093760002C0A0E0B0E05B |
:1003C000CD01E6E0CDB7DEB726C10F931F93CF93E3 |
:1003D000DF93869F8001879F100D969F100D11243B |
:1003E000C8010DD0EC01009721F0A80160E070E099 |
:1003F000FFD0CE01DF91CF911F910F910895CF9340 |
:10040000DF93AC01029710F442E050E0A0917A0033 |
:10041000B0917B00FD01C0E0D0E020E030E020C0E2 |
:10042000808191818417950769F482819381209757 |
:1004300019F09B838A8304C090937B0080937A0099 |
:10044000CF0132C04817590738F42115310519F08A |
:100450008217930708F49C01EF010280F381E02DDD |
:100460003097F1F62115310589F1C901841B950BEF |
:10047000049708F4A901E0E0F0E026C08D919C917A |
:10048000119782179307E9F44817590779F4ED019A |
:100490008A819B81309719F09383828304C0909363 |
:1004A0007B0080937A00CD01029649C0841B950B96 |
:1004B000FD01E80FF91F4193519302978D939C938F |
:1004C0003AC0FD01A281B3811097C1F680917800F6 |
:1004D00090917900892B41F48091620090916300A2 |
:1004E00090937900809378002091640030916500AA |
:1004F0002115310541F42DB73EB7809160009091F0 |
:100500006100281B390BE0917800F09179002E1BD7 |
:100510003F0B2417350788F0CA01029628173907C0 |
:1005200060F0CF01840F951F02969093790080931D |
:10053000780041935193CF0102C080E090E0DF91B9 |
:10054000CF910895CF93DF93009709F44EC0EC014B |
:1005500022971B821A82A0917A00B0917B0010979B |
:1005600011F140E050E001C0DC01AC17BD0700F123 |
:10057000BB83AA83FE0121913191E20FF31FEA1799 |
:10058000FB0771F42E5F3F4F8D919C911197820F65 |
:10059000931F99838883FD01828193819B838A8342 |
:1005A0004115510559F4D0937B00C0937A001DC0CA |
:1005B000FD0182819381AD010097B1F6FA01D383E9 |
:1005C000C28321913191E20FF31FEC17FD0769F40B |
:1005D0002E5F3F4F88819981820F931FFA0191838B |
:1005E00080838A819B8193838283DF91CF91089559 |
:1005F000DC0101C06D9341505040E0F708952A8816 |
:10060000398848885F846E847D848C849B84AA8426 |
:10061000B984C884DF80EE80FD800C811B81AA81B3 |
:10062000B981CE0FD11D0FB6F894DEBF0FBECDBF7E |
:06063000ED010895FFCF6B |
:0606360020007C00000022 |
:00000001FF |
/IR-TX-BL/tags/V0.01/IR-Tx_V0_01.lss |
---|
0,0 → 1,974 |
IR-Tx_V0_01.elf: file format elf32-avr |
Sections: |
Idx Name Size VMA LMA File off Algn |
0 .text 00000636 00000000 00000000 00000094 2**1 |
CONTENTS, ALLOC, LOAD, READONLY, CODE |
1 .data 00000006 00800060 00000636 000006ca 2**0 |
CONTENTS, ALLOC, LOAD, DATA |
2 .bss 00000016 00800066 00800066 000006d0 2**0 |
ALLOC |
3 .stab 00000378 00000000 00000000 000006d0 2**2 |
CONTENTS, READONLY, DEBUGGING |
4 .stabstr 00000071 00000000 00000000 00000a48 2**0 |
CONTENTS, READONLY, DEBUGGING |
5 .debug_aranges 00000040 00000000 00000000 00000ab9 2**0 |
CONTENTS, READONLY, DEBUGGING |
6 .debug_pubnames 000000f4 00000000 00000000 00000af9 2**0 |
CONTENTS, READONLY, DEBUGGING |
7 .debug_info 00000263 00000000 00000000 00000bed 2**0 |
CONTENTS, READONLY, DEBUGGING |
8 .debug_abbrev 00000148 00000000 00000000 00000e50 2**0 |
CONTENTS, READONLY, DEBUGGING |
9 .debug_line 000004ec 00000000 00000000 00000f98 2**0 |
CONTENTS, READONLY, DEBUGGING |
10 .debug_frame 000000b0 00000000 00000000 00001484 2**2 |
CONTENTS, READONLY, DEBUGGING |
11 .debug_str 00000123 00000000 00000000 00001534 2**0 |
CONTENTS, READONLY, DEBUGGING |
12 .debug_loc 0000003c 00000000 00000000 00001657 2**0 |
CONTENTS, READONLY, DEBUGGING |
Disassembly of section .text: |
00000000 <__vectors>: |
0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end> |
2: 2c c0 rjmp .+88 ; 0x5c <__bad_interrupt> |
4: 2b c0 rjmp .+86 ; 0x5c <__bad_interrupt> |
6: 2a c0 rjmp .+84 ; 0x5c <__bad_interrupt> |
8: 29 c0 rjmp .+82 ; 0x5c <__bad_interrupt> |
a: 3a c0 rjmp .+116 ; 0x80 <__vector_5> |
c: 27 c0 rjmp .+78 ; 0x5c <__bad_interrupt> |
e: 26 c0 rjmp .+76 ; 0x5c <__bad_interrupt> |
10: 26 c0 rjmp .+76 ; 0x5e <__vector_8> |
12: af c0 rjmp .+350 ; 0x172 <__vector_9> |
14: 23 c0 rjmp .+70 ; 0x5c <__bad_interrupt> |
16: 22 c0 rjmp .+68 ; 0x5c <__bad_interrupt> |
18: 21 c0 rjmp .+66 ; 0x5c <__bad_interrupt> |
1a: 20 c0 rjmp .+64 ; 0x5c <__bad_interrupt> |
1c: 1f c0 rjmp .+62 ; 0x5c <__bad_interrupt> |
1e: 1e c0 rjmp .+60 ; 0x5c <__bad_interrupt> |
20: 1d c0 rjmp .+58 ; 0x5c <__bad_interrupt> |
22: 1c c0 rjmp .+56 ; 0x5c <__bad_interrupt> |
24: 1b c0 rjmp .+54 ; 0x5c <__bad_interrupt> |
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: e6 e3 ldi r30, 0x36 ; 54 |
3a: f6 e0 ldi r31, 0x06 ; 6 |
3c: 02 c0 rjmp .+4 ; 0x42 <.do_copy_data_start> |
0000003e <.do_copy_data_loop>: |
3e: 05 90 lpm r0, Z+ |
40: 0d 92 st X+, r0 |
00000042 <.do_copy_data_start>: |
42: a6 36 cpi r26, 0x66 ; 102 |
44: b1 07 cpc r27, r17 |
46: d9 f7 brne .-10 ; 0x3e <.do_copy_data_loop> |
00000048 <__do_clear_bss>: |
48: 10 e0 ldi r17, 0x00 ; 0 |
4a: a6 e6 ldi r26, 0x66 ; 102 |
4c: b0 e0 ldi r27, 0x00 ; 0 |
4e: 01 c0 rjmp .+2 ; 0x52 <.do_clear_bss_start> |
00000050 <.do_clear_bss_loop>: |
50: 1d 92 st X+, r1 |
00000052 <.do_clear_bss_start>: |
52: ac 37 cpi r26, 0x7C ; 124 |
54: b1 07 cpc r27, r17 |
56: e1 f7 brne .-8 ; 0x50 <.do_clear_bss_loop> |
58: 11 d1 rcall .+546 ; 0x27c <main> |
5a: ec c2 rjmp .+1496 ; 0x634 <_exit> |
0000005c <__bad_interrupt>: |
5c: d1 cf rjmp .-94 ; 0x0 <__vectors> |
0000005e <__vector_8>: |
volatile unsigned char IRbit = 0; |
SIGNAL(SIG_OVERFLOW1) |
{ |
5e: 1f 92 push r1 |
60: 0f 92 push r0 |
62: 0f b6 in r0, 0x3f ; 63 |
64: 0f 92 push r0 |
66: 11 24 eor r1, r1 |
68: 8f 93 push r24 |
TMR1OvF++; |
6a: 80 91 6a 00 lds r24, 0x006A |
6e: 8f 5f subi r24, 0xFF ; 255 |
70: 80 93 6a 00 sts 0x006A, r24 |
74: 8f 91 pop r24 |
76: 0f 90 pop r0 |
78: 0f be out 0x3f, r0 ; 63 |
7a: 0f 90 pop r0 |
7c: 1f 90 pop r1 |
7e: 18 95 reti |
00000080 <__vector_5>: |
} |
SIGNAL(SIG_INPUT_CAPTURE1) |
{ |
80: 1f 92 push r1 |
82: 0f 92 push r0 |
84: 0f b6 in r0, 0x3f ; 63 |
86: 0f 92 push r0 |
88: 11 24 eor r1, r1 |
8a: 2f 93 push r18 |
8c: 3f 93 push r19 |
8e: 4f 93 push r20 |
90: 8f 93 push r24 |
92: 9f 93 push r25 |
static unsigned int pos_ICR; |
static unsigned int ppm; |
if ((TCCR1B & (1<<ICES1)) != 0) |
94: 0e b4 in r0, 0x2e ; 46 |
96: 06 fe sbrs r0, 6 |
98: 0c c0 rjmp .+24 ; 0xb2 <__vector_5+0x32> |
{ |
TCCR1B &= ~(1<<ICES1); //invert trigger |
9a: 8e b5 in r24, 0x2e ; 46 |
9c: 8f 7b andi r24, 0xBF ; 191 |
9e: 8e bd out 0x2e, r24 ; 46 |
TMR1OvF = 0; |
a0: 10 92 6a 00 sts 0x006A, r1 |
pos_ICR = ICR1; |
a4: 86 b5 in r24, 0x26 ; 38 |
a6: 97 b5 in r25, 0x27 ; 39 |
a8: 90 93 71 00 sts 0x0071, r25 |
ac: 80 93 70 00 sts 0x0070, r24 |
b0: 4c c0 rjmp .+152 ; 0x14a <__vector_5+0xca> |
} |
else //Negative Flanke |
{ |
TCCR1B |= (1<<ICES1); |
b2: 8e b5 in r24, 0x2e ; 46 |
b4: 80 64 ori r24, 0x40 ; 64 |
b6: 8e bd out 0x2e, r24 ; 46 |
ppm = (ICR1 - pos_ICR + (int) TMR1OvF * 65536); |
b8: 26 b5 in r18, 0x26 ; 38 |
ba: 37 b5 in r19, 0x27 ; 39 |
bc: 80 91 6a 00 lds r24, 0x006A |
c0: 80 91 70 00 lds r24, 0x0070 |
c4: 90 91 71 00 lds r25, 0x0071 |
c8: 28 1b sub r18, r24 |
ca: 39 0b sbc r19, r25 |
cc: 30 93 6f 00 sts 0x006F, r19 |
d0: 20 93 6e 00 sts 0x006E, r18 |
if ((ppm > 600) && (ppm < 2400)) |
d4: c9 01 movw r24, r18 |
d6: 89 55 subi r24, 0x59 ; 89 |
d8: 92 40 sbci r25, 0x02 ; 2 |
da: 87 50 subi r24, 0x07 ; 7 |
dc: 97 40 sbci r25, 0x07 ; 7 |
de: a8 f5 brcc .+106 ; 0x14a <__vector_5+0xca> |
{ |
if (ppm > 2100) ppm = 2100; |
e0: 88 e0 ldi r24, 0x08 ; 8 |
e2: 25 33 cpi r18, 0x35 ; 53 |
e4: 38 07 cpc r19, r24 |
e6: 18 f0 brcs .+6 ; 0xee <__vector_5+0x6e> |
e8: 84 e3 ldi r24, 0x34 ; 52 |
ea: 98 e0 ldi r25, 0x08 ; 8 |
ec: 05 c0 rjmp .+10 ; 0xf8 <__vector_5+0x78> |
if (ppm < 900) ppm = 900; |
ee: 24 58 subi r18, 0x84 ; 132 |
f0: 33 40 sbci r19, 0x03 ; 3 |
f2: 30 f4 brcc .+12 ; 0x100 <__vector_5+0x80> |
f4: 84 e8 ldi r24, 0x84 ; 132 |
f6: 93 e0 ldi r25, 0x03 ; 3 |
f8: 90 93 6f 00 sts 0x006F, r25 |
fc: 80 93 6e 00 sts 0x006E, r24 |
ppm = (ppm_signal * 7 + ppm) / 8; |
100: 20 91 66 00 lds r18, 0x0066 |
104: 30 91 67 00 lds r19, 0x0067 |
108: c9 01 movw r24, r18 |
10a: 43 e0 ldi r20, 0x03 ; 3 |
10c: 88 0f add r24, r24 |
10e: 99 1f adc r25, r25 |
110: 4a 95 dec r20 |
112: e1 f7 brne .-8 ; 0x10c <__vector_5+0x8c> |
114: 82 1b sub r24, r18 |
116: 93 0b sbc r25, r19 |
118: 20 91 6e 00 lds r18, 0x006E |
11c: 30 91 6f 00 lds r19, 0x006F |
120: 82 0f add r24, r18 |
122: 93 1f adc r25, r19 |
124: 23 e0 ldi r18, 0x03 ; 3 |
126: 96 95 lsr r25 |
128: 87 95 ror r24 |
12a: 2a 95 dec r18 |
12c: e1 f7 brne .-8 ; 0x126 <__vector_5+0xa6> |
12e: 90 93 6f 00 sts 0x006F, r25 |
132: 80 93 6e 00 sts 0x006E, r24 |
ppm_signal = ppm; |
136: 90 93 67 00 sts 0x0067, r25 |
13a: 80 93 66 00 sts 0x0066, r24 |
ppm_new = 1; |
13e: 81 e0 ldi r24, 0x01 ; 1 |
140: 90 e0 ldi r25, 0x00 ; 0 |
142: 90 93 69 00 sts 0x0069, r25 |
146: 80 93 68 00 sts 0x0068, r24 |
14a: 9f 91 pop r25 |
14c: 8f 91 pop r24 |
14e: 4f 91 pop r20 |
150: 3f 91 pop r19 |
152: 2f 91 pop r18 |
154: 0f 90 pop r0 |
156: 0f be out 0x3f, r0 ; 63 |
158: 0f 90 pop r0 |
15a: 1f 90 pop r1 |
15c: 18 95 reti |
0000015e <StartIRModulation>: |
} |
} |
} |
/*##############################################################################*/ |
void StartIRModulation(void) |
{ |
15e: 89 e0 ldi r24, 0x09 ; 9 |
160: 85 bd out 0x25, r24 ; 37 |
//Timer1 Config for generation the 38Khz IR Modulation |
TCCR2 = (0<<FOC2)|(0<<WGM20)|(0<<COM21)|(0<<COM20)| |
(1<<WGM21) |(0<<CS22) |(0<<CS21) |(1<<CS20); |
OCR2 = 108; //~38Khz @ 8Mhz |
162: 8c e6 ldi r24, 0x6C ; 108 |
164: 83 bd out 0x23, r24 ; 35 |
//Timer 0 Config for getting right timing for IR Pattern |
TCCR0 = (1<<CS02)|(0<<CS01)|(1<<CS00); // clk(@8MHz) / 1024 = 128us / clk (resolution) |
166: 85 e0 ldi r24, 0x05 ; 5 |
168: 83 bf out 0x33, r24 ; 51 |
TIMSK &= ~(1<<TOIE0); // |
16a: 89 b7 in r24, 0x39 ; 57 |
16c: 8e 7f andi r24, 0xFE ; 254 |
16e: 89 bf out 0x39, r24 ; 57 |
170: 08 95 ret |
00000172 <__vector_9>: |
} |
SIGNAL(SIG_OVERFLOW0) |
{ |
172: 1f 92 push r1 |
174: 0f 92 push r0 |
176: 0f b6 in r0, 0x3f ; 63 |
178: 0f 92 push r0 |
17a: 11 24 eor r1, r1 |
17c: 8f 93 push r24 |
17e: 9f 93 push r25 |
switch (IRstate) |
180: 90 91 6b 00 lds r25, 0x006B |
184: 92 30 cpi r25, 0x02 ; 2 |
186: b1 f0 breq .+44 ; 0x1b4 <__vector_9+0x42> |
188: 93 30 cpi r25, 0x03 ; 3 |
18a: 20 f4 brcc .+8 ; 0x194 <__vector_9+0x22> |
18c: 91 30 cpi r25, 0x01 ; 1 |
18e: 09 f0 breq .+2 ; 0x192 <__vector_9+0x20> |
190: 52 c0 rjmp .+164 ; 0x236 <__vector_9+0xc4> |
192: 06 c0 rjmp .+12 ; 0x1a0 <__vector_9+0x2e> |
194: 93 30 cpi r25, 0x03 ; 3 |
196: e9 f0 breq .+58 ; 0x1d2 <__vector_9+0x60> |
198: 94 30 cpi r25, 0x04 ; 4 |
19a: 09 f0 breq .+2 ; 0x19e <__vector_9+0x2c> |
19c: 4c c0 rjmp .+152 ; 0x236 <__vector_9+0xc4> |
19e: 36 c0 rjmp .+108 ; 0x20c <__vector_9+0x9a> |
{ |
case 1: |
TCCR2 setbit (1<<COM20); |
1a0: 85 b5 in r24, 0x25 ; 37 |
1a2: 80 61 ori r24, 0x10 ; 16 |
1a4: 85 bd out 0x25, r24 ; 37 |
IRstate = 2; |
1a6: 82 e0 ldi r24, 0x02 ; 2 |
1a8: 80 93 6b 00 sts 0x006B, r24 |
IRbit = 0; |
1ac: 10 92 6d 00 sts 0x006D, r1 |
TCNT0 = 255 - (13000 / 128); |
1b0: 8a e9 ldi r24, 0x9A ; 154 |
1b2: 0b c0 rjmp .+22 ; 0x1ca <__vector_9+0x58> |
break; |
case 2: |
TCCR2 clrbit (1<<COM20); |
1b4: 85 b5 in r24, 0x25 ; 37 |
1b6: 8f 7e andi r24, 0xEF ; 239 |
1b8: 85 bd out 0x25, r24 ; 37 |
IRstate = 3; |
1ba: 83 e0 ldi r24, 0x03 ; 3 |
1bc: 80 93 6b 00 sts 0x006B, r24 |
if ((IRdat & 0x40) == 0) TCNT0 = 255 - (1000 / 128); |
1c0: 80 91 6c 00 lds r24, 0x006C |
1c4: 86 fd sbrc r24, 6 |
1c6: 03 c0 rjmp .+6 ; 0x1ce <__vector_9+0x5c> |
1c8: 88 ef ldi r24, 0xF8 ; 248 |
1ca: 82 bf out 0x32, r24 ; 50 |
1cc: 39 c0 rjmp .+114 ; 0x240 <__vector_9+0xce> |
else TCNT0 = 255 - (3000 / 128); |
1ce: 88 ee ldi r24, 0xE8 ; 232 |
1d0: fc cf rjmp .-8 ; 0x1ca <__vector_9+0x58> |
break; |
case 3: |
TCCR2 setbit (1<<COM20); |
1d2: 85 b5 in r24, 0x25 ; 37 |
1d4: 80 61 ori r24, 0x10 ; 16 |
1d6: 85 bd out 0x25, r24 ; 37 |
TCNT0 = 255 - (1000 / 128); |
1d8: 88 ef ldi r24, 0xF8 ; 248 |
1da: 82 bf out 0x32, r24 ; 50 |
IRdat = IRdat << 1; |
1dc: 80 91 6c 00 lds r24, 0x006C |
1e0: 88 0f add r24, r24 |
1e2: 80 93 6c 00 sts 0x006C, r24 |
IRbit++; |
1e6: 80 91 6d 00 lds r24, 0x006D |
1ea: 8f 5f subi r24, 0xFF ; 255 |
1ec: 80 93 6d 00 sts 0x006D, r24 |
if (IRbit < 7) IRstate = 2; |
1f0: 80 91 6d 00 lds r24, 0x006D |
1f4: 87 30 cpi r24, 0x07 ; 7 |
1f6: 20 f4 brcc .+8 ; 0x200 <__vector_9+0x8e> |
1f8: 82 e0 ldi r24, 0x02 ; 2 |
1fa: 80 93 6b 00 sts 0x006B, r24 |
1fe: 20 c0 rjmp .+64 ; 0x240 <__vector_9+0xce> |
else |
{ |
IRstate = 4; |
200: 84 e0 ldi r24, 0x04 ; 4 |
202: 80 93 6b 00 sts 0x006B, r24 |
IRbit = 0; |
206: 10 92 6d 00 sts 0x006D, r1 |
20a: 1a c0 rjmp .+52 ; 0x240 <__vector_9+0xce> |
} |
break; |
case 4: |
TCCR2 clrbit (1<<COM20); |
20c: 85 b5 in r24, 0x25 ; 37 |
20e: 8f 7e andi r24, 0xEF ; 239 |
210: 85 bd out 0x25, r24 ; 37 |
TCNT0 = 255 - (25000 / 128); |
212: 8c e3 ldi r24, 0x3C ; 60 |
214: 82 bf out 0x32, r24 ; 50 |
if (IRbit < 20) IRstate = 4; |
216: 80 91 6d 00 lds r24, 0x006D |
21a: 84 31 cpi r24, 0x14 ; 20 |
21c: 18 f4 brcc .+6 ; 0x224 <__vector_9+0xb2> |
21e: 90 93 6b 00 sts 0x006B, r25 |
222: 03 c0 rjmp .+6 ; 0x22a <__vector_9+0xb8> |
else IRstate = 5; |
224: 85 e0 ldi r24, 0x05 ; 5 |
226: 80 93 6b 00 sts 0x006B, r24 |
IRbit++; |
22a: 80 91 6d 00 lds r24, 0x006D |
22e: 8f 5f subi r24, 0xFF ; 255 |
230: 80 93 6d 00 sts 0x006D, r24 |
234: 05 c0 rjmp .+10 ; 0x240 <__vector_9+0xce> |
break; |
default: |
TIMSK &= ~(1<<TOIE0); |
236: 89 b7 in r24, 0x39 ; 57 |
238: 8e 7f andi r24, 0xFE ; 254 |
23a: 89 bf out 0x39, r24 ; 57 |
IRstate = 0; |
23c: 10 92 6b 00 sts 0x006B, r1 |
240: 9f 91 pop r25 |
242: 8f 91 pop r24 |
244: 0f 90 pop r0 |
246: 0f be out 0x3f, r0 ; 63 |
248: 0f 90 pop r0 |
24a: 1f 90 pop r1 |
24c: 18 95 reti |
0000024e <SendIRSignal>: |
break; |
} |
} |
/*##############################################################################*/ |
void SendIRSignal(unsigned char txbyte) |
{ |
24e: 98 2f mov r25, r24 |
while (IRstate != 0) {} //IR already in action ?, if so, wait |
250: 80 91 6b 00 lds r24, 0x006B |
254: 88 23 and r24, r24 |
256: e1 f7 brne .-8 ; 0x250 <SendIRSignal+0x2> |
IRstate = 1; //initial State |
258: 81 e0 ldi r24, 0x01 ; 1 |
25a: 80 93 6b 00 sts 0x006B, r24 |
IRdat = txbyte; //copy IR Data |
25e: 90 93 6c 00 sts 0x006C, r25 |
TIFR &= TOV0; //set TMR0 Int Flag |
262: 88 b7 in r24, 0x38 ; 56 |
264: 18 be out 0x38, r1 ; 56 |
TIMSK setbit (1<<TOIE0); //Enable TMR0 Int |
266: 89 b7 in r24, 0x39 ; 57 |
268: 81 60 ori r24, 0x01 ; 1 |
26a: 89 bf out 0x39, r24 ; 57 |
26c: 08 95 ret |
0000026e <StartPPM>: |
} |
/*##############################################################################*/ |
void StartPPM(void) |
{ |
26e: 1f bc out 0x2f, r1 ; 47 |
//global timer1 Config |
TCCR1A = (0<<COM1A1)|(0<<COM1A0)|(0<<COM1B1)|(0<<COM1B0)| |
(0<<FOC1A) |(0<<FOC1B) |(0<<WGM10) |(0<<WGM11); |
TCCR1B = (1<<ICNC1)|(1<<ICES1)|(0<<WGM13)| |
270: 82 ec ldi r24, 0xC2 ; 194 |
272: 8e bd out 0x2e, r24 ; 46 |
(0<<WGM12)|(0<<CS12)|(1<<CS11)|(0<<CS10); //ICP_POS_FLANKE |
// interrupts |
TIMSK |= (1<<TICIE1)|(1<<TOIE1); //ICP_INT_ENABLE and TIMER1_INT_ENABLE |
274: 89 b7 in r24, 0x39 ; 57 |
276: 84 62 ori r24, 0x24 ; 36 |
278: 89 bf out 0x39, r24 ; 57 |
27a: 08 95 ret |
0000027c <main>: |
} |
/*##############################################################################*/ |
// MAIN |
/*##############################################################################*/ |
int main (void) |
{ |
27c: 88 e0 ldi r24, 0x08 ; 8 |
27e: 84 bb out 0x14, r24 ; 20 |
DDRC = (1<<ledred); |
PORTC = 0x00; |
280: 15 ba out 0x15, r1 ; 21 |
DDRD = (1<<ledgreen); |
282: 80 e8 ldi r24, 0x80 ; 128 |
284: 81 bb out 0x11, r24 ; 17 |
PORTD = 0x00; |
286: 12 ba out 0x12, r1 ; 18 |
DDRB = (1<<1)|(1<<2)|(1<<3); |
288: 8e e0 ldi r24, 0x0E ; 14 |
28a: 87 bb out 0x17, r24 ; 23 |
PORTB = 0x00; |
28c: 18 ba out 0x18, r1 ; 24 |
StartUART(); |
28e: 44 d0 rcall .+136 ; 0x318 <StartUART> |
290: 1f bc out 0x2f, r1 ; 47 |
292: 82 ec ldi r24, 0xC2 ; 194 |
294: 8e bd out 0x2e, r24 ; 46 |
296: 89 b7 in r24, 0x39 ; 57 |
298: 84 62 ori r24, 0x24 ; 36 |
29a: 89 bf out 0x39, r24 ; 57 |
StartPPM(); |
StartIRModulation(); |
29c: 60 df rcall .-320 ; 0x15e <StartIRModulation> |
sei(); |
29e: 78 94 sei |
while (1) |
{ |
//printf("%d ",ppm_signal); |
if (ppm_new == 1) |
2a0: 80 91 68 00 lds r24, 0x0068 |
2a4: 90 91 69 00 lds r25, 0x0069 |
2a8: 01 97 sbiw r24, 0x01 ; 1 |
2aa: d1 f7 brne .-12 ; 0x2a0 <main+0x24> |
{ |
ppm_new = 0; |
2ac: 10 92 69 00 sts 0x0069, r1 |
2b0: 10 92 68 00 sts 0x0068, r1 |
if (ppm_signal > 1750) |
2b4: 80 91 66 00 lds r24, 0x0066 |
2b8: 90 91 67 00 lds r25, 0x0067 |
2bc: 87 5d subi r24, 0xD7 ; 215 |
2be: 96 40 sbci r25, 0x06 ; 6 |
2c0: 58 f0 brcs .+22 ; 0x2d8 <main+0x5c> |
{ |
SendIRSignal(ZOOM); |
2c2: 81 e4 ldi r24, 0x41 ; 65 |
2c4: c4 df rcall .-120 ; 0x24e <SendIRSignal> |
PORTC |= (1<<ledred); |
2c6: ab 9a sbi 0x15, 3 ; 21 |
while (ppm_signal > 1650) {} |
2c8: 80 91 66 00 lds r24, 0x0066 |
2cc: 90 91 67 00 lds r25, 0x0067 |
2d0: 83 57 subi r24, 0x73 ; 115 |
2d2: 96 40 sbci r25, 0x06 ; 6 |
2d4: c8 f7 brcc .-14 ; 0x2c8 <main+0x4c> |
PORTC &= ~(1<<ledred); |
2d6: ab 98 cbi 0x15, 3 ; 21 |
} |
if (ppm_signal < 1250) |
2d8: 80 91 66 00 lds r24, 0x0066 |
2dc: 90 91 67 00 lds r25, 0x0067 |
2e0: 82 5e subi r24, 0xE2 ; 226 |
2e2: 94 40 sbci r25, 0x04 ; 4 |
2e4: e8 f6 brcc .-70 ; 0x2a0 <main+0x24> |
{ |
PORTD |= (1<<ledgreen); |
2e6: 97 9a sbi 0x12, 7 ; 18 |
SendIRSignal(TRIGGER); |
2e8: 80 e4 ldi r24, 0x40 ; 64 |
2ea: b1 df rcall .-158 ; 0x24e <SendIRSignal> |
while (ppm_signal < 1350) {} |
2ec: 80 91 66 00 lds r24, 0x0066 |
2f0: 90 91 67 00 lds r25, 0x0067 |
2f4: 86 54 subi r24, 0x46 ; 70 |
2f6: 95 40 sbci r25, 0x05 ; 5 |
2f8: c8 f3 brcs .-14 ; 0x2ec <main+0x70> |
PORTD &= ~(1<<ledgreen); |
2fa: 97 98 cbi 0x12, 7 ; 18 |
2fc: d1 cf rjmp .-94 ; 0x2a0 <main+0x24> |
000002fe <uart_putchar>: |
} |
int uart_putchar (char c) |
{ |
2fe: 1f 93 push r17 |
300: 18 2f mov r17, r24 |
if (c == '\n') uart_putchar('\r'); |
302: 8a 30 cpi r24, 0x0A ; 10 |
304: 11 f4 brne .+4 ; 0x30a <uart_putchar+0xc> |
306: 8d e0 ldi r24, 0x0D ; 13 |
308: fa df rcall .-12 ; 0x2fe <uart_putchar> |
loop_until_bit_is_set(UCSRA, UDRE); |
30a: 5d 9b sbis 0x0b, 5 ; 11 |
30c: fe cf rjmp .-4 ; 0x30a <uart_putchar+0xc> |
UDR = c; |
30e: 1c b9 out 0x0c, r17 ; 12 |
return (0); |
} |
310: 80 e0 ldi r24, 0x00 ; 0 |
312: 90 e0 ldi r25, 0x00 ; 0 |
314: 1f 91 pop r17 |
316: 08 95 ret |
00000318 <StartUART>: |
318: 59 9a sbi 0x0b, 1 ; 11 |
31a: 88 e1 ldi r24, 0x18 ; 24 |
31c: 8a b9 out 0x0a, r24 ; 10 |
31e: 86 e8 ldi r24, 0x86 ; 134 |
320: 80 bd out 0x20, r24 ; 32 |
322: 89 e1 ldi r24, 0x19 ; 25 |
324: 89 b9 out 0x09, r24 ; 9 |
326: 60 e0 ldi r22, 0x00 ; 0 |
328: 70 e0 ldi r23, 0x00 ; 0 |
32a: 8f e7 ldi r24, 0x7F ; 127 |
32c: 91 e0 ldi r25, 0x01 ; 1 |
32e: 01 d0 rcall .+2 ; 0x332 <fdevopen> |
330: 08 95 ret |
00000332 <fdevopen>: |
332: ef 92 push r14 |
334: ff 92 push r15 |
336: 0f 93 push r16 |
338: 1f 93 push r17 |
33a: cf 93 push r28 |
33c: df 93 push r29 |
33e: 8c 01 movw r16, r24 |
340: 7b 01 movw r14, r22 |
342: 89 2b or r24, r25 |
344: 11 f4 brne .+4 ; 0x34a <fdevopen+0x18> |
346: 67 2b or r22, r23 |
348: c9 f1 breq .+114 ; 0x3bc <fdevopen+0x8a> |
34a: 6e e0 ldi r22, 0x0E ; 14 |
34c: 70 e0 ldi r23, 0x00 ; 0 |
34e: 81 e0 ldi r24, 0x01 ; 1 |
350: 90 e0 ldi r25, 0x00 ; 0 |
352: 3b d0 rcall .+118 ; 0x3ca <calloc> |
354: fc 01 movw r30, r24 |
356: 00 97 sbiw r24, 0x00 ; 0 |
358: 89 f1 breq .+98 ; 0x3bc <fdevopen+0x8a> |
35a: dc 01 movw r26, r24 |
35c: 80 e8 ldi r24, 0x80 ; 128 |
35e: 83 83 std Z+3, r24 ; 0x03 |
360: e1 14 cp r14, r1 |
362: f1 04 cpc r15, r1 |
364: 71 f0 breq .+28 ; 0x382 <fdevopen+0x50> |
366: f3 86 std Z+11, r15 ; 0x0b |
368: e2 86 std Z+10, r14 ; 0x0a |
36a: 81 e8 ldi r24, 0x81 ; 129 |
36c: 83 83 std Z+3, r24 ; 0x03 |
36e: 80 91 72 00 lds r24, 0x0072 |
372: 90 91 73 00 lds r25, 0x0073 |
376: 89 2b or r24, r25 |
378: 21 f4 brne .+8 ; 0x382 <fdevopen+0x50> |
37a: f0 93 73 00 sts 0x0073, r31 |
37e: e0 93 72 00 sts 0x0072, r30 |
382: 01 15 cp r16, r1 |
384: 11 05 cpc r17, r1 |
386: e1 f0 breq .+56 ; 0x3c0 <fdevopen+0x8e> |
388: 11 87 std Z+9, r17 ; 0x09 |
38a: 00 87 std Z+8, r16 ; 0x08 |
38c: 83 81 ldd r24, Z+3 ; 0x03 |
38e: 82 60 ori r24, 0x02 ; 2 |
390: 83 83 std Z+3, r24 ; 0x03 |
392: 80 91 74 00 lds r24, 0x0074 |
396: 90 91 75 00 lds r25, 0x0075 |
39a: 89 2b or r24, r25 |
39c: 89 f4 brne .+34 ; 0x3c0 <fdevopen+0x8e> |
39e: f0 93 75 00 sts 0x0075, r31 |
3a2: e0 93 74 00 sts 0x0074, r30 |
3a6: 80 91 76 00 lds r24, 0x0076 |
3aa: 90 91 77 00 lds r25, 0x0077 |
3ae: 89 2b or r24, r25 |
3b0: 39 f4 brne .+14 ; 0x3c0 <fdevopen+0x8e> |
3b2: f0 93 77 00 sts 0x0077, r31 |
3b6: e0 93 76 00 sts 0x0076, r30 |
3ba: 02 c0 rjmp .+4 ; 0x3c0 <fdevopen+0x8e> |
3bc: a0 e0 ldi r26, 0x00 ; 0 |
3be: b0 e0 ldi r27, 0x00 ; 0 |
3c0: cd 01 movw r24, r26 |
3c2: e6 e0 ldi r30, 0x06 ; 6 |
3c4: cd b7 in r28, 0x3d ; 61 |
3c6: de b7 in r29, 0x3e ; 62 |
3c8: 26 c1 rjmp .+588 ; 0x616 <__epilogue_restores__+0x18> |
000003ca <calloc>: |
3ca: 0f 93 push r16 |
3cc: 1f 93 push r17 |
3ce: cf 93 push r28 |
3d0: df 93 push r29 |
3d2: 86 9f mul r24, r22 |
3d4: 80 01 movw r16, r0 |
3d6: 87 9f mul r24, r23 |
3d8: 10 0d add r17, r0 |
3da: 96 9f mul r25, r22 |
3dc: 10 0d add r17, r0 |
3de: 11 24 eor r1, r1 |
3e0: c8 01 movw r24, r16 |
3e2: 0d d0 rcall .+26 ; 0x3fe <malloc> |
3e4: ec 01 movw r28, r24 |
3e6: 00 97 sbiw r24, 0x00 ; 0 |
3e8: 21 f0 breq .+8 ; 0x3f2 <calloc+0x28> |
3ea: a8 01 movw r20, r16 |
3ec: 60 e0 ldi r22, 0x00 ; 0 |
3ee: 70 e0 ldi r23, 0x00 ; 0 |
3f0: ff d0 rcall .+510 ; 0x5f0 <memset> |
3f2: ce 01 movw r24, r28 |
3f4: df 91 pop r29 |
3f6: cf 91 pop r28 |
3f8: 1f 91 pop r17 |
3fa: 0f 91 pop r16 |
3fc: 08 95 ret |
000003fe <malloc>: |
3fe: cf 93 push r28 |
400: df 93 push r29 |
402: ac 01 movw r20, r24 |
404: 02 97 sbiw r24, 0x02 ; 2 |
406: 10 f4 brcc .+4 ; 0x40c <malloc+0xe> |
408: 42 e0 ldi r20, 0x02 ; 2 |
40a: 50 e0 ldi r21, 0x00 ; 0 |
40c: a0 91 7a 00 lds r26, 0x007A |
410: b0 91 7b 00 lds r27, 0x007B |
414: fd 01 movw r30, r26 |
416: c0 e0 ldi r28, 0x00 ; 0 |
418: d0 e0 ldi r29, 0x00 ; 0 |
41a: 20 e0 ldi r18, 0x00 ; 0 |
41c: 30 e0 ldi r19, 0x00 ; 0 |
41e: 20 c0 rjmp .+64 ; 0x460 <__stack+0x1> |
420: 80 81 ld r24, Z |
422: 91 81 ldd r25, Z+1 ; 0x01 |
424: 84 17 cp r24, r20 |
426: 95 07 cpc r25, r21 |
428: 69 f4 brne .+26 ; 0x444 <malloc+0x46> |
42a: 82 81 ldd r24, Z+2 ; 0x02 |
42c: 93 81 ldd r25, Z+3 ; 0x03 |
42e: 20 97 sbiw r28, 0x00 ; 0 |
430: 19 f0 breq .+6 ; 0x438 <malloc+0x3a> |
432: 9b 83 std Y+3, r25 ; 0x03 |
434: 8a 83 std Y+2, r24 ; 0x02 |
436: 04 c0 rjmp .+8 ; 0x440 <malloc+0x42> |
438: 90 93 7b 00 sts 0x007B, r25 |
43c: 80 93 7a 00 sts 0x007A, r24 |
440: cf 01 movw r24, r30 |
442: 32 c0 rjmp .+100 ; 0x4a8 <__stack+0x49> |
444: 48 17 cp r20, r24 |
446: 59 07 cpc r21, r25 |
448: 38 f4 brcc .+14 ; 0x458 <malloc+0x5a> |
44a: 21 15 cp r18, r1 |
44c: 31 05 cpc r19, r1 |
44e: 19 f0 breq .+6 ; 0x456 <malloc+0x58> |
450: 82 17 cp r24, r18 |
452: 93 07 cpc r25, r19 |
454: 08 f4 brcc .+2 ; 0x458 <malloc+0x5a> |
456: 9c 01 movw r18, r24 |
458: ef 01 movw r28, r30 |
45a: 02 80 ldd r0, Z+2 ; 0x02 |
45c: f3 81 ldd r31, Z+3 ; 0x03 |
45e: e0 2d mov r30, r0 |
460: 30 97 sbiw r30, 0x00 ; 0 |
462: f1 f6 brne .-68 ; 0x420 <malloc+0x22> |
464: 21 15 cp r18, r1 |
466: 31 05 cpc r19, r1 |
468: 89 f1 breq .+98 ; 0x4cc <__stack+0x6d> |
46a: c9 01 movw r24, r18 |
46c: 84 1b sub r24, r20 |
46e: 95 0b sbc r25, r21 |
470: 04 97 sbiw r24, 0x04 ; 4 |
472: 08 f4 brcc .+2 ; 0x476 <__stack+0x17> |
474: a9 01 movw r20, r18 |
476: e0 e0 ldi r30, 0x00 ; 0 |
478: f0 e0 ldi r31, 0x00 ; 0 |
47a: 26 c0 rjmp .+76 ; 0x4c8 <__stack+0x69> |
47c: 8d 91 ld r24, X+ |
47e: 9c 91 ld r25, X |
480: 11 97 sbiw r26, 0x01 ; 1 |
482: 82 17 cp r24, r18 |
484: 93 07 cpc r25, r19 |
486: e9 f4 brne .+58 ; 0x4c2 <__stack+0x63> |
488: 48 17 cp r20, r24 |
48a: 59 07 cpc r21, r25 |
48c: 79 f4 brne .+30 ; 0x4ac <__stack+0x4d> |
48e: ed 01 movw r28, r26 |
490: 8a 81 ldd r24, Y+2 ; 0x02 |
492: 9b 81 ldd r25, Y+3 ; 0x03 |
494: 30 97 sbiw r30, 0x00 ; 0 |
496: 19 f0 breq .+6 ; 0x49e <__stack+0x3f> |
498: 93 83 std Z+3, r25 ; 0x03 |
49a: 82 83 std Z+2, r24 ; 0x02 |
49c: 04 c0 rjmp .+8 ; 0x4a6 <__stack+0x47> |
49e: 90 93 7b 00 sts 0x007B, r25 |
4a2: 80 93 7a 00 sts 0x007A, r24 |
4a6: cd 01 movw r24, r26 |
4a8: 02 96 adiw r24, 0x02 ; 2 |
4aa: 49 c0 rjmp .+146 ; 0x53e <__stack+0xdf> |
4ac: 84 1b sub r24, r20 |
4ae: 95 0b sbc r25, r21 |
4b0: fd 01 movw r30, r26 |
4b2: e8 0f add r30, r24 |
4b4: f9 1f adc r31, r25 |
4b6: 41 93 st Z+, r20 |
4b8: 51 93 st Z+, r21 |
4ba: 02 97 sbiw r24, 0x02 ; 2 |
4bc: 8d 93 st X+, r24 |
4be: 9c 93 st X, r25 |
4c0: 3a c0 rjmp .+116 ; 0x536 <__stack+0xd7> |
4c2: fd 01 movw r30, r26 |
4c4: a2 81 ldd r26, Z+2 ; 0x02 |
4c6: b3 81 ldd r27, Z+3 ; 0x03 |
4c8: 10 97 sbiw r26, 0x00 ; 0 |
4ca: c1 f6 brne .-80 ; 0x47c <__stack+0x1d> |
4cc: 80 91 78 00 lds r24, 0x0078 |
4d0: 90 91 79 00 lds r25, 0x0079 |
4d4: 89 2b or r24, r25 |
4d6: 41 f4 brne .+16 ; 0x4e8 <__stack+0x89> |
4d8: 80 91 62 00 lds r24, 0x0062 |
4dc: 90 91 63 00 lds r25, 0x0063 |
4e0: 90 93 79 00 sts 0x0079, r25 |
4e4: 80 93 78 00 sts 0x0078, r24 |
4e8: 20 91 64 00 lds r18, 0x0064 |
4ec: 30 91 65 00 lds r19, 0x0065 |
4f0: 21 15 cp r18, r1 |
4f2: 31 05 cpc r19, r1 |
4f4: 41 f4 brne .+16 ; 0x506 <__stack+0xa7> |
4f6: 2d b7 in r18, 0x3d ; 61 |
4f8: 3e b7 in r19, 0x3e ; 62 |
4fa: 80 91 60 00 lds r24, 0x0060 |
4fe: 90 91 61 00 lds r25, 0x0061 |
502: 28 1b sub r18, r24 |
504: 39 0b sbc r19, r25 |
506: e0 91 78 00 lds r30, 0x0078 |
50a: f0 91 79 00 lds r31, 0x0079 |
50e: 2e 1b sub r18, r30 |
510: 3f 0b sbc r19, r31 |
512: 24 17 cp r18, r20 |
514: 35 07 cpc r19, r21 |
516: 88 f0 brcs .+34 ; 0x53a <__stack+0xdb> |
518: ca 01 movw r24, r20 |
51a: 02 96 adiw r24, 0x02 ; 2 |
51c: 28 17 cp r18, r24 |
51e: 39 07 cpc r19, r25 |
520: 60 f0 brcs .+24 ; 0x53a <__stack+0xdb> |
522: cf 01 movw r24, r30 |
524: 84 0f add r24, r20 |
526: 95 1f adc r25, r21 |
528: 02 96 adiw r24, 0x02 ; 2 |
52a: 90 93 79 00 sts 0x0079, r25 |
52e: 80 93 78 00 sts 0x0078, r24 |
532: 41 93 st Z+, r20 |
534: 51 93 st Z+, r21 |
536: cf 01 movw r24, r30 |
538: 02 c0 rjmp .+4 ; 0x53e <__stack+0xdf> |
53a: 80 e0 ldi r24, 0x00 ; 0 |
53c: 90 e0 ldi r25, 0x00 ; 0 |
53e: df 91 pop r29 |
540: cf 91 pop r28 |
542: 08 95 ret |
00000544 <free>: |
544: cf 93 push r28 |
546: df 93 push r29 |
548: 00 97 sbiw r24, 0x00 ; 0 |
54a: 09 f4 brne .+2 ; 0x54e <free+0xa> |
54c: 4e c0 rjmp .+156 ; 0x5ea <free+0xa6> |
54e: ec 01 movw r28, r24 |
550: 22 97 sbiw r28, 0x02 ; 2 |
552: 1b 82 std Y+3, r1 ; 0x03 |
554: 1a 82 std Y+2, r1 ; 0x02 |
556: a0 91 7a 00 lds r26, 0x007A |
55a: b0 91 7b 00 lds r27, 0x007B |
55e: 10 97 sbiw r26, 0x00 ; 0 |
560: 11 f1 breq .+68 ; 0x5a6 <free+0x62> |
562: 40 e0 ldi r20, 0x00 ; 0 |
564: 50 e0 ldi r21, 0x00 ; 0 |
566: 01 c0 rjmp .+2 ; 0x56a <free+0x26> |
568: dc 01 movw r26, r24 |
56a: ac 17 cp r26, r28 |
56c: bd 07 cpc r27, r29 |
56e: 00 f1 brcs .+64 ; 0x5b0 <free+0x6c> |
570: bb 83 std Y+3, r27 ; 0x03 |
572: aa 83 std Y+2, r26 ; 0x02 |
574: fe 01 movw r30, r28 |
576: 21 91 ld r18, Z+ |
578: 31 91 ld r19, Z+ |
57a: e2 0f add r30, r18 |
57c: f3 1f adc r31, r19 |
57e: ea 17 cp r30, r26 |
580: fb 07 cpc r31, r27 |
582: 71 f4 brne .+28 ; 0x5a0 <free+0x5c> |
584: 2e 5f subi r18, 0xFE ; 254 |
586: 3f 4f sbci r19, 0xFF ; 255 |
588: 8d 91 ld r24, X+ |
58a: 9c 91 ld r25, X |
58c: 11 97 sbiw r26, 0x01 ; 1 |
58e: 82 0f add r24, r18 |
590: 93 1f adc r25, r19 |
592: 99 83 std Y+1, r25 ; 0x01 |
594: 88 83 st Y, r24 |
596: fd 01 movw r30, r26 |
598: 82 81 ldd r24, Z+2 ; 0x02 |
59a: 93 81 ldd r25, Z+3 ; 0x03 |
59c: 9b 83 std Y+3, r25 ; 0x03 |
59e: 8a 83 std Y+2, r24 ; 0x02 |
5a0: 41 15 cp r20, r1 |
5a2: 51 05 cpc r21, r1 |
5a4: 59 f4 brne .+22 ; 0x5bc <free+0x78> |
5a6: d0 93 7b 00 sts 0x007B, r29 |
5aa: c0 93 7a 00 sts 0x007A, r28 |
5ae: 1d c0 rjmp .+58 ; 0x5ea <free+0xa6> |
5b0: fd 01 movw r30, r26 |
5b2: 82 81 ldd r24, Z+2 ; 0x02 |
5b4: 93 81 ldd r25, Z+3 ; 0x03 |
5b6: ad 01 movw r20, r26 |
5b8: 00 97 sbiw r24, 0x00 ; 0 |
5ba: b1 f6 brne .-84 ; 0x568 <free+0x24> |
5bc: fa 01 movw r30, r20 |
5be: d3 83 std Z+3, r29 ; 0x03 |
5c0: c2 83 std Z+2, r28 ; 0x02 |
5c2: 21 91 ld r18, Z+ |
5c4: 31 91 ld r19, Z+ |
5c6: e2 0f add r30, r18 |
5c8: f3 1f adc r31, r19 |
5ca: ec 17 cp r30, r28 |
5cc: fd 07 cpc r31, r29 |
5ce: 69 f4 brne .+26 ; 0x5ea <free+0xa6> |
5d0: 2e 5f subi r18, 0xFE ; 254 |
5d2: 3f 4f sbci r19, 0xFF ; 255 |
5d4: 88 81 ld r24, Y |
5d6: 99 81 ldd r25, Y+1 ; 0x01 |
5d8: 82 0f add r24, r18 |
5da: 93 1f adc r25, r19 |
5dc: fa 01 movw r30, r20 |
5de: 91 83 std Z+1, r25 ; 0x01 |
5e0: 80 83 st Z, r24 |
5e2: 8a 81 ldd r24, Y+2 ; 0x02 |
5e4: 9b 81 ldd r25, Y+3 ; 0x03 |
5e6: 93 83 std Z+3, r25 ; 0x03 |
5e8: 82 83 std Z+2, r24 ; 0x02 |
5ea: df 91 pop r29 |
5ec: cf 91 pop r28 |
5ee: 08 95 ret |
000005f0 <memset>: |
5f0: dc 01 movw r26, r24 |
5f2: 01 c0 rjmp .+2 ; 0x5f6 <memset+0x6> |
5f4: 6d 93 st X+, r22 |
5f6: 41 50 subi r20, 0x01 ; 1 |
5f8: 50 40 sbci r21, 0x00 ; 0 |
5fa: e0 f7 brcc .-8 ; 0x5f4 <memset+0x4> |
5fc: 08 95 ret |
000005fe <__epilogue_restores__>: |
5fe: 2a 88 ldd r2, Y+18 ; 0x12 |
600: 39 88 ldd r3, Y+17 ; 0x11 |
602: 48 88 ldd r4, Y+16 ; 0x10 |
604: 5f 84 ldd r5, Y+15 ; 0x0f |
606: 6e 84 ldd r6, Y+14 ; 0x0e |
608: 7d 84 ldd r7, Y+13 ; 0x0d |
60a: 8c 84 ldd r8, Y+12 ; 0x0c |
60c: 9b 84 ldd r9, Y+11 ; 0x0b |
60e: aa 84 ldd r10, Y+10 ; 0x0a |
610: b9 84 ldd r11, Y+9 ; 0x09 |
612: c8 84 ldd r12, Y+8 ; 0x08 |
614: df 80 ldd r13, Y+7 ; 0x07 |
616: ee 80 ldd r14, Y+6 ; 0x06 |
618: fd 80 ldd r15, Y+5 ; 0x05 |
61a: 0c 81 ldd r16, Y+4 ; 0x04 |
61c: 1b 81 ldd r17, Y+3 ; 0x03 |
61e: aa 81 ldd r26, Y+2 ; 0x02 |
620: b9 81 ldd r27, Y+1 ; 0x01 |
622: ce 0f add r28, r30 |
624: d1 1d adc r29, r1 |
626: 0f b6 in r0, 0x3f ; 63 |
628: f8 94 cli |
62a: de bf out 0x3e, r29 ; 62 |
62c: 0f be out 0x3f, r0 ; 63 |
62e: cd bf out 0x3d, r28 ; 61 |
630: ed 01 movw r28, r26 |
632: 08 95 ret |
00000634 <_exit>: |
634: ff cf rjmp .-2 ; 0x634 <_exit> |
/IR-TX-BL/tags/V0.01/IR-Tx_V0_01.map |
---|
0,0 → 1,514 |
Archive member included because of file (symbol) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o (exit) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
main.o (__do_copy_data) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
main.o (__do_clear_bss) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o (fdevopen) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) (__iob) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) (calloc) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) (malloc) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) (memset) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) (__epilogue_restores__) |
Allocating common symbols |
Common symbol size file |
__brkval 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__flp 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__iob 0x6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
Discarded input sections |
.stabstr 0x00000000 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
Memory Configuration |
Name Origin Length Attributes |
text 0x00000000 0x00002000 xr |
data 0x00800060 0x0000ffa0 rw !x |
eeprom 0x00810000 0x00010000 rw !x |
*default* 0x00000000 0xffffffff |
Linker script and memory map |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
LOAD main.o |
LOAD uart.o |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libm.a |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a |
.hash |
*(.hash) |
.dynsym |
*(.dynsym) |
.dynstr |
*(.dynstr) |
.gnu.version |
*(.gnu.version) |
.gnu.version_d |
*(.gnu.version_d) |
.gnu.version_r |
*(.gnu.version_r) |
.rel.init |
*(.rel.init) |
.rela.init |
*(.rela.init) |
.rel.text |
*(.rel.text) |
*(.rel.text.*) |
*(.rel.gnu.linkonce.t*) |
.rela.text |
*(.rela.text) |
*(.rela.text.*) |
*(.rela.gnu.linkonce.t*) |
.rel.fini |
*(.rel.fini) |
.rela.fini |
*(.rela.fini) |
.rel.rodata |
*(.rel.rodata) |
*(.rel.rodata.*) |
*(.rel.gnu.linkonce.r*) |
.rela.rodata |
*(.rela.rodata) |
*(.rela.rodata.*) |
*(.rela.gnu.linkonce.r*) |
.rel.data |
*(.rel.data) |
*(.rel.data.*) |
*(.rel.gnu.linkonce.d*) |
.rela.data |
*(.rela.data) |
*(.rela.data.*) |
*(.rela.gnu.linkonce.d*) |
.rel.ctors |
*(.rel.ctors) |
.rela.ctors |
*(.rela.ctors) |
.rel.dtors |
*(.rel.dtors) |
.rela.dtors |
*(.rela.dtors) |
.rel.got |
*(.rel.got) |
.rela.got |
*(.rela.got) |
.rel.bss |
*(.rel.bss) |
.rela.bss |
*(.rela.bss) |
.rel.plt |
*(.rel.plt) |
.rela.plt |
*(.rela.plt) |
.text 0x00000000 0x636 |
*(.vectors) |
.vectors 0x00000000 0x26 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
0x00000000 __vectors |
0x00000000 __vector_default |
*(.vectors) |
*(.progmem.gcc*) |
*(.progmem*) |
0x00000026 . = ALIGN (0x2) |
0x00000026 __trampolines_start = . |
*(.trampolines) |
.trampolines 0x00000026 0x0 linker stubs |
*(.trampolines*) |
0x00000026 __trampolines_end = . |
*(.jumptables) |
*(.jumptables*) |
*(.lowtext) |
*(.lowtext*) |
0x00000026 __ctors_start = . |
*(.ctors) |
0x00000026 __ctors_end = . |
0x00000026 __dtors_start = . |
*(.dtors) |
0x00000026 __dtors_end = . |
SORT(*)(.ctors) |
SORT(*)(.dtors) |
*(.init0) |
.init0 0x00000026 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
0x00000026 __init |
*(.init0) |
*(.init1) |
*(.init1) |
*(.init2) |
.init2 0x00000026 0xc c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
*(.init2) |
*(.init3) |
*(.init3) |
*(.init4) |
.init4 0x00000032 0x16 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
0x00000032 __do_copy_data |
.init4 0x00000048 0x10 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
0x00000048 __do_clear_bss |
*(.init4) |
*(.init5) |
*(.init5) |
*(.init6) |
*(.init6) |
*(.init7) |
*(.init7) |
*(.init8) |
*(.init8) |
*(.init9) |
.init9 0x00000058 0x4 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
*(.init9) |
*(.text) |
.text 0x0000005c 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
0x0000005c __vector_1 |
0x0000005c __vector_12 |
0x0000005c __bad_interrupt |
0x0000005c __vector_6 |
0x0000005c __vector_3 |
0x0000005c __vector_11 |
0x0000005c __vector_13 |
0x0000005c __vector_17 |
0x0000005c __vector_7 |
0x0000005c __vector_4 |
0x0000005c __vector_2 |
0x0000005c __vector_15 |
0x0000005c __vector_14 |
0x0000005c __vector_10 |
0x0000005c __vector_16 |
0x0000005c __vector_18 |
.text 0x0000005e 0x2a0 main.o |
0x0000024e SendIRSignal |
0x0000015e StartIRModulation |
0x0000026e StartPPM |
0x00000080 __vector_5 |
0x0000027c main |
0x00000172 __vector_9 |
0x0000005e __vector_8 |
.text 0x000002fe 0x34 uart.o |
0x00000318 StartUART |
0x000002fe uart_putchar |
.text 0x00000332 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.text 0x00000332 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.text 0x00000332 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.text 0x00000332 0x98 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
0x00000332 fdevopen |
.text 0x000003ca 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
.text 0x000003ca 0x34 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
0x000003ca calloc |
.text 0x000003fe 0x1f2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
0x000003fe malloc |
0x00000544 free |
.text 0x000005f0 0xe c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
0x000005f0 memset |
.text 0x000005fe 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
0x000005fe . = ALIGN (0x2) |
*(.text.*) |
.text.libgcc 0x000005fe 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.text.libgcc 0x000005fe 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.text.libgcc 0x000005fe 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.text.libgcc 0x000005fe 0x36 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
0x000005fe __epilogue_restores__ |
0x00000634 . = ALIGN (0x2) |
*(.fini9) |
.fini9 0x00000634 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
0x00000634 exit |
0x00000634 _exit |
*(.fini9) |
*(.fini8) |
*(.fini8) |
*(.fini7) |
*(.fini7) |
*(.fini6) |
*(.fini6) |
*(.fini5) |
*(.fini5) |
*(.fini4) |
*(.fini4) |
*(.fini3) |
*(.fini3) |
*(.fini2) |
*(.fini2) |
*(.fini1) |
*(.fini1) |
*(.fini0) |
.fini0 0x00000634 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
*(.fini0) |
0x00000636 _etext = . |
.data 0x00800060 0x6 load address 0x00000636 |
0x00800060 PROVIDE (__data_start, .) |
*(.data) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.data 0x00800060 0x0 main.o |
.data 0x00800060 0x0 uart.o |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
.data 0x00800060 0x6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
0x00800062 __malloc_heap_start |
0x00800064 __malloc_heap_end |
0x00800060 __malloc_margin |
.data 0x00800066 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
.data 0x00800066 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
*(.data*) |
*(.rodata) |
*(.rodata*) |
*(.gnu.linkonce.d*) |
0x00800066 . = ALIGN (0x2) |
0x00800066 _edata = . |
0x00800066 PROVIDE (__data_end, .) |
.bss 0x00800066 0x16 |
0x00800066 PROVIDE (__bss_start, .) |
*(.bss) |
.bss 0x00800066 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.bss 0x00800066 0xc main.o |
0x0080006b IRstate |
0x0080006a TMR1OvF |
0x0080006d IRbit |
0x00800068 ppm_new |
0x0080006c IRdat |
0x00800066 ppm_signal |
.bss 0x00800072 0x0 uart.o |
.bss 0x00800072 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.bss 0x00800072 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.bss 0x00800072 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.bss 0x00800072 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
.bss 0x00800072 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
.bss 0x00800072 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
.bss 0x00800072 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
.bss 0x00800072 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
.bss 0x00800072 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
*(.bss*) |
*(COMMON) |
COMMON 0x00800072 0x6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
0x00800072 __iob |
COMMON 0x00800078 0x4 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
0x00800078 __brkval |
0x0080007a __flp |
0x0080007c PROVIDE (__bss_end, .) |
0x00000636 __data_load_start = LOADADDR (.data) |
0x0000063c __data_load_end = (__data_load_start + SIZEOF (.data)) |
.noinit 0x0080007c 0x0 |
0x0080007c PROVIDE (__noinit_start, .) |
*(.noinit*) |
0x0080007c PROVIDE (__noinit_end, .) |
0x0080007c _end = . |
0x0080007c PROVIDE (__heap_start, .) |
.eeprom 0x00810000 0x0 |
*(.eeprom*) |
0x00810000 __eeprom_end = . |
.stab 0x00000000 0x378 |
*(.stab) |
.stab 0x00000000 0x378 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.stabstr 0x00000000 0x71 |
*(.stabstr) |
.stabstr 0x00000000 0x71 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.stab.excl |
*(.stab.excl) |
.stab.exclstr |
*(.stab.exclstr) |
.stab.index |
*(.stab.index) |
.stab.indexstr |
*(.stab.indexstr) |
.comment |
*(.comment) |
.debug |
*(.debug) |
.line |
*(.line) |
.debug_srcinfo |
*(.debug_srcinfo) |
.debug_sfnames |
*(.debug_sfnames) |
.debug_aranges 0x00000000 0x40 |
*(.debug_aranges) |
.debug_aranges |
0x00000000 0x20 main.o |
.debug_aranges |
0x00000020 0x20 uart.o |
.debug_pubnames |
0x00000000 0xf4 |
*(.debug_pubnames) |
.debug_pubnames |
0x00000000 0xc3 main.o |
.debug_pubnames |
0x000000c3 0x31 uart.o |
.debug_info 0x00000000 0x263 |
*(.debug_info) |
.debug_info 0x00000000 0x1c0 main.o |
.debug_info 0x000001c0 0xa3 uart.o |
*(.gnu.linkonce.wi.*) |
.debug_abbrev 0x00000000 0x148 |
*(.debug_abbrev) |
.debug_abbrev 0x00000000 0xe1 main.o |
.debug_abbrev 0x000000e1 0x67 uart.o |
.debug_line 0x00000000 0x4ec |
*(.debug_line) |
.debug_line 0x00000000 0x386 main.o |
.debug_line 0x00000386 0x166 uart.o |
.debug_frame 0x00000000 0xb0 |
*(.debug_frame) |
.debug_frame 0x00000000 0x80 main.o |
.debug_frame 0x00000080 0x30 uart.o |
.debug_str 0x00000000 0x123 |
*(.debug_str) |
.debug_str 0x00000000 0x105 main.o |
0x13e (size before relaxing) |
.debug_str 0x00000105 0x1e uart.o |
0xc9 (size before relaxing) |
.debug_loc 0x00000000 0x3c |
*(.debug_loc) |
.debug_loc 0x00000000 0x1e main.o |
.debug_loc 0x0000001e 0x1e uart.o |
.debug_macinfo |
*(.debug_macinfo) |
OUTPUT(IR-Tx_V0_01.elf elf32-avr) |
LOAD linker stubs |
Cross Reference Table |
Symbol File |
IRbit main.o |
IRdat main.o |
IRstate main.o |
SendIRSignal main.o |
StartIRModulation main.o |
StartPPM main.o |
StartUART uart.o |
main.o |
TMR1OvF main.o |
__bad_interrupt c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__brkval c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__bss_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
__bss_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
__data_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
__data_load_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
__data_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
__do_clear_bss c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o |
main.o |
__do_copy_data c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o |
main.o |
__epilogue_restores__ c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
__flp c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__heap_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__heap_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__init c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__iob c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
__malloc_heap_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__malloc_heap_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__malloc_margin c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__stack c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_1 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_10 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_11 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_12 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_13 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_14 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_15 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_16 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_17 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_18 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_3 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_4 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_5 main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_7 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_8 main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_9 main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_default c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vectors c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
_exit c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
calloc c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
exit c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
fdevopen c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o |
free c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
main main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
malloc c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
memset c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
ppm_new main.o |
ppm_signal main.o |
uart_putchar uart.o |
/IR-TX-BL/tags/V0.01/IR-Tx_V0_01.sym |
---|
0,0 → 1,106 |
00000000 W __heap_end |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 W __vector_default |
00000000 T __vectors |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000026 T __ctors_end |
00000026 T __ctors_start |
00000026 T __dtors_end |
00000026 T __dtors_start |
00000026 W __init |
00000026 T __trampolines_end |
00000026 T __trampolines_start |
00000032 T __do_copy_data |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003e t .do_copy_data_loop |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
00000042 t .do_copy_data_start |
00000048 T __do_clear_bss |
00000050 t .do_clear_bss_loop |
00000052 t .do_clear_bss_start |
0000005c T __bad_interrupt |
0000005c W __vector_1 |
0000005c W __vector_10 |
0000005c W __vector_11 |
0000005c W __vector_12 |
0000005c W __vector_13 |
0000005c W __vector_14 |
0000005c W __vector_15 |
0000005c W __vector_16 |
0000005c W __vector_17 |
0000005c W __vector_18 |
0000005c W __vector_2 |
0000005c W __vector_3 |
0000005c W __vector_4 |
0000005c W __vector_6 |
0000005c W __vector_7 |
0000005e T __vector_8 |
00000080 T __vector_5 |
0000015e T StartIRModulation |
00000172 T __vector_9 |
0000024e T SendIRSignal |
0000026e T StartPPM |
0000027c T main |
000002fe T uart_putchar |
00000318 T StartUART |
00000332 T fdevopen |
000003ca T calloc |
000003fe T malloc |
0000045f W __stack |
00000544 T free |
000005f0 T memset |
000005fe T __epilogue_restores__ |
00000634 t __stop_program |
00000634 T _exit |
00000634 W exit |
00000636 A __data_load_start |
00000636 T _etext |
0000063c A __data_load_end |
00800060 D __data_start |
00800060 D __malloc_margin |
00800062 D __malloc_heap_start |
00800064 D __malloc_heap_end |
00800066 B __bss_start |
00800066 D __data_end |
00800066 D _edata |
00800066 B ppm_signal |
00800068 B ppm_new |
0080006a B TMR1OvF |
0080006b B IRstate |
0080006c B IRdat |
0080006d B IRbit |
0080006e b ppm.1753 |
00800070 b pos_ICR.1752 |
00800072 B __iob |
00800078 B __brkval |
0080007a B __flp |
0080007c B __bss_end |
0080007c A __heap_start |
0080007c A _end |
00810000 A __eeprom_end |
/IR-TX-BL/tags/V0.01/main.c |
---|
0,0 → 1,204 |
//############################################################################ |
// - PPM2PentaxIR Main |
// - ATMEGA8 mit 8MHz |
// - Nur für den privaten Gebrauch |
// - Keine Garantie auf Fehlerfreiheit |
// - Kommerzielle Nutzung nur mit meiner Zustimmung |
// - walter Meyer @ www.freakware.de |
// - 30.11.2007 |
// - Make sure Fuses are programmed for internal 8 MHz RC Oscilator |
//############################################################################*/ |
#include "main.h" |
#include "uart.h" |
volatile unsigned int ppm_signal = 0; |
volatile unsigned int ppm_new = 0; |
volatile unsigned char TMR1OvF = 0; |
volatile unsigned char IRstate = 0; |
volatile unsigned char IRdat = 0; |
volatile unsigned char IRbit = 0; |
SIGNAL(SIG_OVERFLOW1) |
{ |
TMR1OvF++; |
} |
SIGNAL(SIG_INPUT_CAPTURE1) |
{ |
static unsigned int pos_ICR; |
static unsigned int ppm; |
if ((TCCR1B & (1<<ICES1)) != 0) |
{ |
TCCR1B &= ~(1<<ICES1); //invert trigger |
TMR1OvF = 0; |
pos_ICR = ICR1; |
} |
else //Negative Flanke |
{ |
TCCR1B |= (1<<ICES1); |
ppm = (ICR1 - pos_ICR + (int) TMR1OvF * 65536); |
if ((ppm > 600) && (ppm < 2400)) |
{ |
if (ppm > 2100) ppm = 2100; |
if (ppm < 900) ppm = 900; |
ppm = (ppm_signal * 7 + ppm) / 8; |
ppm_signal = ppm; |
ppm_new = 1; |
} |
} |
} |
/*##############################################################################*/ |
void StartIRModulation(void) |
{ |
//Timer1 Config for generation the 38Khz IR Modulation |
TCCR2 = (0<<FOC2)|(0<<WGM20)|(0<<COM21)|(0<<COM20)| |
(1<<WGM21) |(0<<CS22) |(0<<CS21) |(1<<CS20); |
OCR2 = 108; //~38Khz @ 8Mhz |
//Timer 0 Config for getting right timing for IR Pattern |
TCCR0 = (1<<CS02)|(0<<CS01)|(1<<CS00); // clk(@8MHz) / 1024 = 128us / clk (resolution) |
TIMSK &= ~(1<<TOIE0); // |
} |
SIGNAL(SIG_OVERFLOW0) |
{ |
switch (IRstate) |
{ |
case 1: |
TCCR2 setbit (1<<COM20); |
IRstate = 2; |
IRbit = 0; |
TCNT0 = 255 - (13000 / 128); |
break; |
case 2: |
TCCR2 clrbit (1<<COM20); |
IRstate = 3; |
if ((IRdat & 0x40) == 0) TCNT0 = 255 - (1000 / 128); |
else TCNT0 = 255 - (3000 / 128); |
break; |
case 3: |
TCCR2 setbit (1<<COM20); |
TCNT0 = 255 - (1000 / 128); |
IRdat = IRdat << 1; |
IRbit++; |
if (IRbit < 7) IRstate = 2; |
else |
{ |
IRstate = 4; |
IRbit = 0; |
} |
break; |
case 4: |
TCCR2 clrbit (1<<COM20); |
TCNT0 = 255 - (25000 / 128); |
if (IRbit < 20) IRstate = 4; |
else IRstate = 5; |
IRbit++; |
break; |
default: |
TIMSK &= ~(1<<TOIE0); |
IRstate = 0; |
break; |
} |
} |
/*##############################################################################*/ |
void SendIRSignal(unsigned char txbyte) |
{ |
while (IRstate != 0) {} //IR already in action ?, if so, wait |
IRstate = 1; //initial State |
IRdat = txbyte; //copy IR Data |
TIFR &= TOV0; //set TMR0 Int Flag |
TIMSK setbit (1<<TOIE0); //Enable TMR0 Int |
} |
/*##############################################################################*/ |
void StartPPM(void) |
{ |
//global timer1 Config |
TCCR1A = (0<<COM1A1)|(0<<COM1A0)|(0<<COM1B1)|(0<<COM1B0)| |
(0<<FOC1A) |(0<<FOC1B) |(0<<WGM10) |(0<<WGM11); |
TCCR1B = (1<<ICNC1)|(1<<ICES1)|(0<<WGM13)| |
(0<<WGM12)|(0<<CS12)|(1<<CS11)|(0<<CS10); //ICP_POS_FLANKE |
// interrupts |
TIMSK |= (1<<TICIE1)|(1<<TOIE1); //ICP_INT_ENABLE and TIMER1_INT_ENABLE |
} |
/*##############################################################################*/ |
// MAIN |
/*##############################################################################*/ |
int main (void) |
{ |
DDRC = (1<<ledred); |
PORTC = 0x00; |
DDRD = (1<<ledgreen); |
PORTD = 0x00; |
DDRB = (1<<1)|(1<<2)|(1<<3); |
PORTB = 0x00; |
StartUART(); |
StartPPM(); |
StartIRModulation(); |
sei(); |
while (1) |
{ |
//printf("%d ",ppm_signal); |
if (ppm_new == 1) |
{ |
ppm_new = 0; |
if (ppm_signal > 1750) |
{ |
SendIRSignal(ZOOM); |
PORTC |= (1<<ledred); |
while (ppm_signal > 1650) {} |
PORTC &= ~(1<<ledred); |
} |
if (ppm_signal < 1250) |
{ |
PORTD |= (1<<ledgreen); |
SendIRSignal(TRIGGER); |
while (ppm_signal < 1350) {} |
PORTD &= ~(1<<ledgreen); |
} |
} |
} |
} |
/IR-TX-BL/tags/V0.01/main.d |
---|
0,0 → 1,0 |
main.o main.d : main.c main.h uart.h |
/IR-TX-BL/tags/V0.01/main.h |
---|
0,0 → 1,31 |
#ifndef _MAIN_H |
#define _MAIN_H |
#define SYSCLK 8000000L |
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
#include <avr/io.h> |
#include <avr/interrupt.h> |
#include <avr/eeprom.h> |
#define setbit |= |
#define clrbit &=~ |
#define invbit ^= |
#define ledred 3 //on Port C |
#define ledgreen 7 //on Port D |
#define correction -60 |
#define ZOOM 0x41 |
#define TRIGGER 0x40 |
#endif //_MAIN_H |
/IR-TX-BL/tags/V0.01/main.lst |
---|
0,0 → 1,519 |
1 .file "main.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
17 .Ltext0: |
18 .global __vector_8 |
20 __vector_8: |
21 .LFB10: |
22 .LM1: |
23 /* prologue: frame size=0 */ |
24 0000 1F92 push __zero_reg__ |
25 0002 0F92 push __tmp_reg__ |
26 0004 0FB6 in __tmp_reg__,__SREG__ |
27 0006 0F92 push __tmp_reg__ |
28 0008 1124 clr __zero_reg__ |
29 000a 8F93 push r24 |
30 /* prologue end (size=6) */ |
31 .LM2: |
32 000c 8091 0000 lds r24,TMR1OvF |
33 0010 8F5F subi r24,lo8(-(1)) |
34 0012 8093 0000 sts TMR1OvF,r24 |
35 /* epilogue: frame size=0 */ |
36 0016 8F91 pop r24 |
37 0018 0F90 pop __tmp_reg__ |
38 001a 0FBE out __SREG__,__tmp_reg__ |
39 001c 0F90 pop __tmp_reg__ |
40 001e 1F90 pop __zero_reg__ |
41 0020 1895 reti |
42 /* epilogue end (size=6) */ |
43 /* function __vector_8 size 17 (5) */ |
44 .LFE10: |
46 .global __vector_5 |
48 __vector_5: |
49 .LFB11: |
50 .LM3: |
51 /* prologue: frame size=0 */ |
52 0022 1F92 push __zero_reg__ |
53 0024 0F92 push __tmp_reg__ |
54 0026 0FB6 in __tmp_reg__,__SREG__ |
55 0028 0F92 push __tmp_reg__ |
56 002a 1124 clr __zero_reg__ |
57 002c 2F93 push r18 |
58 002e 3F93 push r19 |
59 0030 4F93 push r20 |
60 0032 8F93 push r24 |
61 0034 9F93 push r25 |
62 /* prologue end (size=10) */ |
63 .LM4: |
64 0036 0EB4 in __tmp_reg__,78-0x20 |
65 0038 06FE sbrs __tmp_reg__,6 |
66 003a 00C0 rjmp .L4 |
67 .LM5: |
68 003c 8EB5 in r24,78-0x20 |
69 003e 8F7B andi r24,lo8(-65) |
70 0040 8EBD out 78-0x20,r24 |
71 .LM6: |
72 0042 1092 0000 sts TMR1OvF,__zero_reg__ |
73 .LM7: |
74 0046 86B5 in r24,70-0x20 |
75 0048 97B5 in r25,(70)+1-0x20 |
76 004a 9093 0000 sts (pos_ICR.1752)+1,r25 |
77 004e 8093 0000 sts pos_ICR.1752,r24 |
78 0052 00C0 rjmp .L12 |
79 .L4: |
80 .LM8: |
81 0054 8EB5 in r24,78-0x20 |
82 0056 8064 ori r24,lo8(64) |
83 0058 8EBD out 78-0x20,r24 |
84 .LM9: |
85 005a 26B5 in r18,70-0x20 |
86 005c 37B5 in r19,(70)+1-0x20 |
87 005e 8091 0000 lds r24,TMR1OvF |
88 0062 8091 0000 lds r24,pos_ICR.1752 |
89 0066 9091 0000 lds r25,(pos_ICR.1752)+1 |
90 006a 281B sub r18,r24 |
91 006c 390B sbc r19,r25 |
92 006e 3093 0000 sts (ppm.1753)+1,r19 |
93 0072 2093 0000 sts ppm.1753,r18 |
94 .LM10: |
95 0076 C901 movw r24,r18 |
96 0078 8955 subi r24,lo8(-(-601)) |
97 007a 9240 sbci r25,hi8(-(-601)) |
98 007c 8750 subi r24,lo8(1799) |
99 007e 9740 sbci r25,hi8(1799) |
100 0080 00F4 brsh .L12 |
101 .LM11: |
102 0082 88E0 ldi r24,hi8(2101) |
103 0084 2533 cpi r18,lo8(2101) |
104 0086 3807 cpc r19,r24 |
105 0088 00F0 brlo .L8 |
106 008a 84E3 ldi r24,lo8(2100) |
107 008c 98E0 ldi r25,hi8(2100) |
108 008e 00C0 rjmp .L13 |
109 .L8: |
110 .LM12: |
111 0090 2458 subi r18,lo8(900) |
112 0092 3340 sbci r19,hi8(900) |
113 0094 00F4 brsh .L10 |
114 0096 84E8 ldi r24,lo8(900) |
115 0098 93E0 ldi r25,hi8(900) |
116 .L13: |
117 009a 9093 0000 sts (ppm.1753)+1,r25 |
118 009e 8093 0000 sts ppm.1753,r24 |
119 .L10: |
120 .LM13: |
121 00a2 2091 0000 lds r18,ppm_signal |
122 00a6 3091 0000 lds r19,(ppm_signal)+1 |
123 00aa C901 movw r24,r18 |
124 00ac 43E0 ldi r20,3 |
125 00ae 880F 1: lsl r24 |
126 00b0 991F rol r25 |
127 00b2 4A95 dec r20 |
128 00b4 01F4 brne 1b |
129 00b6 821B sub r24,r18 |
130 00b8 930B sbc r25,r19 |
131 00ba 2091 0000 lds r18,ppm.1753 |
132 00be 3091 0000 lds r19,(ppm.1753)+1 |
133 00c2 820F add r24,r18 |
134 00c4 931F adc r25,r19 |
135 00c6 23E0 ldi r18,3 |
136 00c8 9695 1: lsr r25 |
137 00ca 8795 ror r24 |
138 00cc 2A95 dec r18 |
139 00ce 01F4 brne 1b |
140 00d0 9093 0000 sts (ppm.1753)+1,r25 |
141 00d4 8093 0000 sts ppm.1753,r24 |
142 .LM14: |
143 00d8 9093 0000 sts (ppm_signal)+1,r25 |
144 00dc 8093 0000 sts ppm_signal,r24 |
145 .LM15: |
146 00e0 81E0 ldi r24,lo8(1) |
147 00e2 90E0 ldi r25,hi8(1) |
148 00e4 9093 0000 sts (ppm_new)+1,r25 |
149 00e8 8093 0000 sts ppm_new,r24 |
150 .L12: |
151 /* epilogue: frame size=0 */ |
152 00ec 9F91 pop r25 |
153 00ee 8F91 pop r24 |
154 00f0 4F91 pop r20 |
155 00f2 3F91 pop r19 |
156 00f4 2F91 pop r18 |
157 00f6 0F90 pop __tmp_reg__ |
158 00f8 0FBE out __SREG__,__tmp_reg__ |
159 00fa 0F90 pop __tmp_reg__ |
160 00fc 1F90 pop __zero_reg__ |
161 00fe 1895 reti |
162 /* epilogue end (size=10) */ |
163 /* function __vector_5 size 113 (93) */ |
164 .LFE11: |
166 .global StartIRModulation |
168 StartIRModulation: |
169 .LFB12: |
170 .LM16: |
171 /* prologue: frame size=0 */ |
172 /* prologue end (size=0) */ |
173 .LM17: |
174 0100 89E0 ldi r24,lo8(9) |
175 0102 85BD out 69-0x20,r24 |
176 .LM18: |
177 0104 8CE6 ldi r24,lo8(108) |
178 0106 83BD out 67-0x20,r24 |
179 .LM19: |
180 0108 85E0 ldi r24,lo8(5) |
181 010a 83BF out 83-0x20,r24 |
182 .LM20: |
183 010c 89B7 in r24,89-0x20 |
184 010e 8E7F andi r24,lo8(-2) |
185 0110 89BF out 89-0x20,r24 |
186 /* epilogue: frame size=0 */ |
187 0112 0895 ret |
188 /* epilogue end (size=1) */ |
189 /* function StartIRModulation size 10 (9) */ |
190 .LFE12: |
192 .global __vector_9 |
194 __vector_9: |
195 .LFB13: |
196 .LM21: |
197 /* prologue: frame size=0 */ |
198 0114 1F92 push __zero_reg__ |
199 0116 0F92 push __tmp_reg__ |
200 0118 0FB6 in __tmp_reg__,__SREG__ |
201 011a 0F92 push __tmp_reg__ |
202 011c 1124 clr __zero_reg__ |
203 011e 8F93 push r24 |
204 0120 9F93 push r25 |
205 /* prologue end (size=7) */ |
206 .LM22: |
207 0122 9091 0000 lds r25,IRstate |
208 0126 9230 cpi r25,lo8(2) |
209 0128 01F0 breq .L19 |
210 .LM23: |
211 012a 9330 cpi r25,lo8(3) |
212 012c 00F4 brsh .L22 |
213 012e 9130 cpi r25,lo8(1) |
214 0130 01F0 breq .+2 |
215 0132 00C0 rjmp .L17 |
216 0134 00C0 rjmp .L18 |
217 .L22: |
218 0136 9330 cpi r25,lo8(3) |
219 0138 01F0 breq .L20 |
220 013a 9430 cpi r25,lo8(4) |
221 013c 01F0 breq .+2 |
222 013e 00C0 rjmp .L17 |
223 0140 00C0 rjmp .L21 |
224 .L18: |
225 .LM24: |
226 0142 85B5 in r24,69-0x20 |
227 0144 8061 ori r24,lo8(16) |
228 0146 85BD out 69-0x20,r24 |
229 .LM25: |
230 0148 82E0 ldi r24,lo8(2) |
231 014a 8093 0000 sts IRstate,r24 |
232 .LM26: |
233 014e 1092 0000 sts IRbit,__zero_reg__ |
234 .LM27: |
235 0152 8AE9 ldi r24,lo8(-102) |
236 0154 00C0 rjmp .L32 |
237 .L19: |
238 .LM28: |
239 0156 85B5 in r24,69-0x20 |
240 0158 8F7E andi r24,lo8(-17) |
241 015a 85BD out 69-0x20,r24 |
242 .LM29: |
243 015c 83E0 ldi r24,lo8(3) |
244 015e 8093 0000 sts IRstate,r24 |
245 .LM30: |
246 0162 8091 0000 lds r24,IRdat |
247 0166 86FD sbrc r24,6 |
248 0168 00C0 rjmp .L24 |
249 016a 88EF ldi r24,lo8(-8) |
250 .L32: |
251 016c 82BF out 82-0x20,r24 |
252 016e 00C0 rjmp .L31 |
253 .L24: |
254 .LM31: |
255 0170 88EE ldi r24,lo8(-24) |
256 0172 00C0 rjmp .L32 |
257 .L20: |
258 .LM32: |
259 0174 85B5 in r24,69-0x20 |
260 0176 8061 ori r24,lo8(16) |
261 0178 85BD out 69-0x20,r24 |
262 .LM33: |
263 017a 88EF ldi r24,lo8(-8) |
264 017c 82BF out 82-0x20,r24 |
265 .LM34: |
266 017e 8091 0000 lds r24,IRdat |
267 0182 880F lsl r24 |
268 0184 8093 0000 sts IRdat,r24 |
269 .LM35: |
270 0188 8091 0000 lds r24,IRbit |
271 018c 8F5F subi r24,lo8(-(1)) |
272 018e 8093 0000 sts IRbit,r24 |
273 .LM36: |
274 0192 8091 0000 lds r24,IRbit |
275 0196 8730 cpi r24,lo8(7) |
276 0198 00F4 brsh .L26 |
277 019a 82E0 ldi r24,lo8(2) |
278 019c 8093 0000 sts IRstate,r24 |
279 01a0 00C0 rjmp .L31 |
280 .L26: |
281 .LM37: |
282 01a2 84E0 ldi r24,lo8(4) |
283 01a4 8093 0000 sts IRstate,r24 |
284 .LM38: |
285 01a8 1092 0000 sts IRbit,__zero_reg__ |
286 01ac 00C0 rjmp .L31 |
287 .L21: |
288 .LM39: |
289 01ae 85B5 in r24,69-0x20 |
290 01b0 8F7E andi r24,lo8(-17) |
291 01b2 85BD out 69-0x20,r24 |
292 .LM40: |
293 01b4 8CE3 ldi r24,lo8(60) |
294 01b6 82BF out 82-0x20,r24 |
295 .LM41: |
296 01b8 8091 0000 lds r24,IRbit |
297 01bc 8431 cpi r24,lo8(20) |
298 01be 00F4 brsh .L28 |
299 01c0 9093 0000 sts IRstate,r25 |
300 01c4 00C0 rjmp .L30 |
301 .L28: |
302 .LM42: |
303 01c6 85E0 ldi r24,lo8(5) |
304 01c8 8093 0000 sts IRstate,r24 |
305 .L30: |
306 .LM43: |
307 01cc 8091 0000 lds r24,IRbit |
308 01d0 8F5F subi r24,lo8(-(1)) |
309 01d2 8093 0000 sts IRbit,r24 |
310 01d6 00C0 rjmp .L31 |
311 .L17: |
312 .LM44: |
313 01d8 89B7 in r24,89-0x20 |
314 01da 8E7F andi r24,lo8(-2) |
315 01dc 89BF out 89-0x20,r24 |
316 .LM45: |
317 01de 1092 0000 sts IRstate,__zero_reg__ |
318 .L31: |
319 /* epilogue: frame size=0 */ |
320 01e2 9F91 pop r25 |
321 01e4 8F91 pop r24 |
322 01e6 0F90 pop __tmp_reg__ |
323 01e8 0FBE out __SREG__,__tmp_reg__ |
324 01ea 0F90 pop __tmp_reg__ |
325 01ec 1F90 pop __zero_reg__ |
326 01ee 1895 reti |
327 /* epilogue end (size=7) */ |
328 /* function __vector_9 size 110 (96) */ |
329 .LFE13: |
331 .global SendIRSignal |
333 SendIRSignal: |
334 .LFB14: |
335 .LM46: |
336 /* prologue: frame size=0 */ |
337 /* prologue end (size=0) */ |
338 .LVL0: |
339 01f0 982F mov r25,r24 |
340 .LVL1: |
341 .L35: |
342 .LM47: |
343 01f2 8091 0000 lds r24,IRstate |
344 01f6 8823 tst r24 |
345 01f8 01F4 brne .L35 |
346 .LM48: |
347 01fa 81E0 ldi r24,lo8(1) |
348 01fc 8093 0000 sts IRstate,r24 |
349 .LM49: |
350 0200 9093 0000 sts IRdat,r25 |
351 .LM50: |
352 0204 88B7 in r24,88-0x20 |
353 0206 18BE out 88-0x20,__zero_reg__ |
354 .LM51: |
355 0208 89B7 in r24,89-0x20 |
356 020a 8160 ori r24,lo8(1) |
357 020c 89BF out 89-0x20,r24 |
358 /* epilogue: frame size=0 */ |
359 020e 0895 ret |
360 /* epilogue end (size=1) */ |
361 /* function SendIRSignal size 16 (15) */ |
362 .LFE14: |
364 .global StartPPM |
366 StartPPM: |
367 .LFB15: |
368 .LM52: |
369 /* prologue: frame size=0 */ |
370 /* prologue end (size=0) */ |
371 .LM53: |
372 0210 1FBC out 79-0x20,__zero_reg__ |
373 .LM54: |
374 0212 82EC ldi r24,lo8(-62) |
375 0214 8EBD out 78-0x20,r24 |
376 .LM55: |
377 0216 89B7 in r24,89-0x20 |
378 0218 8462 ori r24,lo8(36) |
379 021a 89BF out 89-0x20,r24 |
380 /* epilogue: frame size=0 */ |
381 021c 0895 ret |
382 /* epilogue end (size=1) */ |
383 /* function StartPPM size 7 (6) */ |
384 .LFE15: |
386 .global main |
388 main: |
389 .LFB16: |
390 .LM56: |
391 /* prologue: frame size=0 */ |
392 /* prologue end (size=0) */ |
393 .LM57: |
394 021e 88E0 ldi r24,lo8(8) |
395 0220 84BB out 52-0x20,r24 |
396 .LM58: |
397 0222 15BA out 53-0x20,__zero_reg__ |
398 .LM59: |
399 0224 80E8 ldi r24,lo8(-128) |
400 0226 81BB out 49-0x20,r24 |
401 .LM60: |
402 0228 12BA out 50-0x20,__zero_reg__ |
403 .LM61: |
404 022a 8EE0 ldi r24,lo8(14) |
405 022c 87BB out 55-0x20,r24 |
406 .LM62: |
407 022e 18BA out 56-0x20,__zero_reg__ |
408 .LM63: |
409 0230 00D0 rcall StartUART |
410 .LBB4: |
411 .LBB5: |
412 .LM64: |
413 0232 1FBC out 79-0x20,__zero_reg__ |
414 .LM65: |
415 0234 82EC ldi r24,lo8(-62) |
416 0236 8EBD out 78-0x20,r24 |
417 .LM66: |
418 0238 89B7 in r24,89-0x20 |
419 023a 8462 ori r24,lo8(36) |
420 023c 89BF out 89-0x20,r24 |
421 .LBE5: |
422 .LBE4: |
423 .LM67: |
424 023e 00D0 rcall StartIRModulation |
425 .LM68: |
426 /* #APP */ |
427 0240 7894 sei |
428 /* #NOAPP */ |
429 .L62: |
430 .LM69: |
431 0242 8091 0000 lds r24,ppm_new |
432 0246 9091 0000 lds r25,(ppm_new)+1 |
433 024a 0197 sbiw r24,1 |
434 024c 01F4 brne .L62 |
435 .LM70: |
436 024e 1092 0000 sts (ppm_new)+1,__zero_reg__ |
437 0252 1092 0000 sts ppm_new,__zero_reg__ |
438 .LM71: |
439 0256 8091 0000 lds r24,ppm_signal |
440 025a 9091 0000 lds r25,(ppm_signal)+1 |
441 025e 875D subi r24,lo8(1751) |
442 0260 9640 sbci r25,hi8(1751) |
443 0262 00F0 brlo .L45 |
444 .LM72: |
445 0264 81E4 ldi r24,lo8(65) |
446 0266 00D0 rcall SendIRSignal |
447 .LM73: |
448 0268 AB9A sbi 53-0x20,3 |
449 .L47: |
450 .LM74: |
451 026a 8091 0000 lds r24,ppm_signal |
452 026e 9091 0000 lds r25,(ppm_signal)+1 |
453 0272 8357 subi r24,lo8(1651) |
454 0274 9640 sbci r25,hi8(1651) |
455 0276 00F4 brsh .L47 |
456 .LM75: |
457 0278 AB98 cbi 53-0x20,3 |
458 .L45: |
459 .LM76: |
460 027a 8091 0000 lds r24,ppm_signal |
461 027e 9091 0000 lds r25,(ppm_signal)+1 |
462 0282 825E subi r24,lo8(1250) |
463 0284 9440 sbci r25,hi8(1250) |
464 0286 00F4 brsh .L62 |
465 .LM77: |
466 0288 979A sbi 50-0x20,7 |
467 .LM78: |
468 028a 80E4 ldi r24,lo8(64) |
469 028c 00D0 rcall SendIRSignal |
470 .L50: |
471 .LM79: |
472 028e 8091 0000 lds r24,ppm_signal |
473 0292 9091 0000 lds r25,(ppm_signal)+1 |
474 0296 8654 subi r24,lo8(1350) |
475 0298 9540 sbci r25,hi8(1350) |
476 029a 00F0 brlo .L50 |
477 .LM80: |
478 029c 9798 cbi 50-0x20,7 |
479 029e 00C0 rjmp .L62 |
480 /* epilogue: frame size=0 */ |
481 /* epilogue: noreturn */ |
482 /* epilogue end (size=0) */ |
483 /* function main size 71 (71) */ |
484 .LFE16: |
486 .global ppm_signal |
487 .global ppm_signal |
488 .section .bss |
491 ppm_signal: |
492 0000 0000 .skip 2,0 |
493 .global ppm_new |
494 .global ppm_new |
497 ppm_new: |
498 0002 0000 .skip 2,0 |
499 .global TMR1OvF |
500 .global TMR1OvF |
503 TMR1OvF: |
504 0004 00 .skip 1,0 |
505 .global IRstate |
506 .global IRstate |
509 IRstate: |
510 0005 00 .skip 1,0 |
511 .global IRdat |
512 .global IRdat |
515 IRdat: |
516 0006 00 .skip 1,0 |
517 .global IRbit |
518 .global IRbit |
521 IRbit: |
522 0007 00 .skip 1,0 |
523 .lcomm ppm.1753,2 |
524 .lcomm pos_ICR.1752,2 |
597 .Letext0: |
DEFINED SYMBOLS |
*ABS*:00000000 main.c |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:3 *ABS*:0000003f __SREG__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:4 *ABS*:0000003e __SP_H__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:5 *ABS*:0000003d __SP_L__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:6 *ABS*:00000000 __tmp_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:7 *ABS*:00000001 __zero_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:20 .text:00000000 __vector_8 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:503 .bss:00000004 TMR1OvF |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:48 .text:00000022 __vector_5 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:523 .bss:0000000a pos_ICR.1752 |
.bss:00000008 ppm.1753 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:491 .bss:00000000 ppm_signal |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:497 .bss:00000002 ppm_new |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:168 .text:00000100 StartIRModulation |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:194 .text:00000114 __vector_9 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:509 .bss:00000005 IRstate |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:521 .bss:00000007 IRbit |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:515 .bss:00000006 IRdat |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:333 .text:000001f0 SendIRSignal |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:366 .text:00000210 StartPPM |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cc3mEyhY.s:388 .text:0000021e main |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
StartUART |
/IR-TX-BL/tags/V0.01/makefile |
---|
0,0 → 1,387 |
#-------------------------------------------------------------------- |
# MCU name |
MCU = atmega8 |
#------------------------------------------------------------------- |
HAUPT_VERSION = 0 |
NEBEN_VERSION = 01 |
#------------------------------------------------------------------- |
# Output format. (can be srec, ihex, binary) |
FORMAT = ihex |
# Target file name (without extension). |
TARGET = IR-Tx_V$(HAUPT_VERSION)_$(NEBEN_VERSION) |
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization. |
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) |
OPT = s |
########################################################################################################## |
# List C source files here. (C dependencies are automatically generated.) |
SRC = main.c uart.c |
########################################################################################################## |
# If there is more than one source file, append them above, or modify and |
# uncomment the following: |
#SRC += foo.c bar.c |
# You can also wrap lines by appending a backslash to the end of the line: |
#SRC += baz.c \ |
#xyzzy.c |
# List Assembler source files here. |
# Make them always end in a capital .S. Files ending in a lowercase .s |
# will not be considered source files but generated files (assembler |
# output from the compiler), and will be deleted upon "make clean"! |
# Even though the DOS/Win* filesystem matches both .s and .S the same, |
# it will preserve the spelling of the filenames, and gcc itself does |
# care about how the name is spelled on its command-line. |
ASRC = |
# List any extra directories to look for include files here. |
# Each directory must be seperated by a space. |
EXTRAINCDIRS = |
# Optional compiler flags. |
# -g: generate debugging information (for GDB, or for COFF conversion) |
# -O*: optimization level |
# -f...: tuning, see gcc manual and avr-libc documentation |
# -Wall...: warning level |
# -Wa,...: tell GCC to pass this to the assembler. |
# -ahlms: create assembler listing |
CFLAGS = -g -O$(OPT) \ |
-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums \ |
-Wall -Wstrict-prototypes \ |
-Wa,-adhlns=$(<:.c=.lst) \ |
$(patsubst %,-I%,$(EXTRAINCDIRS)) |
# Set a "language standard" compiler flag. |
# Unremark just one line below to set the language standard to use. |
# gnu99 = C99 + GNU extensions. See GCC manual for more information. |
#CFLAGS += -std=c89 |
#CFLAGS += -std=gnu89 |
#CFLAGS += -std=c99 |
CFLAGS += -std=gnu99 |
CFLAGS += -DVERSION_HAUPTVERSION=$(HAUPT_VERSION) -DVERSION_NEBENVERSION=$(NEBEN_VERSION) |
ifeq ($(AVR_CTRL_PLATINE), 1) |
CFLAGS += -DAVR_CTRL_PLATINE=$(AVR_CTRL_PLATINE) |
endif |
# Optional assembler flags. |
# -Wa,...: tell GCC to pass this to the assembler. |
# -ahlms: create listing |
# -gstabs: have the assembler create line number information; note that |
# for use in COFF files, additional information about filenames |
# and function names needs to be present in the assembler source |
# files -- see avr-libc docs [FIXME: not yet described there] |
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs |
# Optional linker flags. |
# -Wl,...: tell GCC to pass this to linker. |
# -Map: create map file |
# --cref: add cross reference to map file |
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref |
# Additional libraries |
# Minimalistic printf version |
#LDFLAGS += -Wl,-u,vfprintf -lprintf_min |
# Floating point printf version (requires -lm below) |
#LDFLAGS += -Wl,-u,vfprintf -lprintf_flt |
# -lm = math library |
LDFLAGS += -lm |
# Programming support using avrdude. Settings and variables. |
# Programming hardware: alf avr910 avrisp bascom bsd |
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500 |
# |
# Type: avrdude -c ? |
# to get a full listing. |
# |
AVRDUDE_PROGRAMMER = ponyser |
#AVRDUDE_PROGRAMMER = stk200 |
#AVRDUDE_PORT = com1 # programmer connected to serial device |
AVRDUDE_PORT = com1 |
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex |
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep |
AVRDUDE_FLAGS = -F -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) |
# Uncomment the following if you want avrdude's erase cycle counter. |
# Note that this counter needs to be initialized first using -Yn, |
# see avrdude manual. |
#AVRDUDE_ERASE += -y |
# Uncomment the following if you do /not/ wish a verification to be |
# performed after programming the device. |
#AVRDUDE_FLAGS += -V -E noreset |
# Increase verbosity level. Please use this when submitting bug |
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> |
# to submit bug reports. |
#AVRDUDE_FLAGS += -v -v |
# --------------------------------------------------------------------------- |
# Define directories, if needed. |
DIRAVR = c:/winavr |
DIRAVRBIN = $(DIRAVR)/bin |
DIRAVRUTILS = $(DIRAVR)/utils/bin |
DIRINC = . |
DIRLIB = $(DIRAVR)/avr/lib |
# Define programs and commands. |
SHELL = sh |
CC = avr-gcc |
OBJCOPY = avr-objcopy |
OBJDUMP = avr-objdump |
SIZE = avr-size |
# Programming support using avrdude. |
AVRDUDE = avrdude |
REMOVE = rm -f |
COPY = cp |
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex |
ELFSIZE = $(SIZE) -A $(TARGET).elf |
# Define Messages |
# English |
MSG_ERRORS_NONE = Errors: none |
MSG_BEGIN = -------- begin -------- |
MSG_END = -------- end -------- |
MSG_SIZE_BEFORE = Size before: |
MSG_SIZE_AFTER = Size after: |
MSG_COFF = Converting to AVR COFF: |
MSG_EXTENDED_COFF = Converting to AVR Extended COFF: |
MSG_FLASH = Creating load file for Flash: |
MSG_EEPROM = Creating load file for EEPROM: |
MSG_EXTENDED_LISTING = Creating Extended Listing: |
MSG_SYMBOL_TABLE = Creating Symbol Table: |
MSG_LINKING = Linking: |
MSG_COMPILING = Compiling: |
MSG_ASSEMBLING = Assembling: |
MSG_CLEANING = Cleaning project: |
# Define all object files. |
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o) |
# Define all listing files. |
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst) |
# Combine all necessary flags and optional flags. |
# Add target processor to flags. |
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) |
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) |
# Default target. |
all: begin gccversion sizebefore $(TARGET).elf $(TARGET).hex $(TARGET).eep \ |
$(TARGET).lss $(TARGET).sym sizeafter finished end |
# Eye candy. |
# AVR Studio 3.x does not check make's exit code but relies on |
# the following magic strings to be generated by the compile job. |
begin: |
@echo |
@echo $(MSG_BEGIN) |
finished: |
@echo $(MSG_ERRORS_NONE) |
end: |
@echo $(MSG_END) |
@echo |
# Display size of file. |
sizebefore: |
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi |
sizeafter: |
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi |
# Display compiler version information. |
gccversion : |
@$(CC) --version |
# Convert ELF to COFF for use in debugging / simulating in |
# AVR Studio or VMLAB. |
COFFCONVERT=$(OBJCOPY) --debugging \ |
--change-section-address .data-0x800000 \ |
--change-section-address .bss-0x800000 \ |
--change-section-address .noinit-0x800000 \ |
--change-section-address .eeprom-0x810000 |
coff: $(TARGET).elf |
@echo |
@echo $(MSG_COFF) $(TARGET).cof |
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof |
extcoff: $(TARGET).elf |
@echo |
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof |
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof |
# Program the device. |
program: $(TARGET).hex $(TARGET).eep |
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) |
# Create final output files (.hex, .eep) from ELF output file. |
%.hex: %.elf |
@echo |
@echo $(MSG_FLASH) $@ |
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ |
%.eep: %.elf |
@echo |
@echo $(MSG_EEPROM) $@ |
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ |
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@ |
# Create extended listing file from ELF output file. |
%.lss: %.elf |
@echo |
@echo $(MSG_EXTENDED_LISTING) $@ |
$(OBJDUMP) -h -S $< > $@ |
# Create a symbol table from ELF output file. |
%.sym: %.elf |
@echo |
@echo $(MSG_SYMBOL_TABLE) $@ |
avr-nm -n $< > $@ |
# Link: create ELF output file from object files. |
.SECONDARY : $(TARGET).elf |
.PRECIOUS : $(OBJ) |
%.elf: $(OBJ) |
@echo |
@echo $(MSG_LINKING) $@ |
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS) |
# Compile: create object files from C source files. |
%.o : %.c |
@echo |
@echo $(MSG_COMPILING) $< |
$(CC) -c $(ALL_CFLAGS) $< -o $@ |
# Compile: create assembler files from C source files. |
%.s : %.c |
$(CC) -S $(ALL_CFLAGS) $< -o $@ |
# Assemble: create object files from assembler source files. |
%.o : %.S |
@echo |
@echo $(MSG_ASSEMBLING) $< |
$(CC) -c $(ALL_ASFLAGS) $< -o $@ |
# Target: clean project. |
clean: begin clean_list finished end |
clean_list : |
@echo |
@echo $(MSG_CLEANING) |
# $(REMOVE) $(TARGET).hex |
# $(REMOVE) $(TARGET).eep |
# $(REMOVE) $(TARGET).obj |
$(REMOVE) $(TARGET).cof |
$(REMOVE) $(TARGET).elf |
$(REMOVE) $(TARGET).map |
$(REMOVE) $(TARGET).obj |
$(REMOVE) $(TARGET).a90 |
$(REMOVE) $(TARGET).sym |
$(REMOVE) $(TARGET).lnk |
$(REMOVE) $(TARGET).lss |
$(REMOVE) $(OBJ) |
$(REMOVE) $(LST) |
$(REMOVE) $(SRC:.c=.s) |
$(REMOVE) $(SRC:.c=.d) |
# Automatically generate C source code dependencies. |
# (Code originally taken from the GNU make user manual and modified |
# (See README.txt Credits).) |
# |
# Note that this will work with sh (bash) and sed that is shipped with WinAVR |
# (see the SHELL variable defined above). |
# This may not work with other shells or other seds. |
# |
%.d: %.c |
set -e; $(CC) -MM $(ALL_CFLAGS) $< \ |
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > $@; \ |
[ -s $@ ] || rm -f $@ |
# Remove the '-' if you want to see the dependency files generated. |
-include $(SRC:.c=.d) |
# Listing of phony targets. |
.PHONY : all begin finish end sizebefore sizeafter gccversion coff extcoff \ |
clean clean_list program |
/IR-TX-BL/tags/V0.01/uart.c |
---|
0,0 → 1,38 |
//############################################################################ |
// - PPM2PentaxIR Uart for Debug only |
// - ATMEGA8 mit 8MHz |
// - Nur für den privaten Gebrauch |
// - Keine Garantie auf Fehlerfreiheit |
// - Kommerzielle Nutzung nur mit meiner Zustimmung |
// - walter Meyer @ www.freakware.de |
//############################################################################*/ |
#include "main.h" |
#include "uart.h" |
void StartUART(void) |
{ |
// UART Double Speed (U2X) |
UCSRA |= (1<<U2X); |
/* Enable receiver and transmitter, no RX Int, no TX Int */ |
UCSRB = (1<<RXEN)|(1<<TXEN); // (1<<RXCIE)|(1<<TXCIE) |
/* Set frame format: 8data, 1stop bit */ |
UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); |
//Teiler wird gesetzt |
UBRRL= (SYSCLK / (BAUD_RATE * 8L) -1 ); |
//öffnet einen Kanal für printf (STDOUT) |
fdevopen (uart_putchar, NULL); |
} |
int uart_putchar (char c) |
{ |
if (c == '\n') uart_putchar('\r'); |
loop_until_bit_is_set(UCSRA, UDRE); |
UDR = c; |
return (0); |
} |
/IR-TX-BL/tags/V0.01/uart.d |
---|
0,0 → 1,0 |
uart.o uart.d : uart.c main.h uart.h |
/IR-TX-BL/tags/V0.01/uart.h |
---|
0,0 → 1,11 |
#ifndef _UART_H |
#define _UART_H |
extern void StartUART (void); |
extern int uart_putchar (char c); |
#define BAUD_RATE 38400 //Baud Rate für die Serielle Schnittstelle |
#endif //_UART_H |
/IR-TX-BL/tags/V0.01/uart.lst |
---|
0,0 → 1,85 |
1 .file "uart.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
17 .Ltext0: |
18 .global uart_putchar |
20 uart_putchar: |
21 .LFB11: |
22 .LM1: |
23 /* prologue: frame size=0 */ |
24 0000 1F93 push r17 |
25 /* prologue end (size=1) */ |
26 .LVL0: |
27 0002 182F mov r17,r24 |
28 .LM2: |
29 0004 8A30 cpi r24,lo8(10) |
30 0006 01F4 brne .L6 |
31 .LM3: |
32 0008 8DE0 ldi r24,lo8(13) |
33 .LVL1: |
34 000a 00D0 rcall uart_putchar |
35 .LVL2: |
36 .L6: |
37 .LM4: |
38 000c 5D9B sbis 43-0x20,5 |
39 000e 00C0 rjmp .L6 |
40 .LM5: |
41 0010 1CB9 out 44-0x20,r17 |
42 .LM6: |
43 0012 80E0 ldi r24,lo8(0) |
44 0014 90E0 ldi r25,hi8(0) |
45 /* epilogue: frame size=0 */ |
46 0016 1F91 pop r17 |
47 0018 0895 ret |
48 /* epilogue end (size=2) */ |
49 /* function uart_putchar size 13 (10) */ |
50 .LFE11: |
52 .global StartUART |
54 StartUART: |
55 .LFB10: |
56 .LM7: |
57 /* prologue: frame size=0 */ |
58 /* prologue end (size=0) */ |
59 .LM8: |
60 001a 599A sbi 43-0x20,1 |
61 .LM9: |
62 001c 88E1 ldi r24,lo8(24) |
63 001e 8AB9 out 42-0x20,r24 |
64 .LM10: |
65 0020 86E8 ldi r24,lo8(-122) |
66 0022 80BD out 64-0x20,r24 |
67 .LM11: |
68 0024 89E1 ldi r24,lo8(25) |
69 0026 89B9 out 41-0x20,r24 |
70 .LM12: |
71 0028 60E0 ldi r22,lo8(0) |
72 002a 70E0 ldi r23,hi8(0) |
73 002c 80E0 ldi r24,lo8(gs(uart_putchar)) |
74 002e 90E0 ldi r25,hi8(gs(uart_putchar)) |
75 0030 00D0 rcall fdevopen |
76 /* epilogue: frame size=0 */ |
77 0032 0895 ret |
78 /* epilogue end (size=1) */ |
79 /* function StartUART size 13 (12) */ |
80 .LFE10: |
114 .Letext0: |
DEFINED SYMBOLS |
*ABS*:00000000 uart.c |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cceC28eM.s:3 *ABS*:0000003f __SREG__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cceC28eM.s:4 *ABS*:0000003e __SP_H__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cceC28eM.s:5 *ABS*:0000003d __SP_L__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cceC28eM.s:6 *ABS*:00000000 __tmp_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cceC28eM.s:7 *ABS*:00000001 __zero_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cceC28eM.s:20 .text:00000000 uart_putchar |
C:\DOKUME~1\Walter\LOKALE~1\Temp/cceC28eM.s:54 .text:0000001a StartUART |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
fdevopen |
/IR-TX-BL/tags/V0.02/Doku/IR-Ctrl_Schaltplan.GIF |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/IR-TX-BL/tags/V0.02/Doku/README.TXT |
---|
0,0 → 1,77 |
Readme zur "PPM2PentaxIR" (geändert 2.12.2007) |
Auslösen und Zoomen von Pentax Fotokameres per IR, gesteuert durch Servoausgang (PPM) |
Hardwarebasis für die Entwicklung ist eine unbestückte Holger BL-CTRL V1.0 Platinen. |
Auf dieser Platinen wurden lediglich folgende Bauteile bestückt. |
(Bauteilwerte wie bei original BL Bestückung beibehalten) |
IC1 ATMEGA8 - A |
R3 100 |
R10 18K |
R26 4K7 |
R27 1K |
R33 1K |
R32 10 |
C3 100n |
C7 100n |
C11 100n |
C12 10uF/16V |
LED1 LED0805 Grün |
LED2 LED0805 Rot |
Es läst sich natürlich LED1 und LED2 sowie die zugehörigen Vorwiderstände (R27 und R33) einsparen falls man diese eh nicht verwenden möchte, |
zumal Sie eher für Debugzwecke eingesetzt wurden. |
Das PPM Signal (vom Servoausgang) muss an das PPM Pad der BL Platine (Pin12 ATMEGA) |
Masse kann praktisch an einen beliebigen Massepunkt an der BL Platinen. Die Versorgungsspannung geht bei mir einfach direkt an das Ausgangspad |
des nicht vorhanden Spannungsreglers (IC2) bzw. an den Anschlusspunkt welcher auf der BL Paltine mit 5V versehen ist. |
Da kein Spannungsregler verwendet wird ist strickt darauf zu achten, das keine zu hohen Spannungen für die Versorgung verwendet werden, |
die üblichen 4,5 bis 5,x Volt eines Empfänger Ausgangs kann der Amtel gut ab. Besser wäre es natürlich einen Spannungsregler zu verwenden, |
dann aber statt des 5V Reglers einen 3.3 Volt Typ. Hier sollte dann jedoch der RC Oscilator des Atmegas geprüft werden, da zu erwarten ist |
das die Frequenz nicht mehr besonders gut stimmt (tut sie 5V wohl auch nicht) |
Die IR Diode (ich habe fast beliebige Typen ausprobiert welche ich im Bestand hatte) wird an Masse und an das Basispad des nicht bestückten T1 angeschlossen. |
Hierbei dient R3 nun als Vorwiderstand für die LED, deshalb ist R3 auch der einzige Widerstand welcher gegenüber der original BL Bestückung vom Wert her |
geändert ist. |
Wichtig: |
Beim Programieren des ATMegas muß auf die richtigen Fusesettings geachtet werden, der Controller muß mit internem 8Mhz Osc laufen. |
Ich habe zum setzen der Fusebits PonyPorg verwendet. |
Das Programieren des Controller läuft bei mir mit AVRdude unter "Programmers Notepad" aus der WinAVR Installation. |
Wird das mitgelieferte "makefile" verwendet so ist dort als Programmer "PonySer auf Com1" ausgewähl, so das man mit einem Sercon Interface direkt |
aus WinAvr das Programm auf den ATMega progen kann. (geht nur per echter Seriel Schnittstelle, kein USB zu RS232 Wandler) |
Die Bedienung ist derzeit relativ einfach. Bei Mittelstellung des Kanals (Knüppel Mittel) passiert nichts, wird der Kanal nun in die eine Richtung |
gesteuert so wird eine neue Zoomstufe eingestellt (drei Zoomstuffen gibt es bei der Pentax per IR Steuerung), wird der Kanal in |
die andere Richtung gesteuert, so wird ein Bild ausgelöst. |
Schaltpunkte sind derzeit fix bei ca. nach oben 1750us und 1250us nach unten jeweils mit einer Hysterese von 100us. |
Eine normale Graupneranlage gibt üblicherweise bei Kanal Mittelstellung etwas 1500us aus, mit einem Hub in beide Richtungen von ca. 600us |
(bei 100% Servoweg), also 1100us bis 1900us. Somit liegen die Schaltpunkte etwa auf halbem Weg. |
Anzumerken ist jedoch, das der Interne RC Oscilator des ATMEGA8 ohne spezielle Kalibrierung nicht besonders genau ist und somit doch ganz |
schöne Abweichungen auftretten können. Hiermit verschieben sich dann natürlich auch die Schaltpunkte nach oben oder unten. |
Es befindet sich sicher noch die ein oder andere Stelle im Code welche man besser machen oder eleganter lösen könnte. |
Das ganze ist mein erstes Atmel AVR Project und dann auch noch in C , ich bin eigentlich ein eingefleischter |
PIC Assembler Fritze :-) also verzeiht mir den Programmierstiel zumal das ganze innerhalb eines Tages fertig wurde. |
Wenn jemand gerne andere IR Codes ausgeben lassen möchte und genau weis wie diese ausehen, bzw. ich dies rausfinden kann so bin ich auch gerne |
bereits das zu implementieren. |
Viel Spaß beim nachbauen und verbessern. |
Walter Meyer |
30.11.2007 |
freakware GmbH division south |
/IR-TX-BL/tags/V0.02/IR-Tx.pnproj |
---|
0,0 → 1,0 |
<Project name="IR-Tx"><File path="main.c"></File><File path="main.h"></File><File path="uart.h"></File><File path="uart.c"></File></Project> |
/IR-TX-BL/tags/V0.02/IR-Tx.pnps |
---|
0,0 → 1,0 |
<pd><ViewState><e p="IR-Tx" x="true"></e></ViewState></pd> |
/IR-TX-BL/tags/V0.02/IR-Tx.pnws |
---|
0,0 → 1,0 |
<Workspace><File path="c:\mikrokopter\ir-tx_\tags\v0.02\main.c"></File><Project path="c:\mikrokopter\ir-tx_\tags\v0.02\ir-tx.pnproj"></Project></Workspace> |
/IR-TX-BL/tags/V0.02/IR-Tx_V0_02.elf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/IR-TX-BL/tags/V0.02/IR-Tx_V0_02.hex |
---|
0,0 → 1,105 |
:1000000012C02CC02BC02AC029C03AC027C026C0AD |
:1000100026C0ACC023C022C021C020C01FC01EC04B |
:100020001DC01CC01BC011241FBECFE5D4E0DEBF25 |
:10003000CDBF10E0A0E6B0E0E4E6F6E002C0059037 |
:100040000D92A636B107D9F710E0A6E6B0E001C0E0 |
:100050001D92AB37B107E1F718D103C3D1CF1F927F |
:100060000F920FB60F9211248F93809169008F5FCA |
:10007000809369008F910F900FBE0F901F9018957D |
:100080001F920F920FB60F9211242F933F934F930D |
:100090008F939F930EB406FE0CC08EB58F7B8EBDE2 |
:1000A0001092690086B597B59093700080936F00A9 |
:1000B00049C08EB580648EBD26B537B58091690084 |
:1000C00080916F0090917000281B390B30936E0067 |
:1000D00020936D00C901895592408750974090F553 |
:1000E00088E02533380718F084E398E005C02458E9 |
:1000F000334030F484E893E090936E0080936D0079 |
:100100002091660030916700C90143E0880F991F74 |
:100110004A95E1F7821B930B20916D0030916E00A0 |
:10012000820F931F23E0969587952A95E1F7909388 |
:100130006E0080936D00909367008093660081E06D |
:10014000809368009F918F914F913F912F910F90D5 |
:100150000FBE0F901F90189589E085BD8CE683BD7A |
:1001600085E083BF89B78E7F89BF08951F920F9264 |
:100170000FB60F9211248F939F9390916A00923043 |
:10018000B1F0933020F4913009F052C006C09330A2 |
:10019000E9F0943009F04CC036C085B5806185BD6A |
:1001A00082E080936A0010926C008AE90BC085B5EA |
:1001B0008F7E85BD83E080936A0080916B0086FD11 |
:1001C00003C088EF82BF39C088EEFCCF85B580615F |
:1001D00085BD88EF82BF80916B00880F80936B0094 |
:1001E00080916C008F5F80936C0080916C008730F1 |
:1001F00020F482E080936A0020C084E080936A004B |
:1002000010926C001AC085B58F7E85BD8CE382BFCD |
:1002100080916C00843118F490936A0003C085E0EB |
:1002200080936A0080916C008F5F80936C0005C0A2 |
:1002300089B78E7F89BF10926A009F918F910F902E |
:100240000FBE0F901F901895982F80916A008823F9 |
:10025000E1F781E080936A0090936B0088B718BE45 |
:1002600089B7816089BF08951FBC82EC8EBD89B7B4 |
:10027000846289BF089529B789B78F7D89BF80912E |
:1002800066009091670029BF089588E084BB15BA85 |
:1002900080E881BB12BA8EE087BB18BA54D01FBC6D |
:1002A00082EC8EBD89B7846289BF56DF78948091D5 |
:1002B00068008130E1F71092680089B799B79F7D97 |
:1002C00099BF209166003091670089BF275D364055 |
:1002D00084F081E4B9DFAB9A89B799B79F7D99BF64 |
:1002E000209166003091670089BF23573640A4F7FC |
:1002F000AB9889B799B79F7D99BF209166003091DF |
:10030000670089BF225E344094F6979A80E49CDFB0 |
:1003100089B799B79F7D99BF20916600309167009A |
:1003200089BF26543540A4F39798C1CF1F93182F47 |
:100330008A3011F48DE0FADF5D9BFECF1CB980E0BE |
:1003400090E01F910895599A88E18AB986E880BDA6 |
:1003500089E189B960E070E086E991E001D0089513 |
:10036000EF92FF920F931F93CF93DF938C017B014A |
:10037000892B11F4672BC9F16EE070E081E090E009 |
:100380003BD0FC01009789F1DC0180E88383E11414 |
:10039000F10471F0F386E28681E883838091710035 |
:1003A00090917200892B21F4F0937200E093710018 |
:1003B00001151105E1F01187008783818260838335 |
:1003C0008091730090917400892B89F4F0937400EC |
:1003D000E09373008091750090917600892B39F439 |
:1003E000F0937600E093750002C0A0E0B0E0CD018C |
:1003F000E6E0CDB7DEB726C10F931F93CF93DF930F |
:10040000869F8001879F100D969F100D1124C801B3 |
:100410000DD0EC01009721F0A80160E070E0FFD062 |
:10042000CE01DF91CF911F910F910895CF93DF936C |
:10043000AC01029710F442E050E0A0917900B09135 |
:100440007A00FD01C0E0D0E020E030E020C08081F3 |
:1004500091818417950769F482819381209719F01F |
:100460009B838A8304C090937A0080937900CF01A4 |
:1004700032C04817590738F42115310519F0821791 |
:10048000930708F49C01EF010280F381E02D30977F |
:10049000F1F62115310589F1C901841B950B0497EB |
:1004A00008F4A901E0E0F0E026C08D919C9111973D |
:1004B00082179307E9F44817590779F4ED018A8107 |
:1004C0009B81309719F09383828304C090937A00C4 |
:1004D00080937900CD01029649C0841B950BFD01E4 |
:1004E000E80FF91F4193519302978D939C933AC063 |
:1004F000FD01A281B3811097C1F6809177009091A0 |
:100500007800892B41F48091620090916300909370 |
:100510007800809377002091640030916500211568 |
:10052000310541F42DB73EB7809160009091610094 |
:10053000281B390BE0917700F09178002E1B3F0BC0 |
:100540002417350788F0CA0102962817390760F08A |
:10055000CF01840F951F02969093780080937700C7 |
:1005600041935193CF0102C080E090E0DF91CF91A1 |
:100570000895CF93DF93009709F44EC0EC012297C2 |
:100580001B821A82A0917900B0917A00109711F124 |
:1005900040E050E001C0DC01AC17BD0700F1BB83B7 |
:1005A000AA83FE0121913191E20FF31FEA17FB07A5 |
:1005B00071F42E5F3F4F8D919C911197820F931F85 |
:1005C00099838883FD01828193819B838A8341156E |
:1005D000510559F4D0937A00C09379001DC0FD01F4 |
:1005E00082819381AD010097B1F6FA01D383C28372 |
:1005F00021913191E20FF31FEC17FD0769F42E5F93 |
:100600003F4F88819981820F931FFA0191838083E4 |
:100610008A819B8193838283DF91CF910895DC014E |
:1006200001C06D9341505040E0F708952A88398801 |
:1006300048885F846E847D848C849B84AA84B9847A |
:10064000C884DF80EE80FD800C811B81AA81B98186 |
:10065000CE0FD11D0FB6F894DEBF0FBECDBFED019A |
:040660000895FFCF2B |
:0606640020007B000000F5 |
:00000001FF |
/IR-TX-BL/tags/V0.02/IR-Tx_V0_02.lss |
---|
0,0 → 1,1016 |
IR-Tx_V0_02.elf: file format elf32-avr |
Sections: |
Idx Name Size VMA LMA File off Algn |
0 .text 00000664 00000000 00000000 00000094 2**1 |
CONTENTS, ALLOC, LOAD, READONLY, CODE |
1 .data 00000006 00800060 00000664 000006f8 2**0 |
CONTENTS, ALLOC, LOAD, DATA |
2 .bss 00000015 00800066 00800066 000006fe 2**0 |
ALLOC |
3 .stab 00000378 00000000 00000000 00000700 2**2 |
CONTENTS, READONLY, DEBUGGING |
4 .stabstr 00000071 00000000 00000000 00000a78 2**0 |
CONTENTS, READONLY, DEBUGGING |
5 .debug_aranges 00000040 00000000 00000000 00000ae9 2**0 |
CONTENTS, READONLY, DEBUGGING |
6 .debug_pubnames 000000ff 00000000 00000000 00000b29 2**0 |
CONTENTS, READONLY, DEBUGGING |
7 .debug_info 0000036d 00000000 00000000 00000c28 2**0 |
CONTENTS, READONLY, DEBUGGING |
8 .debug_abbrev 000001b4 00000000 00000000 00000f95 2**0 |
CONTENTS, READONLY, DEBUGGING |
9 .debug_line 0000059c 00000000 00000000 00001149 2**0 |
CONTENTS, READONLY, DEBUGGING |
10 .debug_frame 000000c0 00000000 00000000 000016e8 2**2 |
CONTENTS, READONLY, DEBUGGING |
11 .debug_str 0000013a 00000000 00000000 000017a8 2**0 |
CONTENTS, READONLY, DEBUGGING |
12 .debug_loc 00000130 00000000 00000000 000018e2 2**0 |
CONTENTS, READONLY, DEBUGGING |
Disassembly of section .text: |
00000000 <__vectors>: |
0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end> |
2: 2c c0 rjmp .+88 ; 0x5c <__bad_interrupt> |
4: 2b c0 rjmp .+86 ; 0x5c <__bad_interrupt> |
6: 2a c0 rjmp .+84 ; 0x5c <__bad_interrupt> |
8: 29 c0 rjmp .+82 ; 0x5c <__bad_interrupt> |
a: 3a c0 rjmp .+116 ; 0x80 <__vector_5> |
c: 27 c0 rjmp .+78 ; 0x5c <__bad_interrupt> |
e: 26 c0 rjmp .+76 ; 0x5c <__bad_interrupt> |
10: 26 c0 rjmp .+76 ; 0x5e <__vector_8> |
12: ac c0 rjmp .+344 ; 0x16c <__vector_9> |
14: 23 c0 rjmp .+70 ; 0x5c <__bad_interrupt> |
16: 22 c0 rjmp .+68 ; 0x5c <__bad_interrupt> |
18: 21 c0 rjmp .+66 ; 0x5c <__bad_interrupt> |
1a: 20 c0 rjmp .+64 ; 0x5c <__bad_interrupt> |
1c: 1f c0 rjmp .+62 ; 0x5c <__bad_interrupt> |
1e: 1e c0 rjmp .+60 ; 0x5c <__bad_interrupt> |
20: 1d c0 rjmp .+58 ; 0x5c <__bad_interrupt> |
22: 1c c0 rjmp .+56 ; 0x5c <__bad_interrupt> |
24: 1b c0 rjmp .+54 ; 0x5c <__bad_interrupt> |
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 e6 ldi r30, 0x64 ; 100 |
3a: f6 e0 ldi r31, 0x06 ; 6 |
3c: 02 c0 rjmp .+4 ; 0x42 <.do_copy_data_start> |
0000003e <.do_copy_data_loop>: |
3e: 05 90 lpm r0, Z+ |
40: 0d 92 st X+, r0 |
00000042 <.do_copy_data_start>: |
42: a6 36 cpi r26, 0x66 ; 102 |
44: b1 07 cpc r27, r17 |
46: d9 f7 brne .-10 ; 0x3e <.do_copy_data_loop> |
00000048 <__do_clear_bss>: |
48: 10 e0 ldi r17, 0x00 ; 0 |
4a: a6 e6 ldi r26, 0x66 ; 102 |
4c: b0 e0 ldi r27, 0x00 ; 0 |
4e: 01 c0 rjmp .+2 ; 0x52 <.do_clear_bss_start> |
00000050 <.do_clear_bss_loop>: |
50: 1d 92 st X+, r1 |
00000052 <.do_clear_bss_start>: |
52: ab 37 cpi r26, 0x7B ; 123 |
54: b1 07 cpc r27, r17 |
56: e1 f7 brne .-8 ; 0x50 <.do_clear_bss_loop> |
58: 18 d1 rcall .+560 ; 0x28a <main> |
5a: 03 c3 rjmp .+1542 ; 0x662 <_exit> |
0000005c <__bad_interrupt>: |
5c: d1 cf rjmp .-94 ; 0x0 <__vectors> |
0000005e <__vector_8>: |
volatile unsigned char IRbit = 0; |
SIGNAL(SIG_OVERFLOW1) |
{ |
5e: 1f 92 push r1 |
60: 0f 92 push r0 |
62: 0f b6 in r0, 0x3f ; 63 |
64: 0f 92 push r0 |
66: 11 24 eor r1, r1 |
68: 8f 93 push r24 |
TMR1OvF++; |
6a: 80 91 69 00 lds r24, 0x0069 |
6e: 8f 5f subi r24, 0xFF ; 255 |
70: 80 93 69 00 sts 0x0069, r24 |
74: 8f 91 pop r24 |
76: 0f 90 pop r0 |
78: 0f be out 0x3f, r0 ; 63 |
7a: 0f 90 pop r0 |
7c: 1f 90 pop r1 |
7e: 18 95 reti |
00000080 <__vector_5>: |
} |
SIGNAL(SIG_INPUT_CAPTURE1) |
{ |
80: 1f 92 push r1 |
82: 0f 92 push r0 |
84: 0f b6 in r0, 0x3f ; 63 |
86: 0f 92 push r0 |
88: 11 24 eor r1, r1 |
8a: 2f 93 push r18 |
8c: 3f 93 push r19 |
8e: 4f 93 push r20 |
90: 8f 93 push r24 |
92: 9f 93 push r25 |
static unsigned int pos_ICR; |
static unsigned int ppm; |
if ((TCCR1B & (1<<ICES1)) != 0) |
94: 0e b4 in r0, 0x2e ; 46 |
96: 06 fe sbrs r0, 6 |
98: 0c c0 rjmp .+24 ; 0xb2 <__vector_5+0x32> |
{ |
TCCR1B &= ~(1<<ICES1); //invert trigger |
9a: 8e b5 in r24, 0x2e ; 46 |
9c: 8f 7b andi r24, 0xBF ; 191 |
9e: 8e bd out 0x2e, r24 ; 46 |
TMR1OvF = 0; |
a0: 10 92 69 00 sts 0x0069, r1 |
pos_ICR = ICR1; |
a4: 86 b5 in r24, 0x26 ; 38 |
a6: 97 b5 in r25, 0x27 ; 39 |
a8: 90 93 70 00 sts 0x0070, r25 |
ac: 80 93 6f 00 sts 0x006F, r24 |
b0: 49 c0 rjmp .+146 ; 0x144 <__vector_5+0xc4> |
} |
else //Negative Flanke |
{ |
TCCR1B |= (1<<ICES1); |
b2: 8e b5 in r24, 0x2e ; 46 |
b4: 80 64 ori r24, 0x40 ; 64 |
b6: 8e bd out 0x2e, r24 ; 46 |
ppm = (ICR1 - pos_ICR + (int) TMR1OvF * 65536); |
b8: 26 b5 in r18, 0x26 ; 38 |
ba: 37 b5 in r19, 0x27 ; 39 |
bc: 80 91 69 00 lds r24, 0x0069 |
c0: 80 91 6f 00 lds r24, 0x006F |
c4: 90 91 70 00 lds r25, 0x0070 |
c8: 28 1b sub r18, r24 |
ca: 39 0b sbc r19, r25 |
cc: 30 93 6e 00 sts 0x006E, r19 |
d0: 20 93 6d 00 sts 0x006D, r18 |
if ((ppm > 600) && (ppm < 2400)) |
d4: c9 01 movw r24, r18 |
d6: 89 55 subi r24, 0x59 ; 89 |
d8: 92 40 sbci r25, 0x02 ; 2 |
da: 87 50 subi r24, 0x07 ; 7 |
dc: 97 40 sbci r25, 0x07 ; 7 |
de: 90 f5 brcc .+100 ; 0x144 <__vector_5+0xc4> |
{ |
if (ppm > 2100) ppm = 2100; |
e0: 88 e0 ldi r24, 0x08 ; 8 |
e2: 25 33 cpi r18, 0x35 ; 53 |
e4: 38 07 cpc r19, r24 |
e6: 18 f0 brcs .+6 ; 0xee <__vector_5+0x6e> |
e8: 84 e3 ldi r24, 0x34 ; 52 |
ea: 98 e0 ldi r25, 0x08 ; 8 |
ec: 05 c0 rjmp .+10 ; 0xf8 <__vector_5+0x78> |
if (ppm < 900) ppm = 900; |
ee: 24 58 subi r18, 0x84 ; 132 |
f0: 33 40 sbci r19, 0x03 ; 3 |
f2: 30 f4 brcc .+12 ; 0x100 <__vector_5+0x80> |
f4: 84 e8 ldi r24, 0x84 ; 132 |
f6: 93 e0 ldi r25, 0x03 ; 3 |
f8: 90 93 6e 00 sts 0x006E, r25 |
fc: 80 93 6d 00 sts 0x006D, r24 |
ppm = (ppm_signal * 7 + ppm) / 8; |
100: 20 91 66 00 lds r18, 0x0066 |
104: 30 91 67 00 lds r19, 0x0067 |
108: c9 01 movw r24, r18 |
10a: 43 e0 ldi r20, 0x03 ; 3 |
10c: 88 0f add r24, r24 |
10e: 99 1f adc r25, r25 |
110: 4a 95 dec r20 |
112: e1 f7 brne .-8 ; 0x10c <__vector_5+0x8c> |
114: 82 1b sub r24, r18 |
116: 93 0b sbc r25, r19 |
118: 20 91 6d 00 lds r18, 0x006D |
11c: 30 91 6e 00 lds r19, 0x006E |
120: 82 0f add r24, r18 |
122: 93 1f adc r25, r19 |
124: 23 e0 ldi r18, 0x03 ; 3 |
126: 96 95 lsr r25 |
128: 87 95 ror r24 |
12a: 2a 95 dec r18 |
12c: e1 f7 brne .-8 ; 0x126 <__vector_5+0xa6> |
12e: 90 93 6e 00 sts 0x006E, r25 |
132: 80 93 6d 00 sts 0x006D, r24 |
ppm_signal = ppm; |
136: 90 93 67 00 sts 0x0067, r25 |
13a: 80 93 66 00 sts 0x0066, r24 |
ppm_new = 1; |
13e: 81 e0 ldi r24, 0x01 ; 1 |
140: 80 93 68 00 sts 0x0068, r24 |
144: 9f 91 pop r25 |
146: 8f 91 pop r24 |
148: 4f 91 pop r20 |
14a: 3f 91 pop r19 |
14c: 2f 91 pop r18 |
14e: 0f 90 pop r0 |
150: 0f be out 0x3f, r0 ; 63 |
152: 0f 90 pop r0 |
154: 1f 90 pop r1 |
156: 18 95 reti |
00000158 <StartIRModulation>: |
} |
} |
} |
/*##############################################################################*/ |
void StartIRModulation(void) |
{ |
158: 89 e0 ldi r24, 0x09 ; 9 |
15a: 85 bd out 0x25, r24 ; 37 |
//Timer1 Config for generation the 38Khz IR Modulation |
TCCR2 = (0<<FOC2)|(0<<WGM20)|(0<<COM21)|(0<<COM20)| |
(1<<WGM21) |(0<<CS22) |(0<<CS21) |(1<<CS20); |
OCR2 = 108; //~38Khz @ 8Mhz |
15c: 8c e6 ldi r24, 0x6C ; 108 |
15e: 83 bd out 0x23, r24 ; 35 |
//Timer 0 Config for getting right timing for IR Pattern |
TCCR0 = (1<<CS02)|(0<<CS01)|(1<<CS00); // clk(@8MHz) / 1024 = 128us / clk (resolution) |
160: 85 e0 ldi r24, 0x05 ; 5 |
162: 83 bf out 0x33, r24 ; 51 |
TIMSK &= ~(1<<TOIE0); // |
164: 89 b7 in r24, 0x39 ; 57 |
166: 8e 7f andi r24, 0xFE ; 254 |
168: 89 bf out 0x39, r24 ; 57 |
16a: 08 95 ret |
0000016c <__vector_9>: |
} |
SIGNAL(SIG_OVERFLOW0) |
{ |
16c: 1f 92 push r1 |
16e: 0f 92 push r0 |
170: 0f b6 in r0, 0x3f ; 63 |
172: 0f 92 push r0 |
174: 11 24 eor r1, r1 |
176: 8f 93 push r24 |
178: 9f 93 push r25 |
switch (IRstate) |
17a: 90 91 6a 00 lds r25, 0x006A |
17e: 92 30 cpi r25, 0x02 ; 2 |
180: b1 f0 breq .+44 ; 0x1ae <__vector_9+0x42> |
182: 93 30 cpi r25, 0x03 ; 3 |
184: 20 f4 brcc .+8 ; 0x18e <__vector_9+0x22> |
186: 91 30 cpi r25, 0x01 ; 1 |
188: 09 f0 breq .+2 ; 0x18c <__vector_9+0x20> |
18a: 52 c0 rjmp .+164 ; 0x230 <__vector_9+0xc4> |
18c: 06 c0 rjmp .+12 ; 0x19a <__vector_9+0x2e> |
18e: 93 30 cpi r25, 0x03 ; 3 |
190: e9 f0 breq .+58 ; 0x1cc <__vector_9+0x60> |
192: 94 30 cpi r25, 0x04 ; 4 |
194: 09 f0 breq .+2 ; 0x198 <__vector_9+0x2c> |
196: 4c c0 rjmp .+152 ; 0x230 <__vector_9+0xc4> |
198: 36 c0 rjmp .+108 ; 0x206 <__vector_9+0x9a> |
{ |
case 1: |
TCCR2 setbit (1<<COM20); |
19a: 85 b5 in r24, 0x25 ; 37 |
19c: 80 61 ori r24, 0x10 ; 16 |
19e: 85 bd out 0x25, r24 ; 37 |
IRstate = 2; |
1a0: 82 e0 ldi r24, 0x02 ; 2 |
1a2: 80 93 6a 00 sts 0x006A, r24 |
IRbit = 0; |
1a6: 10 92 6c 00 sts 0x006C, r1 |
TCNT0 = 255 - (13000 / 128); |
1aa: 8a e9 ldi r24, 0x9A ; 154 |
1ac: 0b c0 rjmp .+22 ; 0x1c4 <__vector_9+0x58> |
break; |
case 2: |
TCCR2 clrbit (1<<COM20); |
1ae: 85 b5 in r24, 0x25 ; 37 |
1b0: 8f 7e andi r24, 0xEF ; 239 |
1b2: 85 bd out 0x25, r24 ; 37 |
IRstate = 3; |
1b4: 83 e0 ldi r24, 0x03 ; 3 |
1b6: 80 93 6a 00 sts 0x006A, r24 |
if ((IRdat & 0x40) == 0) TCNT0 = 255 - (1000 / 128); |
1ba: 80 91 6b 00 lds r24, 0x006B |
1be: 86 fd sbrc r24, 6 |
1c0: 03 c0 rjmp .+6 ; 0x1c8 <__vector_9+0x5c> |
1c2: 88 ef ldi r24, 0xF8 ; 248 |
1c4: 82 bf out 0x32, r24 ; 50 |
1c6: 39 c0 rjmp .+114 ; 0x23a <__vector_9+0xce> |
else TCNT0 = 255 - (3000 / 128); |
1c8: 88 ee ldi r24, 0xE8 ; 232 |
1ca: fc cf rjmp .-8 ; 0x1c4 <__vector_9+0x58> |
break; |
case 3: |
TCCR2 setbit (1<<COM20); |
1cc: 85 b5 in r24, 0x25 ; 37 |
1ce: 80 61 ori r24, 0x10 ; 16 |
1d0: 85 bd out 0x25, r24 ; 37 |
TCNT0 = 255 - (1000 / 128); |
1d2: 88 ef ldi r24, 0xF8 ; 248 |
1d4: 82 bf out 0x32, r24 ; 50 |
IRdat = IRdat << 1; |
1d6: 80 91 6b 00 lds r24, 0x006B |
1da: 88 0f add r24, r24 |
1dc: 80 93 6b 00 sts 0x006B, r24 |
IRbit++; |
1e0: 80 91 6c 00 lds r24, 0x006C |
1e4: 8f 5f subi r24, 0xFF ; 255 |
1e6: 80 93 6c 00 sts 0x006C, r24 |
if (IRbit < 7) IRstate = 2; |
1ea: 80 91 6c 00 lds r24, 0x006C |
1ee: 87 30 cpi r24, 0x07 ; 7 |
1f0: 20 f4 brcc .+8 ; 0x1fa <__vector_9+0x8e> |
1f2: 82 e0 ldi r24, 0x02 ; 2 |
1f4: 80 93 6a 00 sts 0x006A, r24 |
1f8: 20 c0 rjmp .+64 ; 0x23a <__vector_9+0xce> |
else |
{ |
IRstate = 4; |
1fa: 84 e0 ldi r24, 0x04 ; 4 |
1fc: 80 93 6a 00 sts 0x006A, r24 |
IRbit = 0; |
200: 10 92 6c 00 sts 0x006C, r1 |
204: 1a c0 rjmp .+52 ; 0x23a <__vector_9+0xce> |
} |
break; |
case 4: |
TCCR2 clrbit (1<<COM20); |
206: 85 b5 in r24, 0x25 ; 37 |
208: 8f 7e andi r24, 0xEF ; 239 |
20a: 85 bd out 0x25, r24 ; 37 |
TCNT0 = 255 - (25000 / 128); |
20c: 8c e3 ldi r24, 0x3C ; 60 |
20e: 82 bf out 0x32, r24 ; 50 |
if (IRbit < 20) IRstate = 4; |
210: 80 91 6c 00 lds r24, 0x006C |
214: 84 31 cpi r24, 0x14 ; 20 |
216: 18 f4 brcc .+6 ; 0x21e <__vector_9+0xb2> |
218: 90 93 6a 00 sts 0x006A, r25 |
21c: 03 c0 rjmp .+6 ; 0x224 <__vector_9+0xb8> |
else IRstate = 5; |
21e: 85 e0 ldi r24, 0x05 ; 5 |
220: 80 93 6a 00 sts 0x006A, r24 |
IRbit++; |
224: 80 91 6c 00 lds r24, 0x006C |
228: 8f 5f subi r24, 0xFF ; 255 |
22a: 80 93 6c 00 sts 0x006C, r24 |
22e: 05 c0 rjmp .+10 ; 0x23a <__vector_9+0xce> |
break; |
default: |
TIMSK &= ~(1<<TOIE0); |
230: 89 b7 in r24, 0x39 ; 57 |
232: 8e 7f andi r24, 0xFE ; 254 |
234: 89 bf out 0x39, r24 ; 57 |
IRstate = 0; |
236: 10 92 6a 00 sts 0x006A, r1 |
23a: 9f 91 pop r25 |
23c: 8f 91 pop r24 |
23e: 0f 90 pop r0 |
240: 0f be out 0x3f, r0 ; 63 |
242: 0f 90 pop r0 |
244: 1f 90 pop r1 |
246: 18 95 reti |
00000248 <SendIRSignal>: |
break; |
} |
} |
/*##############################################################################*/ |
void SendIRSignal(unsigned char txbyte) |
{ |
248: 98 2f mov r25, r24 |
while (IRstate != 0) {} //IR already in action ?, if so, wait |
24a: 80 91 6a 00 lds r24, 0x006A |
24e: 88 23 and r24, r24 |
250: e1 f7 brne .-8 ; 0x24a <SendIRSignal+0x2> |
IRstate = 1; //initial State |
252: 81 e0 ldi r24, 0x01 ; 1 |
254: 80 93 6a 00 sts 0x006A, r24 |
IRdat = txbyte; //copy IR Data |
258: 90 93 6b 00 sts 0x006B, r25 |
TIFR &= TOV0; //set TMR0 Int Flag |
25c: 88 b7 in r24, 0x38 ; 56 |
25e: 18 be out 0x38, r1 ; 56 |
TIMSK setbit (1<<TOIE0); //Enable TMR0 Int |
260: 89 b7 in r24, 0x39 ; 57 |
262: 81 60 ori r24, 0x01 ; 1 |
264: 89 bf out 0x39, r24 ; 57 |
266: 08 95 ret |
00000268 <StartPPM>: |
} |
/*##############################################################################*/ |
void StartPPM(void) |
{ |
268: 1f bc out 0x2f, r1 ; 47 |
//global timer1 Config |
TCCR1A = (0<<COM1A1)|(0<<COM1A0)|(0<<COM1B1)|(0<<COM1B0)| |
(0<<FOC1A) |(0<<FOC1B) |(0<<WGM10) |(0<<WGM11); |
TCCR1B = (1<<ICNC1)|(1<<ICES1)|(0<<WGM13)| |
26a: 82 ec ldi r24, 0xC2 ; 194 |
26c: 8e bd out 0x2e, r24 ; 46 |
(0<<WGM12)|(0<<CS12)|(1<<CS11)|(0<<CS10); //ICP_POS_FLANKE |
// interrupts |
TIMSK |= (1<<TICIE1)|(1<<TOIE1); //ICP_INT_ENABLE and TIMER1_INT_ENABLE |
26e: 89 b7 in r24, 0x39 ; 57 |
270: 84 62 ori r24, 0x24 ; 36 |
272: 89 bf out 0x39, r24 ; 57 |
274: 08 95 ret |
00000276 <GetPPM>: |
} |
int GetPPM(void) |
{ |
276: 29 b7 in r18, 0x39 ; 57 |
//this routines seems to be nesseccary, as reading a 16 bit value |
//on a 8 bit machine is not atomic, so if an interrupt apears between reading |
//low and high byte of the 16 bit value a wrong result is possible |
unsigned char intmask; |
unsigned int ppm_temp; |
intmask = TIMSK; //backup interupt enable bits |
TIMSK &= ~(1<<TICIE1); //disable ppm interrupt |
278: 89 b7 in r24, 0x39 ; 57 |
27a: 8f 7d andi r24, 0xDF ; 223 |
27c: 89 bf out 0x39, r24 ; 57 |
ppm_temp = ppm_signal; |
27e: 80 91 66 00 lds r24, 0x0066 |
282: 90 91 67 00 lds r25, 0x0067 |
TIMSK = intmask; //restore interupt enable bits |
286: 29 bf out 0x39, r18 ; 57 |
288: 08 95 ret |
0000028a <main>: |
return(ppm_temp); //return ppm_signal |
} |
/*##############################################################################*/ |
// MAIN |
/*##############################################################################*/ |
int main (void) |
{ |
28a: 88 e0 ldi r24, 0x08 ; 8 |
28c: 84 bb out 0x14, r24 ; 20 |
DDRC = (1<<ledred); |
PORTC = 0x00; |
28e: 15 ba out 0x15, r1 ; 21 |
DDRD = (1<<ledgreen); |
290: 80 e8 ldi r24, 0x80 ; 128 |
292: 81 bb out 0x11, r24 ; 17 |
PORTD = 0x00; |
294: 12 ba out 0x12, r1 ; 18 |
DDRB = (1<<1)|(1<<2)|(1<<3); |
296: 8e e0 ldi r24, 0x0E ; 14 |
298: 87 bb out 0x17, r24 ; 23 |
PORTB = 0x00; |
29a: 18 ba out 0x18, r1 ; 24 |
StartUART(); |
29c: 54 d0 rcall .+168 ; 0x346 <StartUART> |
29e: 1f bc out 0x2f, r1 ; 47 |
2a0: 82 ec ldi r24, 0xC2 ; 194 |
2a2: 8e bd out 0x2e, r24 ; 46 |
2a4: 89 b7 in r24, 0x39 ; 57 |
2a6: 84 62 ori r24, 0x24 ; 36 |
2a8: 89 bf out 0x39, r24 ; 57 |
StartPPM(); |
StartIRModulation(); |
2aa: 56 df rcall .-340 ; 0x158 <StartIRModulation> |
sei(); |
2ac: 78 94 sei |
while (1) |
{ |
//printf("%d ",ppm_signal); |
if (ppm_new == 1) |
2ae: 80 91 68 00 lds r24, 0x0068 |
2b2: 81 30 cpi r24, 0x01 ; 1 |
2b4: e1 f7 brne .-8 ; 0x2ae <main+0x24> |
{ |
ppm_new = 0; |
2b6: 10 92 68 00 sts 0x0068, r1 |
2ba: 89 b7 in r24, 0x39 ; 57 |
2bc: 99 b7 in r25, 0x39 ; 57 |
2be: 9f 7d andi r25, 0xDF ; 223 |
2c0: 99 bf out 0x39, r25 ; 57 |
2c2: 20 91 66 00 lds r18, 0x0066 |
2c6: 30 91 67 00 lds r19, 0x0067 |
2ca: 89 bf out 0x39, r24 ; 57 |
if (GetPPM() > 1750) |
2cc: 27 5d subi r18, 0xD7 ; 215 |
2ce: 36 40 sbci r19, 0x06 ; 6 |
2d0: 84 f0 brlt .+32 ; 0x2f2 <main+0x68> |
{ |
SendIRSignal(ZOOM); |
2d2: 81 e4 ldi r24, 0x41 ; 65 |
2d4: b9 df rcall .-142 ; 0x248 <SendIRSignal> |
PORTC |= (1<<ledred); |
2d6: ab 9a sbi 0x15, 3 ; 21 |
2d8: 89 b7 in r24, 0x39 ; 57 |
2da: 99 b7 in r25, 0x39 ; 57 |
2dc: 9f 7d andi r25, 0xDF ; 223 |
2de: 99 bf out 0x39, r25 ; 57 |
2e0: 20 91 66 00 lds r18, 0x0066 |
2e4: 30 91 67 00 lds r19, 0x0067 |
2e8: 89 bf out 0x39, r24 ; 57 |
while (GetPPM() > 1650) {} |
2ea: 23 57 subi r18, 0x73 ; 115 |
2ec: 36 40 sbci r19, 0x06 ; 6 |
2ee: a4 f7 brge .-24 ; 0x2d8 <main+0x4e> |
PORTC &= ~(1<<ledred); |
2f0: ab 98 cbi 0x15, 3 ; 21 |
2f2: 89 b7 in r24, 0x39 ; 57 |
2f4: 99 b7 in r25, 0x39 ; 57 |
2f6: 9f 7d andi r25, 0xDF ; 223 |
2f8: 99 bf out 0x39, r25 ; 57 |
2fa: 20 91 66 00 lds r18, 0x0066 |
2fe: 30 91 67 00 lds r19, 0x0067 |
302: 89 bf out 0x39, r24 ; 57 |
} |
if (GetPPM() < 1250) |
304: 22 5e subi r18, 0xE2 ; 226 |
306: 34 40 sbci r19, 0x04 ; 4 |
308: 94 f6 brge .-92 ; 0x2ae <main+0x24> |
{ |
PORTD |= (1<<ledgreen); |
30a: 97 9a sbi 0x12, 7 ; 18 |
SendIRSignal(TRIGGER); |
30c: 80 e4 ldi r24, 0x40 ; 64 |
30e: 9c df rcall .-200 ; 0x248 <SendIRSignal> |
310: 89 b7 in r24, 0x39 ; 57 |
312: 99 b7 in r25, 0x39 ; 57 |
314: 9f 7d andi r25, 0xDF ; 223 |
316: 99 bf out 0x39, r25 ; 57 |
318: 20 91 66 00 lds r18, 0x0066 |
31c: 30 91 67 00 lds r19, 0x0067 |
320: 89 bf out 0x39, r24 ; 57 |
while (GetPPM() < 1350) {} |
322: 26 54 subi r18, 0x46 ; 70 |
324: 35 40 sbci r19, 0x05 ; 5 |
326: a4 f3 brlt .-24 ; 0x310 <main+0x86> |
PORTD &= ~(1<<ledgreen); |
328: 97 98 cbi 0x12, 7 ; 18 |
32a: c1 cf rjmp .-126 ; 0x2ae <main+0x24> |
0000032c <uart_putchar>: |
} |
int uart_putchar (char c) |
{ |
32c: 1f 93 push r17 |
32e: 18 2f mov r17, r24 |
if (c == '\n') uart_putchar('\r'); |
330: 8a 30 cpi r24, 0x0A ; 10 |
332: 11 f4 brne .+4 ; 0x338 <uart_putchar+0xc> |
334: 8d e0 ldi r24, 0x0D ; 13 |
336: fa df rcall .-12 ; 0x32c <uart_putchar> |
loop_until_bit_is_set(UCSRA, UDRE); |
338: 5d 9b sbis 0x0b, 5 ; 11 |
33a: fe cf rjmp .-4 ; 0x338 <uart_putchar+0xc> |
UDR = c; |
33c: 1c b9 out 0x0c, r17 ; 12 |
return (0); |
} |
33e: 80 e0 ldi r24, 0x00 ; 0 |
340: 90 e0 ldi r25, 0x00 ; 0 |
342: 1f 91 pop r17 |
344: 08 95 ret |
00000346 <StartUART>: |
346: 59 9a sbi 0x0b, 1 ; 11 |
348: 88 e1 ldi r24, 0x18 ; 24 |
34a: 8a b9 out 0x0a, r24 ; 10 |
34c: 86 e8 ldi r24, 0x86 ; 134 |
34e: 80 bd out 0x20, r24 ; 32 |
350: 89 e1 ldi r24, 0x19 ; 25 |
352: 89 b9 out 0x09, r24 ; 9 |
354: 60 e0 ldi r22, 0x00 ; 0 |
356: 70 e0 ldi r23, 0x00 ; 0 |
358: 86 e9 ldi r24, 0x96 ; 150 |
35a: 91 e0 ldi r25, 0x01 ; 1 |
35c: 01 d0 rcall .+2 ; 0x360 <fdevopen> |
35e: 08 95 ret |
00000360 <fdevopen>: |
360: ef 92 push r14 |
362: ff 92 push r15 |
364: 0f 93 push r16 |
366: 1f 93 push r17 |
368: cf 93 push r28 |
36a: df 93 push r29 |
36c: 8c 01 movw r16, r24 |
36e: 7b 01 movw r14, r22 |
370: 89 2b or r24, r25 |
372: 11 f4 brne .+4 ; 0x378 <fdevopen+0x18> |
374: 67 2b or r22, r23 |
376: c9 f1 breq .+114 ; 0x3ea <fdevopen+0x8a> |
378: 6e e0 ldi r22, 0x0E ; 14 |
37a: 70 e0 ldi r23, 0x00 ; 0 |
37c: 81 e0 ldi r24, 0x01 ; 1 |
37e: 90 e0 ldi r25, 0x00 ; 0 |
380: 3b d0 rcall .+118 ; 0x3f8 <calloc> |
382: fc 01 movw r30, r24 |
384: 00 97 sbiw r24, 0x00 ; 0 |
386: 89 f1 breq .+98 ; 0x3ea <fdevopen+0x8a> |
388: dc 01 movw r26, r24 |
38a: 80 e8 ldi r24, 0x80 ; 128 |
38c: 83 83 std Z+3, r24 ; 0x03 |
38e: e1 14 cp r14, r1 |
390: f1 04 cpc r15, r1 |
392: 71 f0 breq .+28 ; 0x3b0 <fdevopen+0x50> |
394: f3 86 std Z+11, r15 ; 0x0b |
396: e2 86 std Z+10, r14 ; 0x0a |
398: 81 e8 ldi r24, 0x81 ; 129 |
39a: 83 83 std Z+3, r24 ; 0x03 |
39c: 80 91 71 00 lds r24, 0x0071 |
3a0: 90 91 72 00 lds r25, 0x0072 |
3a4: 89 2b or r24, r25 |
3a6: 21 f4 brne .+8 ; 0x3b0 <fdevopen+0x50> |
3a8: f0 93 72 00 sts 0x0072, r31 |
3ac: e0 93 71 00 sts 0x0071, r30 |
3b0: 01 15 cp r16, r1 |
3b2: 11 05 cpc r17, r1 |
3b4: e1 f0 breq .+56 ; 0x3ee <fdevopen+0x8e> |
3b6: 11 87 std Z+9, r17 ; 0x09 |
3b8: 00 87 std Z+8, r16 ; 0x08 |
3ba: 83 81 ldd r24, Z+3 ; 0x03 |
3bc: 82 60 ori r24, 0x02 ; 2 |
3be: 83 83 std Z+3, r24 ; 0x03 |
3c0: 80 91 73 00 lds r24, 0x0073 |
3c4: 90 91 74 00 lds r25, 0x0074 |
3c8: 89 2b or r24, r25 |
3ca: 89 f4 brne .+34 ; 0x3ee <fdevopen+0x8e> |
3cc: f0 93 74 00 sts 0x0074, r31 |
3d0: e0 93 73 00 sts 0x0073, r30 |
3d4: 80 91 75 00 lds r24, 0x0075 |
3d8: 90 91 76 00 lds r25, 0x0076 |
3dc: 89 2b or r24, r25 |
3de: 39 f4 brne .+14 ; 0x3ee <fdevopen+0x8e> |
3e0: f0 93 76 00 sts 0x0076, r31 |
3e4: e0 93 75 00 sts 0x0075, r30 |
3e8: 02 c0 rjmp .+4 ; 0x3ee <fdevopen+0x8e> |
3ea: a0 e0 ldi r26, 0x00 ; 0 |
3ec: b0 e0 ldi r27, 0x00 ; 0 |
3ee: cd 01 movw r24, r26 |
3f0: e6 e0 ldi r30, 0x06 ; 6 |
3f2: cd b7 in r28, 0x3d ; 61 |
3f4: de b7 in r29, 0x3e ; 62 |
3f6: 26 c1 rjmp .+588 ; 0x644 <__epilogue_restores__+0x18> |
000003f8 <calloc>: |
3f8: 0f 93 push r16 |
3fa: 1f 93 push r17 |
3fc: cf 93 push r28 |
3fe: df 93 push r29 |
400: 86 9f mul r24, r22 |
402: 80 01 movw r16, r0 |
404: 87 9f mul r24, r23 |
406: 10 0d add r17, r0 |
408: 96 9f mul r25, r22 |
40a: 10 0d add r17, r0 |
40c: 11 24 eor r1, r1 |
40e: c8 01 movw r24, r16 |
410: 0d d0 rcall .+26 ; 0x42c <malloc> |
412: ec 01 movw r28, r24 |
414: 00 97 sbiw r24, 0x00 ; 0 |
416: 21 f0 breq .+8 ; 0x420 <calloc+0x28> |
418: a8 01 movw r20, r16 |
41a: 60 e0 ldi r22, 0x00 ; 0 |
41c: 70 e0 ldi r23, 0x00 ; 0 |
41e: ff d0 rcall .+510 ; 0x61e <memset> |
420: ce 01 movw r24, r28 |
422: df 91 pop r29 |
424: cf 91 pop r28 |
426: 1f 91 pop r17 |
428: 0f 91 pop r16 |
42a: 08 95 ret |
0000042c <malloc>: |
42c: cf 93 push r28 |
42e: df 93 push r29 |
430: ac 01 movw r20, r24 |
432: 02 97 sbiw r24, 0x02 ; 2 |
434: 10 f4 brcc .+4 ; 0x43a <malloc+0xe> |
436: 42 e0 ldi r20, 0x02 ; 2 |
438: 50 e0 ldi r21, 0x00 ; 0 |
43a: a0 91 79 00 lds r26, 0x0079 |
43e: b0 91 7a 00 lds r27, 0x007A |
442: fd 01 movw r30, r26 |
444: c0 e0 ldi r28, 0x00 ; 0 |
446: d0 e0 ldi r29, 0x00 ; 0 |
448: 20 e0 ldi r18, 0x00 ; 0 |
44a: 30 e0 ldi r19, 0x00 ; 0 |
44c: 20 c0 rjmp .+64 ; 0x48e <__stack+0x2f> |
44e: 80 81 ld r24, Z |
450: 91 81 ldd r25, Z+1 ; 0x01 |
452: 84 17 cp r24, r20 |
454: 95 07 cpc r25, r21 |
456: 69 f4 brne .+26 ; 0x472 <__stack+0x13> |
458: 82 81 ldd r24, Z+2 ; 0x02 |
45a: 93 81 ldd r25, Z+3 ; 0x03 |
45c: 20 97 sbiw r28, 0x00 ; 0 |
45e: 19 f0 breq .+6 ; 0x466 <__stack+0x7> |
460: 9b 83 std Y+3, r25 ; 0x03 |
462: 8a 83 std Y+2, r24 ; 0x02 |
464: 04 c0 rjmp .+8 ; 0x46e <__stack+0xf> |
466: 90 93 7a 00 sts 0x007A, r25 |
46a: 80 93 79 00 sts 0x0079, r24 |
46e: cf 01 movw r24, r30 |
470: 32 c0 rjmp .+100 ; 0x4d6 <__stack+0x77> |
472: 48 17 cp r20, r24 |
474: 59 07 cpc r21, r25 |
476: 38 f4 brcc .+14 ; 0x486 <__stack+0x27> |
478: 21 15 cp r18, r1 |
47a: 31 05 cpc r19, r1 |
47c: 19 f0 breq .+6 ; 0x484 <__stack+0x25> |
47e: 82 17 cp r24, r18 |
480: 93 07 cpc r25, r19 |
482: 08 f4 brcc .+2 ; 0x486 <__stack+0x27> |
484: 9c 01 movw r18, r24 |
486: ef 01 movw r28, r30 |
488: 02 80 ldd r0, Z+2 ; 0x02 |
48a: f3 81 ldd r31, Z+3 ; 0x03 |
48c: e0 2d mov r30, r0 |
48e: 30 97 sbiw r30, 0x00 ; 0 |
490: f1 f6 brne .-68 ; 0x44e <malloc+0x22> |
492: 21 15 cp r18, r1 |
494: 31 05 cpc r19, r1 |
496: 89 f1 breq .+98 ; 0x4fa <__stack+0x9b> |
498: c9 01 movw r24, r18 |
49a: 84 1b sub r24, r20 |
49c: 95 0b sbc r25, r21 |
49e: 04 97 sbiw r24, 0x04 ; 4 |
4a0: 08 f4 brcc .+2 ; 0x4a4 <__stack+0x45> |
4a2: a9 01 movw r20, r18 |
4a4: e0 e0 ldi r30, 0x00 ; 0 |
4a6: f0 e0 ldi r31, 0x00 ; 0 |
4a8: 26 c0 rjmp .+76 ; 0x4f6 <__stack+0x97> |
4aa: 8d 91 ld r24, X+ |
4ac: 9c 91 ld r25, X |
4ae: 11 97 sbiw r26, 0x01 ; 1 |
4b0: 82 17 cp r24, r18 |
4b2: 93 07 cpc r25, r19 |
4b4: e9 f4 brne .+58 ; 0x4f0 <__stack+0x91> |
4b6: 48 17 cp r20, r24 |
4b8: 59 07 cpc r21, r25 |
4ba: 79 f4 brne .+30 ; 0x4da <__stack+0x7b> |
4bc: ed 01 movw r28, r26 |
4be: 8a 81 ldd r24, Y+2 ; 0x02 |
4c0: 9b 81 ldd r25, Y+3 ; 0x03 |
4c2: 30 97 sbiw r30, 0x00 ; 0 |
4c4: 19 f0 breq .+6 ; 0x4cc <__stack+0x6d> |
4c6: 93 83 std Z+3, r25 ; 0x03 |
4c8: 82 83 std Z+2, r24 ; 0x02 |
4ca: 04 c0 rjmp .+8 ; 0x4d4 <__stack+0x75> |
4cc: 90 93 7a 00 sts 0x007A, r25 |
4d0: 80 93 79 00 sts 0x0079, r24 |
4d4: cd 01 movw r24, r26 |
4d6: 02 96 adiw r24, 0x02 ; 2 |
4d8: 49 c0 rjmp .+146 ; 0x56c <__stack+0x10d> |
4da: 84 1b sub r24, r20 |
4dc: 95 0b sbc r25, r21 |
4de: fd 01 movw r30, r26 |
4e0: e8 0f add r30, r24 |
4e2: f9 1f adc r31, r25 |
4e4: 41 93 st Z+, r20 |
4e6: 51 93 st Z+, r21 |
4e8: 02 97 sbiw r24, 0x02 ; 2 |
4ea: 8d 93 st X+, r24 |
4ec: 9c 93 st X, r25 |
4ee: 3a c0 rjmp .+116 ; 0x564 <__stack+0x105> |
4f0: fd 01 movw r30, r26 |
4f2: a2 81 ldd r26, Z+2 ; 0x02 |
4f4: b3 81 ldd r27, Z+3 ; 0x03 |
4f6: 10 97 sbiw r26, 0x00 ; 0 |
4f8: c1 f6 brne .-80 ; 0x4aa <__stack+0x4b> |
4fa: 80 91 77 00 lds r24, 0x0077 |
4fe: 90 91 78 00 lds r25, 0x0078 |
502: 89 2b or r24, r25 |
504: 41 f4 brne .+16 ; 0x516 <__stack+0xb7> |
506: 80 91 62 00 lds r24, 0x0062 |
50a: 90 91 63 00 lds r25, 0x0063 |
50e: 90 93 78 00 sts 0x0078, r25 |
512: 80 93 77 00 sts 0x0077, r24 |
516: 20 91 64 00 lds r18, 0x0064 |
51a: 30 91 65 00 lds r19, 0x0065 |
51e: 21 15 cp r18, r1 |
520: 31 05 cpc r19, r1 |
522: 41 f4 brne .+16 ; 0x534 <__stack+0xd5> |
524: 2d b7 in r18, 0x3d ; 61 |
526: 3e b7 in r19, 0x3e ; 62 |
528: 80 91 60 00 lds r24, 0x0060 |
52c: 90 91 61 00 lds r25, 0x0061 |
530: 28 1b sub r18, r24 |
532: 39 0b sbc r19, r25 |
534: e0 91 77 00 lds r30, 0x0077 |
538: f0 91 78 00 lds r31, 0x0078 |
53c: 2e 1b sub r18, r30 |
53e: 3f 0b sbc r19, r31 |
540: 24 17 cp r18, r20 |
542: 35 07 cpc r19, r21 |
544: 88 f0 brcs .+34 ; 0x568 <__stack+0x109> |
546: ca 01 movw r24, r20 |
548: 02 96 adiw r24, 0x02 ; 2 |
54a: 28 17 cp r18, r24 |
54c: 39 07 cpc r19, r25 |
54e: 60 f0 brcs .+24 ; 0x568 <__stack+0x109> |
550: cf 01 movw r24, r30 |
552: 84 0f add r24, r20 |
554: 95 1f adc r25, r21 |
556: 02 96 adiw r24, 0x02 ; 2 |
558: 90 93 78 00 sts 0x0078, r25 |
55c: 80 93 77 00 sts 0x0077, r24 |
560: 41 93 st Z+, r20 |
562: 51 93 st Z+, r21 |
564: cf 01 movw r24, r30 |
566: 02 c0 rjmp .+4 ; 0x56c <__stack+0x10d> |
568: 80 e0 ldi r24, 0x00 ; 0 |
56a: 90 e0 ldi r25, 0x00 ; 0 |
56c: df 91 pop r29 |
56e: cf 91 pop r28 |
570: 08 95 ret |
00000572 <free>: |
572: cf 93 push r28 |
574: df 93 push r29 |
576: 00 97 sbiw r24, 0x00 ; 0 |
578: 09 f4 brne .+2 ; 0x57c <free+0xa> |
57a: 4e c0 rjmp .+156 ; 0x618 <free+0xa6> |
57c: ec 01 movw r28, r24 |
57e: 22 97 sbiw r28, 0x02 ; 2 |
580: 1b 82 std Y+3, r1 ; 0x03 |
582: 1a 82 std Y+2, r1 ; 0x02 |
584: a0 91 79 00 lds r26, 0x0079 |
588: b0 91 7a 00 lds r27, 0x007A |
58c: 10 97 sbiw r26, 0x00 ; 0 |
58e: 11 f1 breq .+68 ; 0x5d4 <free+0x62> |
590: 40 e0 ldi r20, 0x00 ; 0 |
592: 50 e0 ldi r21, 0x00 ; 0 |
594: 01 c0 rjmp .+2 ; 0x598 <free+0x26> |
596: dc 01 movw r26, r24 |
598: ac 17 cp r26, r28 |
59a: bd 07 cpc r27, r29 |
59c: 00 f1 brcs .+64 ; 0x5de <free+0x6c> |
59e: bb 83 std Y+3, r27 ; 0x03 |
5a0: aa 83 std Y+2, r26 ; 0x02 |
5a2: fe 01 movw r30, r28 |
5a4: 21 91 ld r18, Z+ |
5a6: 31 91 ld r19, Z+ |
5a8: e2 0f add r30, r18 |
5aa: f3 1f adc r31, r19 |
5ac: ea 17 cp r30, r26 |
5ae: fb 07 cpc r31, r27 |
5b0: 71 f4 brne .+28 ; 0x5ce <free+0x5c> |
5b2: 2e 5f subi r18, 0xFE ; 254 |
5b4: 3f 4f sbci r19, 0xFF ; 255 |
5b6: 8d 91 ld r24, X+ |
5b8: 9c 91 ld r25, X |
5ba: 11 97 sbiw r26, 0x01 ; 1 |
5bc: 82 0f add r24, r18 |
5be: 93 1f adc r25, r19 |
5c0: 99 83 std Y+1, r25 ; 0x01 |
5c2: 88 83 st Y, r24 |
5c4: fd 01 movw r30, r26 |
5c6: 82 81 ldd r24, Z+2 ; 0x02 |
5c8: 93 81 ldd r25, Z+3 ; 0x03 |
5ca: 9b 83 std Y+3, r25 ; 0x03 |
5cc: 8a 83 std Y+2, r24 ; 0x02 |
5ce: 41 15 cp r20, r1 |
5d0: 51 05 cpc r21, r1 |
5d2: 59 f4 brne .+22 ; 0x5ea <free+0x78> |
5d4: d0 93 7a 00 sts 0x007A, r29 |
5d8: c0 93 79 00 sts 0x0079, r28 |
5dc: 1d c0 rjmp .+58 ; 0x618 <free+0xa6> |
5de: fd 01 movw r30, r26 |
5e0: 82 81 ldd r24, Z+2 ; 0x02 |
5e2: 93 81 ldd r25, Z+3 ; 0x03 |
5e4: ad 01 movw r20, r26 |
5e6: 00 97 sbiw r24, 0x00 ; 0 |
5e8: b1 f6 brne .-84 ; 0x596 <free+0x24> |
5ea: fa 01 movw r30, r20 |
5ec: d3 83 std Z+3, r29 ; 0x03 |
5ee: c2 83 std Z+2, r28 ; 0x02 |
5f0: 21 91 ld r18, Z+ |
5f2: 31 91 ld r19, Z+ |
5f4: e2 0f add r30, r18 |
5f6: f3 1f adc r31, r19 |
5f8: ec 17 cp r30, r28 |
5fa: fd 07 cpc r31, r29 |
5fc: 69 f4 brne .+26 ; 0x618 <free+0xa6> |
5fe: 2e 5f subi r18, 0xFE ; 254 |
600: 3f 4f sbci r19, 0xFF ; 255 |
602: 88 81 ld r24, Y |
604: 99 81 ldd r25, Y+1 ; 0x01 |
606: 82 0f add r24, r18 |
608: 93 1f adc r25, r19 |
60a: fa 01 movw r30, r20 |
60c: 91 83 std Z+1, r25 ; 0x01 |
60e: 80 83 st Z, r24 |
610: 8a 81 ldd r24, Y+2 ; 0x02 |
612: 9b 81 ldd r25, Y+3 ; 0x03 |
614: 93 83 std Z+3, r25 ; 0x03 |
616: 82 83 std Z+2, r24 ; 0x02 |
618: df 91 pop r29 |
61a: cf 91 pop r28 |
61c: 08 95 ret |
0000061e <memset>: |
61e: dc 01 movw r26, r24 |
620: 01 c0 rjmp .+2 ; 0x624 <memset+0x6> |
622: 6d 93 st X+, r22 |
624: 41 50 subi r20, 0x01 ; 1 |
626: 50 40 sbci r21, 0x00 ; 0 |
628: e0 f7 brcc .-8 ; 0x622 <memset+0x4> |
62a: 08 95 ret |
0000062c <__epilogue_restores__>: |
62c: 2a 88 ldd r2, Y+18 ; 0x12 |
62e: 39 88 ldd r3, Y+17 ; 0x11 |
630: 48 88 ldd r4, Y+16 ; 0x10 |
632: 5f 84 ldd r5, Y+15 ; 0x0f |
634: 6e 84 ldd r6, Y+14 ; 0x0e |
636: 7d 84 ldd r7, Y+13 ; 0x0d |
638: 8c 84 ldd r8, Y+12 ; 0x0c |
63a: 9b 84 ldd r9, Y+11 ; 0x0b |
63c: aa 84 ldd r10, Y+10 ; 0x0a |
63e: b9 84 ldd r11, Y+9 ; 0x09 |
640: c8 84 ldd r12, Y+8 ; 0x08 |
642: df 80 ldd r13, Y+7 ; 0x07 |
644: ee 80 ldd r14, Y+6 ; 0x06 |
646: fd 80 ldd r15, Y+5 ; 0x05 |
648: 0c 81 ldd r16, Y+4 ; 0x04 |
64a: 1b 81 ldd r17, Y+3 ; 0x03 |
64c: aa 81 ldd r26, Y+2 ; 0x02 |
64e: b9 81 ldd r27, Y+1 ; 0x01 |
650: ce 0f add r28, r30 |
652: d1 1d adc r29, r1 |
654: 0f b6 in r0, 0x3f ; 63 |
656: f8 94 cli |
658: de bf out 0x3e, r29 ; 62 |
65a: 0f be out 0x3f, r0 ; 63 |
65c: cd bf out 0x3d, r28 ; 61 |
65e: ed 01 movw r28, r26 |
660: 08 95 ret |
00000662 <_exit>: |
662: ff cf rjmp .-2 ; 0x662 <_exit> |
/IR-TX-BL/tags/V0.02/IR-Tx_V0_02.map |
---|
0,0 → 1,516 |
Archive member included because of file (symbol) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o (exit) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
main.o (__do_copy_data) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
main.o (__do_clear_bss) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o (fdevopen) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) (__iob) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) (calloc) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) (malloc) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) (memset) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) (__epilogue_restores__) |
Allocating common symbols |
Common symbol size file |
__brkval 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__flp 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__iob 0x6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
Discarded input sections |
.stabstr 0x00000000 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
Memory Configuration |
Name Origin Length Attributes |
text 0x00000000 0x00002000 xr |
data 0x00800060 0x0000ffa0 rw !x |
eeprom 0x00810000 0x00010000 rw !x |
*default* 0x00000000 0xffffffff |
Linker script and memory map |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
LOAD main.o |
LOAD uart.o |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libm.a |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a |
.hash |
*(.hash) |
.dynsym |
*(.dynsym) |
.dynstr |
*(.dynstr) |
.gnu.version |
*(.gnu.version) |
.gnu.version_d |
*(.gnu.version_d) |
.gnu.version_r |
*(.gnu.version_r) |
.rel.init |
*(.rel.init) |
.rela.init |
*(.rela.init) |
.rel.text |
*(.rel.text) |
*(.rel.text.*) |
*(.rel.gnu.linkonce.t*) |
.rela.text |
*(.rela.text) |
*(.rela.text.*) |
*(.rela.gnu.linkonce.t*) |
.rel.fini |
*(.rel.fini) |
.rela.fini |
*(.rela.fini) |
.rel.rodata |
*(.rel.rodata) |
*(.rel.rodata.*) |
*(.rel.gnu.linkonce.r*) |
.rela.rodata |
*(.rela.rodata) |
*(.rela.rodata.*) |
*(.rela.gnu.linkonce.r*) |
.rel.data |
*(.rel.data) |
*(.rel.data.*) |
*(.rel.gnu.linkonce.d*) |
.rela.data |
*(.rela.data) |
*(.rela.data.*) |
*(.rela.gnu.linkonce.d*) |
.rel.ctors |
*(.rel.ctors) |
.rela.ctors |
*(.rela.ctors) |
.rel.dtors |
*(.rel.dtors) |
.rela.dtors |
*(.rela.dtors) |
.rel.got |
*(.rel.got) |
.rela.got |
*(.rela.got) |
.rel.bss |
*(.rel.bss) |
.rela.bss |
*(.rela.bss) |
.rel.plt |
*(.rel.plt) |
.rela.plt |
*(.rela.plt) |
.text 0x00000000 0x664 |
*(.vectors) |
.vectors 0x00000000 0x26 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
0x00000000 __vectors |
0x00000000 __vector_default |
*(.vectors) |
*(.progmem.gcc*) |
*(.progmem*) |
0x00000026 . = ALIGN (0x2) |
0x00000026 __trampolines_start = . |
*(.trampolines) |
.trampolines 0x00000026 0x0 linker stubs |
*(.trampolines*) |
0x00000026 __trampolines_end = . |
*(.jumptables) |
*(.jumptables*) |
*(.lowtext) |
*(.lowtext*) |
0x00000026 __ctors_start = . |
*(.ctors) |
0x00000026 __ctors_end = . |
0x00000026 __dtors_start = . |
*(.dtors) |
0x00000026 __dtors_end = . |
SORT(*)(.ctors) |
SORT(*)(.dtors) |
*(.init0) |
.init0 0x00000026 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
0x00000026 __init |
*(.init0) |
*(.init1) |
*(.init1) |
*(.init2) |
.init2 0x00000026 0xc c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
*(.init2) |
*(.init3) |
*(.init3) |
*(.init4) |
.init4 0x00000032 0x16 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
0x00000032 __do_copy_data |
.init4 0x00000048 0x10 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
0x00000048 __do_clear_bss |
*(.init4) |
*(.init5) |
*(.init5) |
*(.init6) |
*(.init6) |
*(.init7) |
*(.init7) |
*(.init8) |
*(.init8) |
*(.init9) |
.init9 0x00000058 0x4 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
*(.init9) |
*(.text) |
.text 0x0000005c 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
0x0000005c __vector_1 |
0x0000005c __vector_12 |
0x0000005c __bad_interrupt |
0x0000005c __vector_6 |
0x0000005c __vector_3 |
0x0000005c __vector_11 |
0x0000005c __vector_13 |
0x0000005c __vector_17 |
0x0000005c __vector_7 |
0x0000005c __vector_4 |
0x0000005c __vector_2 |
0x0000005c __vector_15 |
0x0000005c __vector_14 |
0x0000005c __vector_10 |
0x0000005c __vector_16 |
0x0000005c __vector_18 |
.text 0x0000005e 0x2ce main.o |
0x00000248 SendIRSignal |
0x00000276 GetPPM |
0x00000158 StartIRModulation |
0x00000268 StartPPM |
0x00000080 __vector_5 |
0x0000028a main |
0x0000016c __vector_9 |
0x0000005e __vector_8 |
.text 0x0000032c 0x34 uart.o |
0x00000346 StartUART |
0x0000032c uart_putchar |
.text 0x00000360 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.text 0x00000360 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.text 0x00000360 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.text 0x00000360 0x98 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
0x00000360 fdevopen |
.text 0x000003f8 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
.text 0x000003f8 0x34 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
0x000003f8 calloc |
.text 0x0000042c 0x1f2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
0x0000042c malloc |
0x00000572 free |
.text 0x0000061e 0xe c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
0x0000061e memset |
.text 0x0000062c 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
0x0000062c . = ALIGN (0x2) |
*(.text.*) |
.text.libgcc 0x0000062c 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.text.libgcc 0x0000062c 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.text.libgcc 0x0000062c 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.text.libgcc 0x0000062c 0x36 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
0x0000062c __epilogue_restores__ |
0x00000662 . = ALIGN (0x2) |
*(.fini9) |
.fini9 0x00000662 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
0x00000662 exit |
0x00000662 _exit |
*(.fini9) |
*(.fini8) |
*(.fini8) |
*(.fini7) |
*(.fini7) |
*(.fini6) |
*(.fini6) |
*(.fini5) |
*(.fini5) |
*(.fini4) |
*(.fini4) |
*(.fini3) |
*(.fini3) |
*(.fini2) |
*(.fini2) |
*(.fini1) |
*(.fini1) |
*(.fini0) |
.fini0 0x00000662 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
*(.fini0) |
0x00000664 _etext = . |
.data 0x00800060 0x6 load address 0x00000664 |
0x00800060 PROVIDE (__data_start, .) |
*(.data) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.data 0x00800060 0x0 main.o |
.data 0x00800060 0x0 uart.o |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
.data 0x00800060 0x6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
0x00800062 __malloc_heap_start |
0x00800064 __malloc_heap_end |
0x00800060 __malloc_margin |
.data 0x00800066 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
.data 0x00800066 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
*(.data*) |
*(.rodata) |
*(.rodata*) |
*(.gnu.linkonce.d*) |
0x00800066 . = ALIGN (0x2) |
0x00800066 _edata = . |
0x00800066 PROVIDE (__data_end, .) |
.bss 0x00800066 0x15 |
0x00800066 PROVIDE (__bss_start, .) |
*(.bss) |
.bss 0x00800066 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.bss 0x00800066 0xb main.o |
0x0080006a IRstate |
0x00800069 TMR1OvF |
0x0080006c IRbit |
0x00800068 ppm_new |
0x0080006b IRdat |
0x00800066 ppm_signal |
.bss 0x00800071 0x0 uart.o |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
*(.bss*) |
*(COMMON) |
COMMON 0x00800071 0x6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
0x00800071 __iob |
COMMON 0x00800077 0x4 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
0x00800077 __brkval |
0x00800079 __flp |
0x0080007b PROVIDE (__bss_end, .) |
0x00000664 __data_load_start = LOADADDR (.data) |
0x0000066a __data_load_end = (__data_load_start + SIZEOF (.data)) |
.noinit 0x0080007b 0x0 |
0x0080007b PROVIDE (__noinit_start, .) |
*(.noinit*) |
0x0080007b PROVIDE (__noinit_end, .) |
0x0080007b _end = . |
0x0080007b PROVIDE (__heap_start, .) |
.eeprom 0x00810000 0x0 |
*(.eeprom*) |
0x00810000 __eeprom_end = . |
.stab 0x00000000 0x378 |
*(.stab) |
.stab 0x00000000 0x378 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.stabstr 0x00000000 0x71 |
*(.stabstr) |
.stabstr 0x00000000 0x71 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.stab.excl |
*(.stab.excl) |
.stab.exclstr |
*(.stab.exclstr) |
.stab.index |
*(.stab.index) |
.stab.indexstr |
*(.stab.indexstr) |
.comment |
*(.comment) |
.debug |
*(.debug) |
.line |
*(.line) |
.debug_srcinfo |
*(.debug_srcinfo) |
.debug_sfnames |
*(.debug_sfnames) |
.debug_aranges 0x00000000 0x40 |
*(.debug_aranges) |
.debug_aranges |
0x00000000 0x20 main.o |
.debug_aranges |
0x00000020 0x20 uart.o |
.debug_pubnames |
0x00000000 0xff |
*(.debug_pubnames) |
.debug_pubnames |
0x00000000 0xce main.o |
.debug_pubnames |
0x000000ce 0x31 uart.o |
.debug_info 0x00000000 0x36d |
*(.debug_info) |
.debug_info 0x00000000 0x2ca main.o |
.debug_info 0x000002ca 0xa3 uart.o |
*(.gnu.linkonce.wi.*) |
.debug_abbrev 0x00000000 0x1b4 |
*(.debug_abbrev) |
.debug_abbrev 0x00000000 0x14d main.o |
.debug_abbrev 0x0000014d 0x67 uart.o |
.debug_line 0x00000000 0x59c |
*(.debug_line) |
.debug_line 0x00000000 0x436 main.o |
.debug_line 0x00000436 0x166 uart.o |
.debug_frame 0x00000000 0xc0 |
*(.debug_frame) |
.debug_frame 0x00000000 0x90 main.o |
.debug_frame 0x00000090 0x30 uart.o |
.debug_str 0x00000000 0x13a |
*(.debug_str) |
.debug_str 0x00000000 0x11c main.o |
0x155 (size before relaxing) |
.debug_str 0x0000011c 0x1e uart.o |
0xc8 (size before relaxing) |
.debug_loc 0x00000000 0x130 |
*(.debug_loc) |
.debug_loc 0x00000000 0x112 main.o |
.debug_loc 0x00000112 0x1e uart.o |
.debug_macinfo |
*(.debug_macinfo) |
OUTPUT(IR-Tx_V0_02.elf elf32-avr) |
LOAD linker stubs |
Cross Reference Table |
Symbol File |
GetPPM main.o |
IRbit main.o |
IRdat main.o |
IRstate main.o |
SendIRSignal main.o |
StartIRModulation main.o |
StartPPM main.o |
StartUART uart.o |
main.o |
TMR1OvF main.o |
__bad_interrupt c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__brkval c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__bss_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
__bss_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
__data_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
__data_load_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
__data_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
__do_clear_bss c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o |
main.o |
__do_copy_data c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o |
main.o |
__epilogue_restores__ c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
__flp c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__heap_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__heap_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__init c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__iob c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
__malloc_heap_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__malloc_heap_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__malloc_margin c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__stack c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_1 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_10 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_11 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_12 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_13 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_14 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_15 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_16 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_17 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_18 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_3 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_4 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_5 main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_7 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_8 main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_9 main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_default c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vectors c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
_exit c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
calloc c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
exit c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
fdevopen c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o |
free c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
main main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
malloc c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
memset c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
ppm_new main.o |
ppm_signal main.o |
uart_putchar uart.o |
/IR-TX-BL/tags/V0.02/IR-Tx_V0_02.sym |
---|
0,0 → 1,107 |
00000000 W __heap_end |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 W __vector_default |
00000000 T __vectors |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000026 T __ctors_end |
00000026 T __ctors_start |
00000026 T __dtors_end |
00000026 T __dtors_start |
00000026 W __init |
00000026 T __trampolines_end |
00000026 T __trampolines_start |
00000032 T __do_copy_data |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003e t .do_copy_data_loop |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
00000042 t .do_copy_data_start |
00000048 T __do_clear_bss |
00000050 t .do_clear_bss_loop |
00000052 t .do_clear_bss_start |
0000005c T __bad_interrupt |
0000005c W __vector_1 |
0000005c W __vector_10 |
0000005c W __vector_11 |
0000005c W __vector_12 |
0000005c W __vector_13 |
0000005c W __vector_14 |
0000005c W __vector_15 |
0000005c W __vector_16 |
0000005c W __vector_17 |
0000005c W __vector_18 |
0000005c W __vector_2 |
0000005c W __vector_3 |
0000005c W __vector_4 |
0000005c W __vector_6 |
0000005c W __vector_7 |
0000005e T __vector_8 |
00000080 T __vector_5 |
00000158 T StartIRModulation |
0000016c T __vector_9 |
00000248 T SendIRSignal |
00000268 T StartPPM |
00000276 T GetPPM |
0000028a T main |
0000032c T uart_putchar |
00000346 T StartUART |
00000360 T fdevopen |
000003f8 T calloc |
0000042c T malloc |
0000045f W __stack |
00000572 T free |
0000061e T memset |
0000062c T __epilogue_restores__ |
00000662 t __stop_program |
00000662 T _exit |
00000662 W exit |
00000664 A __data_load_start |
00000664 T _etext |
0000066a A __data_load_end |
00800060 D __data_start |
00800060 D __malloc_margin |
00800062 D __malloc_heap_start |
00800064 D __malloc_heap_end |
00800066 B __bss_start |
00800066 D __data_end |
00800066 D _edata |
00800066 B ppm_signal |
00800068 B ppm_new |
00800069 B TMR1OvF |
0080006a B IRstate |
0080006b B IRdat |
0080006c B IRbit |
0080006d b ppm.1753 |
0080006f b pos_ICR.1752 |
00800071 B __iob |
00800077 B __brkval |
00800079 B __flp |
0080007b B __bss_end |
0080007b A __heap_start |
0080007b A _end |
00810000 A __eeprom_end |
/IR-TX-BL/tags/V0.02/main.c |
---|
0,0 → 1,220 |
//############################################################################ |
// - PPM2PentaxIR Main |
// - ATMEGA8 mit 8MHz |
// - Nur für den privaten Gebrauch |
// - Keine Garantie auf Fehlerfreiheit |
// - Kommerzielle Nutzung nur mit meiner Zustimmung |
// - walter Meyer @ www.freakware.de |
// - 30.11.2007 |
// - Make sure Fuses are programmed for internal 8 MHz RC Oscilator |
//############################################################################*/ |
#include "main.h" |
#include "uart.h" |
volatile unsigned int ppm_signal = 0; |
volatile unsigned char ppm_new = 0; |
volatile unsigned char TMR1OvF = 0; |
volatile unsigned char IRstate = 0; |
volatile unsigned char IRdat = 0; |
volatile unsigned char IRbit = 0; |
SIGNAL(SIG_OVERFLOW1) |
{ |
TMR1OvF++; |
} |
SIGNAL(SIG_INPUT_CAPTURE1) |
{ |
static unsigned int pos_ICR; |
static unsigned int ppm; |
if ((TCCR1B & (1<<ICES1)) != 0) |
{ |
TCCR1B &= ~(1<<ICES1); //invert trigger |
TMR1OvF = 0; |
pos_ICR = ICR1; |
} |
else //Negative Flanke |
{ |
TCCR1B |= (1<<ICES1); |
ppm = (ICR1 - pos_ICR + (int) TMR1OvF * 65536); |
if ((ppm > 600) && (ppm < 2400)) |
{ |
if (ppm > 2100) ppm = 2100; |
if (ppm < 900) ppm = 900; |
ppm = (ppm_signal * 7 + ppm) / 8; |
ppm_signal = ppm; |
ppm_new = 1; |
} |
} |
} |
/*##############################################################################*/ |
void StartIRModulation(void) |
{ |
//Timer1 Config for generation the 38Khz IR Modulation |
TCCR2 = (0<<FOC2)|(0<<WGM20)|(0<<COM21)|(0<<COM20)| |
(1<<WGM21) |(0<<CS22) |(0<<CS21) |(1<<CS20); |
OCR2 = 108; //~38Khz @ 8Mhz |
//Timer 0 Config for getting right timing for IR Pattern |
TCCR0 = (1<<CS02)|(0<<CS01)|(1<<CS00); // clk(@8MHz) / 1024 = 128us / clk (resolution) |
TIMSK &= ~(1<<TOIE0); // |
} |
SIGNAL(SIG_OVERFLOW0) |
{ |
switch (IRstate) |
{ |
case 1: |
TCCR2 setbit (1<<COM20); |
IRstate = 2; |
IRbit = 0; |
TCNT0 = 255 - (13000 / 128); |
break; |
case 2: |
TCCR2 clrbit (1<<COM20); |
IRstate = 3; |
if ((IRdat & 0x40) == 0) TCNT0 = 255 - (1000 / 128); |
else TCNT0 = 255 - (3000 / 128); |
break; |
case 3: |
TCCR2 setbit (1<<COM20); |
TCNT0 = 255 - (1000 / 128); |
IRdat = IRdat << 1; |
IRbit++; |
if (IRbit < 7) IRstate = 2; |
else |
{ |
IRstate = 4; |
IRbit = 0; |
} |
break; |
case 4: |
TCCR2 clrbit (1<<COM20); |
TCNT0 = 255 - (25000 / 128); |
if (IRbit < 20) IRstate = 4; |
else IRstate = 5; |
IRbit++; |
break; |
default: |
TIMSK &= ~(1<<TOIE0); |
IRstate = 0; |
break; |
} |
} |
/*##############################################################################*/ |
void SendIRSignal(unsigned char txbyte) |
{ |
while (IRstate != 0) {} //IR already in action ?, if so, wait |
IRstate = 1; //initial State |
IRdat = txbyte; //copy IR Data |
TIFR &= TOV0; //set TMR0 Int Flag |
TIMSK setbit (1<<TOIE0); //Enable TMR0 Int |
} |
/*##############################################################################*/ |
void StartPPM(void) |
{ |
//global timer1 Config |
TCCR1A = (0<<COM1A1)|(0<<COM1A0)|(0<<COM1B1)|(0<<COM1B0)| |
(0<<FOC1A) |(0<<FOC1B) |(0<<WGM10) |(0<<WGM11); |
TCCR1B = (1<<ICNC1)|(1<<ICES1)|(0<<WGM13)| |
(0<<WGM12)|(0<<CS12)|(1<<CS11)|(0<<CS10); //ICP_POS_FLANKE |
// interrupts |
TIMSK |= (1<<TICIE1)|(1<<TOIE1); //ICP_INT_ENABLE and TIMER1_INT_ENABLE |
} |
int GetPPM(void) |
{ |
//this routines seems to be nesseccary, as reading a 16 bit value |
//on a 8 bit machine is not atomic, so if an interrupt apears between reading |
//low and high byte of the 16 bit value a wrong result is possible |
unsigned char intmask; |
unsigned int ppm_temp; |
intmask = TIMSK; //backup interupt enable bits |
TIMSK &= ~(1<<TICIE1); //disable ppm interrupt |
ppm_temp = ppm_signal; |
TIMSK = intmask; //restore interupt enable bits |
return(ppm_temp); //return ppm_signal |
} |
/*##############################################################################*/ |
// MAIN |
/*##############################################################################*/ |
int main (void) |
{ |
DDRC = (1<<ledred); |
PORTC = 0x00; |
DDRD = (1<<ledgreen); |
PORTD = 0x00; |
DDRB = (1<<1)|(1<<2)|(1<<3); |
PORTB = 0x00; |
StartUART(); |
StartPPM(); |
StartIRModulation(); |
sei(); |
while (1) |
{ |
//printf("%d ",ppm_signal); |
if (ppm_new == 1) |
{ |
ppm_new = 0; |
if (GetPPM() > 1750) |
{ |
SendIRSignal(ZOOM); |
PORTC |= (1<<ledred); |
while (GetPPM() > 1650) {} |
PORTC &= ~(1<<ledred); |
} |
if (GetPPM() < 1250) |
{ |
PORTD |= (1<<ledgreen); |
SendIRSignal(TRIGGER); |
while (GetPPM() < 1350) {} |
PORTD &= ~(1<<ledgreen); |
} |
} |
} |
} |
/IR-TX-BL/tags/V0.02/main.d |
---|
0,0 → 1,0 |
main.o main.d : main.c main.h uart.h |
/IR-TX-BL/tags/V0.02/main.h |
---|
0,0 → 1,31 |
#ifndef _MAIN_H |
#define _MAIN_H |
#define SYSCLK 8000000L |
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
#include <avr/io.h> |
#include <avr/interrupt.h> |
#include <avr/eeprom.h> |
#define setbit |= |
#define clrbit &=~ |
#define invbit ^= |
#define ledred 3 //on Port C |
#define ledgreen 7 //on Port D |
#define correction -60 |
#define ZOOM 0x41 |
#define TRIGGER 0x40 |
#endif //_MAIN_H |
/IR-TX-BL/tags/V0.02/main.lst |
---|
0,0 → 1,609 |
1 .file "main.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
17 .Ltext0: |
18 .global __vector_8 |
20 __vector_8: |
21 .LFB10: |
22 .LM1: |
23 /* prologue: frame size=0 */ |
24 0000 1F92 push __zero_reg__ |
25 0002 0F92 push __tmp_reg__ |
26 0004 0FB6 in __tmp_reg__,__SREG__ |
27 0006 0F92 push __tmp_reg__ |
28 0008 1124 clr __zero_reg__ |
29 000a 8F93 push r24 |
30 /* prologue end (size=6) */ |
31 .LM2: |
32 000c 8091 0000 lds r24,TMR1OvF |
33 0010 8F5F subi r24,lo8(-(1)) |
34 0012 8093 0000 sts TMR1OvF,r24 |
35 /* epilogue: frame size=0 */ |
36 0016 8F91 pop r24 |
37 0018 0F90 pop __tmp_reg__ |
38 001a 0FBE out __SREG__,__tmp_reg__ |
39 001c 0F90 pop __tmp_reg__ |
40 001e 1F90 pop __zero_reg__ |
41 0020 1895 reti |
42 /* epilogue end (size=6) */ |
43 /* function __vector_8 size 17 (5) */ |
44 .LFE10: |
46 .global __vector_5 |
48 __vector_5: |
49 .LFB11: |
50 .LM3: |
51 /* prologue: frame size=0 */ |
52 0022 1F92 push __zero_reg__ |
53 0024 0F92 push __tmp_reg__ |
54 0026 0FB6 in __tmp_reg__,__SREG__ |
55 0028 0F92 push __tmp_reg__ |
56 002a 1124 clr __zero_reg__ |
57 002c 2F93 push r18 |
58 002e 3F93 push r19 |
59 0030 4F93 push r20 |
60 0032 8F93 push r24 |
61 0034 9F93 push r25 |
62 /* prologue end (size=10) */ |
63 .LM4: |
64 0036 0EB4 in __tmp_reg__,78-0x20 |
65 0038 06FE sbrs __tmp_reg__,6 |
66 003a 00C0 rjmp .L4 |
67 .LM5: |
68 003c 8EB5 in r24,78-0x20 |
69 003e 8F7B andi r24,lo8(-65) |
70 0040 8EBD out 78-0x20,r24 |
71 .LM6: |
72 0042 1092 0000 sts TMR1OvF,__zero_reg__ |
73 .LM7: |
74 0046 86B5 in r24,70-0x20 |
75 0048 97B5 in r25,(70)+1-0x20 |
76 004a 9093 0000 sts (pos_ICR.1752)+1,r25 |
77 004e 8093 0000 sts pos_ICR.1752,r24 |
78 0052 00C0 rjmp .L12 |
79 .L4: |
80 .LM8: |
81 0054 8EB5 in r24,78-0x20 |
82 0056 8064 ori r24,lo8(64) |
83 0058 8EBD out 78-0x20,r24 |
84 .LM9: |
85 005a 26B5 in r18,70-0x20 |
86 005c 37B5 in r19,(70)+1-0x20 |
87 005e 8091 0000 lds r24,TMR1OvF |
88 0062 8091 0000 lds r24,pos_ICR.1752 |
89 0066 9091 0000 lds r25,(pos_ICR.1752)+1 |
90 006a 281B sub r18,r24 |
91 006c 390B sbc r19,r25 |
92 006e 3093 0000 sts (ppm.1753)+1,r19 |
93 0072 2093 0000 sts ppm.1753,r18 |
94 .LM10: |
95 0076 C901 movw r24,r18 |
96 0078 8955 subi r24,lo8(-(-601)) |
97 007a 9240 sbci r25,hi8(-(-601)) |
98 007c 8750 subi r24,lo8(1799) |
99 007e 9740 sbci r25,hi8(1799) |
100 0080 00F4 brsh .L12 |
101 .LM11: |
102 0082 88E0 ldi r24,hi8(2101) |
103 0084 2533 cpi r18,lo8(2101) |
104 0086 3807 cpc r19,r24 |
105 0088 00F0 brlo .L8 |
106 008a 84E3 ldi r24,lo8(2100) |
107 008c 98E0 ldi r25,hi8(2100) |
108 008e 00C0 rjmp .L13 |
109 .L8: |
110 .LM12: |
111 0090 2458 subi r18,lo8(900) |
112 0092 3340 sbci r19,hi8(900) |
113 0094 00F4 brsh .L10 |
114 0096 84E8 ldi r24,lo8(900) |
115 0098 93E0 ldi r25,hi8(900) |
116 .L13: |
117 009a 9093 0000 sts (ppm.1753)+1,r25 |
118 009e 8093 0000 sts ppm.1753,r24 |
119 .L10: |
120 .LM13: |
121 00a2 2091 0000 lds r18,ppm_signal |
122 00a6 3091 0000 lds r19,(ppm_signal)+1 |
123 00aa C901 movw r24,r18 |
124 00ac 43E0 ldi r20,3 |
125 00ae 880F 1: lsl r24 |
126 00b0 991F rol r25 |
127 00b2 4A95 dec r20 |
128 00b4 01F4 brne 1b |
129 00b6 821B sub r24,r18 |
130 00b8 930B sbc r25,r19 |
131 00ba 2091 0000 lds r18,ppm.1753 |
132 00be 3091 0000 lds r19,(ppm.1753)+1 |
133 00c2 820F add r24,r18 |
134 00c4 931F adc r25,r19 |
135 00c6 23E0 ldi r18,3 |
136 00c8 9695 1: lsr r25 |
137 00ca 8795 ror r24 |
138 00cc 2A95 dec r18 |
139 00ce 01F4 brne 1b |
140 00d0 9093 0000 sts (ppm.1753)+1,r25 |
141 00d4 8093 0000 sts ppm.1753,r24 |
142 .LM14: |
143 00d8 9093 0000 sts (ppm_signal)+1,r25 |
144 00dc 8093 0000 sts ppm_signal,r24 |
145 .LM15: |
146 00e0 81E0 ldi r24,lo8(1) |
147 00e2 8093 0000 sts ppm_new,r24 |
148 .L12: |
149 /* epilogue: frame size=0 */ |
150 00e6 9F91 pop r25 |
151 00e8 8F91 pop r24 |
152 00ea 4F91 pop r20 |
153 00ec 3F91 pop r19 |
154 00ee 2F91 pop r18 |
155 00f0 0F90 pop __tmp_reg__ |
156 00f2 0FBE out __SREG__,__tmp_reg__ |
157 00f4 0F90 pop __tmp_reg__ |
158 00f6 1F90 pop __zero_reg__ |
159 00f8 1895 reti |
160 /* epilogue end (size=10) */ |
161 /* function __vector_5 size 110 (90) */ |
162 .LFE11: |
164 .global StartIRModulation |
166 StartIRModulation: |
167 .LFB12: |
168 .LM16: |
169 /* prologue: frame size=0 */ |
170 /* prologue end (size=0) */ |
171 .LM17: |
172 00fa 89E0 ldi r24,lo8(9) |
173 00fc 85BD out 69-0x20,r24 |
174 .LM18: |
175 00fe 8CE6 ldi r24,lo8(108) |
176 0100 83BD out 67-0x20,r24 |
177 .LM19: |
178 0102 85E0 ldi r24,lo8(5) |
179 0104 83BF out 83-0x20,r24 |
180 .LM20: |
181 0106 89B7 in r24,89-0x20 |
182 0108 8E7F andi r24,lo8(-2) |
183 010a 89BF out 89-0x20,r24 |
184 /* epilogue: frame size=0 */ |
185 010c 0895 ret |
186 /* epilogue end (size=1) */ |
187 /* function StartIRModulation size 10 (9) */ |
188 .LFE12: |
190 .global __vector_9 |
192 __vector_9: |
193 .LFB13: |
194 .LM21: |
195 /* prologue: frame size=0 */ |
196 010e 1F92 push __zero_reg__ |
197 0110 0F92 push __tmp_reg__ |
198 0112 0FB6 in __tmp_reg__,__SREG__ |
199 0114 0F92 push __tmp_reg__ |
200 0116 1124 clr __zero_reg__ |
201 0118 8F93 push r24 |
202 011a 9F93 push r25 |
203 /* prologue end (size=7) */ |
204 .LM22: |
205 011c 9091 0000 lds r25,IRstate |
206 0120 9230 cpi r25,lo8(2) |
207 0122 01F0 breq .L19 |
208 .LM23: |
209 0124 9330 cpi r25,lo8(3) |
210 0126 00F4 brsh .L22 |
211 0128 9130 cpi r25,lo8(1) |
212 012a 01F0 breq .+2 |
213 012c 00C0 rjmp .L17 |
214 012e 00C0 rjmp .L18 |
215 .L22: |
216 0130 9330 cpi r25,lo8(3) |
217 0132 01F0 breq .L20 |
218 0134 9430 cpi r25,lo8(4) |
219 0136 01F0 breq .+2 |
220 0138 00C0 rjmp .L17 |
221 013a 00C0 rjmp .L21 |
222 .L18: |
223 .LM24: |
224 013c 85B5 in r24,69-0x20 |
225 013e 8061 ori r24,lo8(16) |
226 0140 85BD out 69-0x20,r24 |
227 .LM25: |
228 0142 82E0 ldi r24,lo8(2) |
229 0144 8093 0000 sts IRstate,r24 |
230 .LM26: |
231 0148 1092 0000 sts IRbit,__zero_reg__ |
232 .LM27: |
233 014c 8AE9 ldi r24,lo8(-102) |
234 014e 00C0 rjmp .L32 |
235 .L19: |
236 .LM28: |
237 0150 85B5 in r24,69-0x20 |
238 0152 8F7E andi r24,lo8(-17) |
239 0154 85BD out 69-0x20,r24 |
240 .LM29: |
241 0156 83E0 ldi r24,lo8(3) |
242 0158 8093 0000 sts IRstate,r24 |
243 .LM30: |
244 015c 8091 0000 lds r24,IRdat |
245 0160 86FD sbrc r24,6 |
246 0162 00C0 rjmp .L24 |
247 0164 88EF ldi r24,lo8(-8) |
248 .L32: |
249 0166 82BF out 82-0x20,r24 |
250 0168 00C0 rjmp .L31 |
251 .L24: |
252 .LM31: |
253 016a 88EE ldi r24,lo8(-24) |
254 016c 00C0 rjmp .L32 |
255 .L20: |
256 .LM32: |
257 016e 85B5 in r24,69-0x20 |
258 0170 8061 ori r24,lo8(16) |
259 0172 85BD out 69-0x20,r24 |
260 .LM33: |
261 0174 88EF ldi r24,lo8(-8) |
262 0176 82BF out 82-0x20,r24 |
263 .LM34: |
264 0178 8091 0000 lds r24,IRdat |
265 017c 880F lsl r24 |
266 017e 8093 0000 sts IRdat,r24 |
267 .LM35: |
268 0182 8091 0000 lds r24,IRbit |
269 0186 8F5F subi r24,lo8(-(1)) |
270 0188 8093 0000 sts IRbit,r24 |
271 .LM36: |
272 018c 8091 0000 lds r24,IRbit |
273 0190 8730 cpi r24,lo8(7) |
274 0192 00F4 brsh .L26 |
275 0194 82E0 ldi r24,lo8(2) |
276 0196 8093 0000 sts IRstate,r24 |
277 019a 00C0 rjmp .L31 |
278 .L26: |
279 .LM37: |
280 019c 84E0 ldi r24,lo8(4) |
281 019e 8093 0000 sts IRstate,r24 |
282 .LM38: |
283 01a2 1092 0000 sts IRbit,__zero_reg__ |
284 01a6 00C0 rjmp .L31 |
285 .L21: |
286 .LM39: |
287 01a8 85B5 in r24,69-0x20 |
288 01aa 8F7E andi r24,lo8(-17) |
289 01ac 85BD out 69-0x20,r24 |
290 .LM40: |
291 01ae 8CE3 ldi r24,lo8(60) |
292 01b0 82BF out 82-0x20,r24 |
293 .LM41: |
294 01b2 8091 0000 lds r24,IRbit |
295 01b6 8431 cpi r24,lo8(20) |
296 01b8 00F4 brsh .L28 |
297 01ba 9093 0000 sts IRstate,r25 |
298 01be 00C0 rjmp .L30 |
299 .L28: |
300 .LM42: |
301 01c0 85E0 ldi r24,lo8(5) |
302 01c2 8093 0000 sts IRstate,r24 |
303 .L30: |
304 .LM43: |
305 01c6 8091 0000 lds r24,IRbit |
306 01ca 8F5F subi r24,lo8(-(1)) |
307 01cc 8093 0000 sts IRbit,r24 |
308 01d0 00C0 rjmp .L31 |
309 .L17: |
310 .LM44: |
311 01d2 89B7 in r24,89-0x20 |
312 01d4 8E7F andi r24,lo8(-2) |
313 01d6 89BF out 89-0x20,r24 |
314 .LM45: |
315 01d8 1092 0000 sts IRstate,__zero_reg__ |
316 .L31: |
317 /* epilogue: frame size=0 */ |
318 01dc 9F91 pop r25 |
319 01de 8F91 pop r24 |
320 01e0 0F90 pop __tmp_reg__ |
321 01e2 0FBE out __SREG__,__tmp_reg__ |
322 01e4 0F90 pop __tmp_reg__ |
323 01e6 1F90 pop __zero_reg__ |
324 01e8 1895 reti |
325 /* epilogue end (size=7) */ |
326 /* function __vector_9 size 110 (96) */ |
327 .LFE13: |
329 .global SendIRSignal |
331 SendIRSignal: |
332 .LFB14: |
333 .LM46: |
334 /* prologue: frame size=0 */ |
335 /* prologue end (size=0) */ |
336 .LVL0: |
337 01ea 982F mov r25,r24 |
338 .LVL1: |
339 .L35: |
340 .LM47: |
341 01ec 8091 0000 lds r24,IRstate |
342 01f0 8823 tst r24 |
343 01f2 01F4 brne .L35 |
344 .LM48: |
345 01f4 81E0 ldi r24,lo8(1) |
346 01f6 8093 0000 sts IRstate,r24 |
347 .LM49: |
348 01fa 9093 0000 sts IRdat,r25 |
349 .LM50: |
350 01fe 88B7 in r24,88-0x20 |
351 0200 18BE out 88-0x20,__zero_reg__ |
352 .LM51: |
353 0202 89B7 in r24,89-0x20 |
354 0204 8160 ori r24,lo8(1) |
355 0206 89BF out 89-0x20,r24 |
356 /* epilogue: frame size=0 */ |
357 0208 0895 ret |
358 /* epilogue end (size=1) */ |
359 /* function SendIRSignal size 16 (15) */ |
360 .LFE14: |
362 .global StartPPM |
364 StartPPM: |
365 .LFB15: |
366 .LM52: |
367 /* prologue: frame size=0 */ |
368 /* prologue end (size=0) */ |
369 .LM53: |
370 020a 1FBC out 79-0x20,__zero_reg__ |
371 .LM54: |
372 020c 82EC ldi r24,lo8(-62) |
373 020e 8EBD out 78-0x20,r24 |
374 .LM55: |
375 0210 89B7 in r24,89-0x20 |
376 0212 8462 ori r24,lo8(36) |
377 0214 89BF out 89-0x20,r24 |
378 /* epilogue: frame size=0 */ |
379 0216 0895 ret |
380 /* epilogue end (size=1) */ |
381 /* function StartPPM size 7 (6) */ |
382 .LFE15: |
384 .global GetPPM |
386 GetPPM: |
387 .LFB16: |
388 .LM56: |
389 /* prologue: frame size=0 */ |
390 /* prologue end (size=0) */ |
391 .LM57: |
392 0218 29B7 in r18,89-0x20 |
393 .LVL2: |
394 .LM58: |
395 021a 89B7 in r24,89-0x20 |
396 021c 8F7D andi r24,lo8(-33) |
397 021e 89BF out 89-0x20,r24 |
398 .LM59: |
399 0220 8091 0000 lds r24,ppm_signal |
400 0224 9091 0000 lds r25,(ppm_signal)+1 |
401 .LVL3: |
402 .LM60: |
403 0228 29BF out 89-0x20,r18 |
404 .LVL4: |
405 /* epilogue: frame size=0 */ |
406 022a 0895 ret |
407 /* epilogue end (size=1) */ |
408 /* function GetPPM size 10 (9) */ |
409 .LFE16: |
411 .global main |
413 main: |
414 .LFB17: |
415 .LM61: |
416 /* prologue: frame size=0 */ |
417 /* prologue end (size=0) */ |
418 .LM62: |
419 022c 88E0 ldi r24,lo8(8) |
420 022e 84BB out 52-0x20,r24 |
421 .LM63: |
422 0230 15BA out 53-0x20,__zero_reg__ |
423 .LM64: |
424 0232 80E8 ldi r24,lo8(-128) |
425 0234 81BB out 49-0x20,r24 |
426 .LM65: |
427 0236 12BA out 50-0x20,__zero_reg__ |
428 .LM66: |
429 0238 8EE0 ldi r24,lo8(14) |
430 023a 87BB out 55-0x20,r24 |
431 .LM67: |
432 023c 18BA out 56-0x20,__zero_reg__ |
433 .LM68: |
434 023e 00D0 rcall StartUART |
435 .LBB12: |
436 .LBB13: |
437 .LM69: |
438 0240 1FBC out 79-0x20,__zero_reg__ |
439 .LM70: |
440 0242 82EC ldi r24,lo8(-62) |
441 0244 8EBD out 78-0x20,r24 |
442 .LM71: |
443 0246 89B7 in r24,89-0x20 |
444 0248 8462 ori r24,lo8(36) |
445 024a 89BF out 89-0x20,r24 |
446 .LBE13: |
447 .LBE12: |
448 .LM72: |
449 024c 00D0 rcall StartIRModulation |
450 .LM73: |
451 /* #APP */ |
452 024e 7894 sei |
453 .LVL5: |
454 /* #NOAPP */ |
455 .L64: |
456 .LM74: |
457 0250 8091 0000 lds r24,ppm_new |
458 0254 8130 cpi r24,lo8(1) |
459 0256 01F4 brne .L64 |
460 .LM75: |
461 0258 1092 0000 sts ppm_new,__zero_reg__ |
462 .LBB14: |
463 .LBB15: |
464 .LM76: |
465 025c 89B7 in r24,89-0x20 |
466 .LVL6: |
467 .LM77: |
468 025e 99B7 in r25,89-0x20 |
469 0260 9F7D andi r25,lo8(-33) |
470 0262 99BF out 89-0x20,r25 |
471 .LM78: |
472 0264 2091 0000 lds r18,ppm_signal |
473 0268 3091 0000 lds r19,(ppm_signal)+1 |
474 .LVL7: |
475 .LM79: |
476 026c 89BF out 89-0x20,r24 |
477 .LBE15: |
478 .LBE14: |
479 .LM80: |
480 026e 275D subi r18,lo8(1751) |
481 0270 3640 sbci r19,hi8(1751) |
482 .LVL8: |
483 0272 04F0 brlt .L47 |
484 .LM81: |
485 0274 81E4 ldi r24,lo8(65) |
486 0276 00D0 rcall SendIRSignal |
487 .LVL9: |
488 .LM82: |
489 0278 AB9A sbi 53-0x20,3 |
490 .L49: |
491 .LBB16: |
492 .LBB17: |
493 .LM83: |
494 027a 89B7 in r24,89-0x20 |
495 .LVL10: |
496 .LM84: |
497 027c 99B7 in r25,89-0x20 |
498 027e 9F7D andi r25,lo8(-33) |
499 0280 99BF out 89-0x20,r25 |
500 .LM85: |
501 0282 2091 0000 lds r18,ppm_signal |
502 0286 3091 0000 lds r19,(ppm_signal)+1 |
503 .LVL11: |
504 .LM86: |
505 028a 89BF out 89-0x20,r24 |
506 .LBE17: |
507 .LBE16: |
508 .LM87: |
509 028c 2357 subi r18,lo8(1651) |
510 028e 3640 sbci r19,hi8(1651) |
511 .LVL12: |
512 0290 04F4 brge .L49 |
513 .LM88: |
514 0292 AB98 cbi 53-0x20,3 |
515 .LVL13: |
516 .L47: |
517 .LBB18: |
518 .LBB19: |
519 .LM89: |
520 0294 89B7 in r24,89-0x20 |
521 .LVL14: |
522 .LM90: |
523 0296 99B7 in r25,89-0x20 |
524 0298 9F7D andi r25,lo8(-33) |
525 029a 99BF out 89-0x20,r25 |
526 .LM91: |
527 029c 2091 0000 lds r18,ppm_signal |
528 02a0 3091 0000 lds r19,(ppm_signal)+1 |
529 .LVL15: |
530 .LM92: |
531 02a4 89BF out 89-0x20,r24 |
532 .LBE19: |
533 .LBE18: |
534 .LM93: |
535 02a6 225E subi r18,lo8(1250) |
536 02a8 3440 sbci r19,hi8(1250) |
537 .LVL16: |
538 02aa 04F4 brge .L64 |
539 .LM94: |
540 02ac 979A sbi 50-0x20,7 |
541 .LM95: |
542 02ae 80E4 ldi r24,lo8(64) |
543 02b0 00D0 rcall SendIRSignal |
544 .LVL17: |
545 .L52: |
546 .LBB20: |
547 .LBB21: |
548 .LM96: |
549 02b2 89B7 in r24,89-0x20 |
550 .LVL18: |
551 .LM97: |
552 02b4 99B7 in r25,89-0x20 |
553 02b6 9F7D andi r25,lo8(-33) |
554 02b8 99BF out 89-0x20,r25 |
555 .LM98: |
556 02ba 2091 0000 lds r18,ppm_signal |
557 02be 3091 0000 lds r19,(ppm_signal)+1 |
558 .LVL19: |
559 .LM99: |
560 02c2 89BF out 89-0x20,r24 |
561 .LBE21: |
562 .LBE20: |
563 .LM100: |
564 02c4 2654 subi r18,lo8(1350) |
565 02c6 3540 sbci r19,hi8(1350) |
566 .LVL20: |
567 02c8 04F0 brlt .L52 |
568 .LM101: |
569 02ca 9798 cbi 50-0x20,7 |
570 02cc 00C0 rjmp .L64 |
571 /* epilogue: frame size=0 */ |
572 /* epilogue: noreturn */ |
573 /* epilogue end (size=0) */ |
574 /* function main size 86 (86) */ |
575 .LFE17: |
577 .global ppm_signal |
578 .global ppm_signal |
579 .section .bss |
582 ppm_signal: |
583 0000 0000 .skip 2,0 |
584 .global ppm_new |
585 .global ppm_new |
588 ppm_new: |
589 0002 00 .skip 1,0 |
590 .global TMR1OvF |
591 .global TMR1OvF |
594 TMR1OvF: |
595 0003 00 .skip 1,0 |
596 .global IRstate |
597 .global IRstate |
600 IRstate: |
601 0004 00 .skip 1,0 |
602 .global IRdat |
603 .global IRdat |
606 IRdat: |
607 0005 00 .skip 1,0 |
608 .global IRbit |
609 .global IRbit |
612 IRbit: |
613 0006 00 .skip 1,0 |
614 .lcomm ppm.1753,2 |
615 .lcomm pos_ICR.1752,2 |
696 .Letext0: |
DEFINED SYMBOLS |
*ABS*:00000000 main.c |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:3 *ABS*:0000003f __SREG__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:4 *ABS*:0000003e __SP_H__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:5 *ABS*:0000003d __SP_L__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:6 *ABS*:00000000 __tmp_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:7 *ABS*:00000001 __zero_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:20 .text:00000000 __vector_8 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:594 .bss:00000003 TMR1OvF |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:48 .text:00000022 __vector_5 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:614 .bss:00000009 pos_ICR.1752 |
.bss:00000007 ppm.1753 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:582 .bss:00000000 ppm_signal |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:588 .bss:00000002 ppm_new |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:166 .text:000000fa StartIRModulation |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:192 .text:0000010e __vector_9 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:600 .bss:00000004 IRstate |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:612 .bss:00000006 IRbit |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:606 .bss:00000005 IRdat |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:331 .text:000001ea SendIRSignal |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:364 .text:0000020a StartPPM |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:386 .text:00000218 GetPPM |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:413 .text:0000022c main |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
StartUART |
/IR-TX-BL/tags/V0.02/makefile |
---|
0,0 → 1,387 |
#-------------------------------------------------------------------- |
# MCU name |
MCU = atmega8 |
#------------------------------------------------------------------- |
HAUPT_VERSION = 0 |
NEBEN_VERSION = 02 |
#------------------------------------------------------------------- |
# Output format. (can be srec, ihex, binary) |
FORMAT = ihex |
# Target file name (without extension). |
TARGET = IR-Tx_V$(HAUPT_VERSION)_$(NEBEN_VERSION) |
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization. |
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) |
OPT = s |
########################################################################################################## |
# List C source files here. (C dependencies are automatically generated.) |
SRC = main.c uart.c |
########################################################################################################## |
# If there is more than one source file, append them above, or modify and |
# uncomment the following: |
#SRC += foo.c bar.c |
# You can also wrap lines by appending a backslash to the end of the line: |
#SRC += baz.c \ |
#xyzzy.c |
# List Assembler source files here. |
# Make them always end in a capital .S. Files ending in a lowercase .s |
# will not be considered source files but generated files (assembler |
# output from the compiler), and will be deleted upon "make clean"! |
# Even though the DOS/Win* filesystem matches both .s and .S the same, |
# it will preserve the spelling of the filenames, and gcc itself does |
# care about how the name is spelled on its command-line. |
ASRC = |
# List any extra directories to look for include files here. |
# Each directory must be seperated by a space. |
EXTRAINCDIRS = |
# Optional compiler flags. |
# -g: generate debugging information (for GDB, or for COFF conversion) |
# -O*: optimization level |
# -f...: tuning, see gcc manual and avr-libc documentation |
# -Wall...: warning level |
# -Wa,...: tell GCC to pass this to the assembler. |
# -ahlms: create assembler listing |
CFLAGS = -g -O$(OPT) \ |
-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums \ |
-Wall -Wstrict-prototypes \ |
-Wa,-adhlns=$(<:.c=.lst) \ |
$(patsubst %,-I%,$(EXTRAINCDIRS)) |
# Set a "language standard" compiler flag. |
# Unremark just one line below to set the language standard to use. |
# gnu99 = C99 + GNU extensions. See GCC manual for more information. |
#CFLAGS += -std=c89 |
#CFLAGS += -std=gnu89 |
#CFLAGS += -std=c99 |
CFLAGS += -std=gnu99 |
CFLAGS += -DVERSION_HAUPTVERSION=$(HAUPT_VERSION) -DVERSION_NEBENVERSION=$(NEBEN_VERSION) |
ifeq ($(AVR_CTRL_PLATINE), 1) |
CFLAGS += -DAVR_CTRL_PLATINE=$(AVR_CTRL_PLATINE) |
endif |
# Optional assembler flags. |
# -Wa,...: tell GCC to pass this to the assembler. |
# -ahlms: create listing |
# -gstabs: have the assembler create line number information; note that |
# for use in COFF files, additional information about filenames |
# and function names needs to be present in the assembler source |
# files -- see avr-libc docs [FIXME: not yet described there] |
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs |
# Optional linker flags. |
# -Wl,...: tell GCC to pass this to linker. |
# -Map: create map file |
# --cref: add cross reference to map file |
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref |
# Additional libraries |
# Minimalistic printf version |
#LDFLAGS += -Wl,-u,vfprintf -lprintf_min |
# Floating point printf version (requires -lm below) |
#LDFLAGS += -Wl,-u,vfprintf -lprintf_flt |
# -lm = math library |
LDFLAGS += -lm |
# Programming support using avrdude. Settings and variables. |
# Programming hardware: alf avr910 avrisp bascom bsd |
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500 |
# |
# Type: avrdude -c ? |
# to get a full listing. |
# |
AVRDUDE_PROGRAMMER = ponyser |
#AVRDUDE_PROGRAMMER = stk200 |
#AVRDUDE_PORT = com1 # programmer connected to serial device |
AVRDUDE_PORT = com1 |
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex |
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep |
AVRDUDE_FLAGS = -F -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) |
# Uncomment the following if you want avrdude's erase cycle counter. |
# Note that this counter needs to be initialized first using -Yn, |
# see avrdude manual. |
#AVRDUDE_ERASE += -y |
# Uncomment the following if you do /not/ wish a verification to be |
# performed after programming the device. |
#AVRDUDE_FLAGS += -V -E noreset |
# Increase verbosity level. Please use this when submitting bug |
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> |
# to submit bug reports. |
#AVRDUDE_FLAGS += -v -v |
# --------------------------------------------------------------------------- |
# Define directories, if needed. |
DIRAVR = c:/winavr |
DIRAVRBIN = $(DIRAVR)/bin |
DIRAVRUTILS = $(DIRAVR)/utils/bin |
DIRINC = . |
DIRLIB = $(DIRAVR)/avr/lib |
# Define programs and commands. |
SHELL = sh |
CC = avr-gcc |
OBJCOPY = avr-objcopy |
OBJDUMP = avr-objdump |
SIZE = avr-size |
# Programming support using avrdude. |
AVRDUDE = avrdude |
REMOVE = rm -f |
COPY = cp |
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex |
ELFSIZE = $(SIZE) -A $(TARGET).elf |
# Define Messages |
# English |
MSG_ERRORS_NONE = Errors: none |
MSG_BEGIN = -------- begin -------- |
MSG_END = -------- end -------- |
MSG_SIZE_BEFORE = Size before: |
MSG_SIZE_AFTER = Size after: |
MSG_COFF = Converting to AVR COFF: |
MSG_EXTENDED_COFF = Converting to AVR Extended COFF: |
MSG_FLASH = Creating load file for Flash: |
MSG_EEPROM = Creating load file for EEPROM: |
MSG_EXTENDED_LISTING = Creating Extended Listing: |
MSG_SYMBOL_TABLE = Creating Symbol Table: |
MSG_LINKING = Linking: |
MSG_COMPILING = Compiling: |
MSG_ASSEMBLING = Assembling: |
MSG_CLEANING = Cleaning project: |
# Define all object files. |
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o) |
# Define all listing files. |
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst) |
# Combine all necessary flags and optional flags. |
# Add target processor to flags. |
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) |
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) |
# Default target. |
all: begin gccversion sizebefore $(TARGET).elf $(TARGET).hex $(TARGET).eep \ |
$(TARGET).lss $(TARGET).sym sizeafter finished end |
# Eye candy. |
# AVR Studio 3.x does not check make's exit code but relies on |
# the following magic strings to be generated by the compile job. |
begin: |
@echo |
@echo $(MSG_BEGIN) |
finished: |
@echo $(MSG_ERRORS_NONE) |
end: |
@echo $(MSG_END) |
@echo |
# Display size of file. |
sizebefore: |
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi |
sizeafter: |
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi |
# Display compiler version information. |
gccversion : |
@$(CC) --version |
# Convert ELF to COFF for use in debugging / simulating in |
# AVR Studio or VMLAB. |
COFFCONVERT=$(OBJCOPY) --debugging \ |
--change-section-address .data-0x800000 \ |
--change-section-address .bss-0x800000 \ |
--change-section-address .noinit-0x800000 \ |
--change-section-address .eeprom-0x810000 |
coff: $(TARGET).elf |
@echo |
@echo $(MSG_COFF) $(TARGET).cof |
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof |
extcoff: $(TARGET).elf |
@echo |
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof |
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof |
# Program the device. |
program: $(TARGET).hex $(TARGET).eep |
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) |
# Create final output files (.hex, .eep) from ELF output file. |
%.hex: %.elf |
@echo |
@echo $(MSG_FLASH) $@ |
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ |
%.eep: %.elf |
@echo |
@echo $(MSG_EEPROM) $@ |
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ |
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@ |
# Create extended listing file from ELF output file. |
%.lss: %.elf |
@echo |
@echo $(MSG_EXTENDED_LISTING) $@ |
$(OBJDUMP) -h -S $< > $@ |
# Create a symbol table from ELF output file. |
%.sym: %.elf |
@echo |
@echo $(MSG_SYMBOL_TABLE) $@ |
avr-nm -n $< > $@ |
# Link: create ELF output file from object files. |
.SECONDARY : $(TARGET).elf |
.PRECIOUS : $(OBJ) |
%.elf: $(OBJ) |
@echo |
@echo $(MSG_LINKING) $@ |
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS) |
# Compile: create object files from C source files. |
%.o : %.c |
@echo |
@echo $(MSG_COMPILING) $< |
$(CC) -c $(ALL_CFLAGS) $< -o $@ |
# Compile: create assembler files from C source files. |
%.s : %.c |
$(CC) -S $(ALL_CFLAGS) $< -o $@ |
# Assemble: create object files from assembler source files. |
%.o : %.S |
@echo |
@echo $(MSG_ASSEMBLING) $< |
$(CC) -c $(ALL_ASFLAGS) $< -o $@ |
# Target: clean project. |
clean: begin clean_list finished end |
clean_list : |
@echo |
@echo $(MSG_CLEANING) |
# $(REMOVE) $(TARGET).hex |
# $(REMOVE) $(TARGET).eep |
# $(REMOVE) $(TARGET).obj |
$(REMOVE) $(TARGET).cof |
$(REMOVE) $(TARGET).elf |
$(REMOVE) $(TARGET).map |
$(REMOVE) $(TARGET).obj |
$(REMOVE) $(TARGET).a90 |
$(REMOVE) $(TARGET).sym |
$(REMOVE) $(TARGET).lnk |
$(REMOVE) $(TARGET).lss |
$(REMOVE) $(OBJ) |
$(REMOVE) $(LST) |
$(REMOVE) $(SRC:.c=.s) |
$(REMOVE) $(SRC:.c=.d) |
# Automatically generate C source code dependencies. |
# (Code originally taken from the GNU make user manual and modified |
# (See README.txt Credits).) |
# |
# Note that this will work with sh (bash) and sed that is shipped with WinAVR |
# (see the SHELL variable defined above). |
# This may not work with other shells or other seds. |
# |
%.d: %.c |
set -e; $(CC) -MM $(ALL_CFLAGS) $< \ |
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > $@; \ |
[ -s $@ ] || rm -f $@ |
# Remove the '-' if you want to see the dependency files generated. |
-include $(SRC:.c=.d) |
# Listing of phony targets. |
.PHONY : all begin finish end sizebefore sizeafter gccversion coff extcoff \ |
clean clean_list program |
/IR-TX-BL/tags/V0.02/uart.c |
---|
0,0 → 1,38 |
//############################################################################ |
// - PPM2PentaxIR Uart for Debug only |
// - ATMEGA8 mit 8MHz |
// - Nur für den privaten Gebrauch |
// - Keine Garantie auf Fehlerfreiheit |
// - Kommerzielle Nutzung nur mit meiner Zustimmung |
// - walter Meyer @ www.freakware.de |
//############################################################################*/ |
#include "main.h" |
#include "uart.h" |
void StartUART(void) |
{ |
// UART Double Speed (U2X) |
UCSRA |= (1<<U2X); |
/* Enable receiver and transmitter, no RX Int, no TX Int */ |
UCSRB = (1<<RXEN)|(1<<TXEN); // (1<<RXCIE)|(1<<TXCIE) |
/* Set frame format: 8data, 1stop bit */ |
UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); |
//Teiler wird gesetzt |
UBRRL= (SYSCLK / (BAUD_RATE * 8L) -1 ); |
//öffnet einen Kanal für printf (STDOUT) |
fdevopen (uart_putchar, NULL); |
} |
int uart_putchar (char c) |
{ |
if (c == '\n') uart_putchar('\r'); |
loop_until_bit_is_set(UCSRA, UDRE); |
UDR = c; |
return (0); |
} |
/IR-TX-BL/tags/V0.02/uart.d |
---|
0,0 → 1,0 |
uart.o uart.d : uart.c main.h uart.h |
/IR-TX-BL/tags/V0.02/uart.h |
---|
0,0 → 1,11 |
#ifndef _UART_H |
#define _UART_H |
extern void StartUART (void); |
extern int uart_putchar (char c); |
#define BAUD_RATE 38400 //Baud Rate für die Serielle Schnittstelle |
#endif //_UART_H |
/IR-TX-BL/tags/V0.02/uart.lst |
---|
0,0 → 1,85 |
1 .file "uart.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
17 .Ltext0: |
18 .global uart_putchar |
20 uart_putchar: |
21 .LFB11: |
22 .LM1: |
23 /* prologue: frame size=0 */ |
24 0000 1F93 push r17 |
25 /* prologue end (size=1) */ |
26 .LVL0: |
27 0002 182F mov r17,r24 |
28 .LM2: |
29 0004 8A30 cpi r24,lo8(10) |
30 0006 01F4 brne .L6 |
31 .LM3: |
32 0008 8DE0 ldi r24,lo8(13) |
33 .LVL1: |
34 000a 00D0 rcall uart_putchar |
35 .LVL2: |
36 .L6: |
37 .LM4: |
38 000c 5D9B sbis 43-0x20,5 |
39 000e 00C0 rjmp .L6 |
40 .LM5: |
41 0010 1CB9 out 44-0x20,r17 |
42 .LM6: |
43 0012 80E0 ldi r24,lo8(0) |
44 0014 90E0 ldi r25,hi8(0) |
45 /* epilogue: frame size=0 */ |
46 0016 1F91 pop r17 |
47 0018 0895 ret |
48 /* epilogue end (size=2) */ |
49 /* function uart_putchar size 13 (10) */ |
50 .LFE11: |
52 .global StartUART |
54 StartUART: |
55 .LFB10: |
56 .LM7: |
57 /* prologue: frame size=0 */ |
58 /* prologue end (size=0) */ |
59 .LM8: |
60 001a 599A sbi 43-0x20,1 |
61 .LM9: |
62 001c 88E1 ldi r24,lo8(24) |
63 001e 8AB9 out 42-0x20,r24 |
64 .LM10: |
65 0020 86E8 ldi r24,lo8(-122) |
66 0022 80BD out 64-0x20,r24 |
67 .LM11: |
68 0024 89E1 ldi r24,lo8(25) |
69 0026 89B9 out 41-0x20,r24 |
70 .LM12: |
71 0028 60E0 ldi r22,lo8(0) |
72 002a 70E0 ldi r23,hi8(0) |
73 002c 80E0 ldi r24,lo8(gs(uart_putchar)) |
74 002e 90E0 ldi r25,hi8(gs(uart_putchar)) |
75 0030 00D0 rcall fdevopen |
76 /* epilogue: frame size=0 */ |
77 0032 0895 ret |
78 /* epilogue end (size=1) */ |
79 /* function StartUART size 13 (12) */ |
80 .LFE10: |
114 .Letext0: |
DEFINED SYMBOLS |
*ABS*:00000000 uart.c |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:3 *ABS*:0000003f __SREG__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:4 *ABS*:0000003e __SP_H__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:5 *ABS*:0000003d __SP_L__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:6 *ABS*:00000000 __tmp_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:7 *ABS*:00000001 __zero_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:20 .text:00000000 uart_putchar |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:54 .text:0000001a StartUART |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
fdevopen |
/IR-TX-BL/trunk/V0.02/Doku/IR-Ctrl_Schaltplan.GIF |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/IR-TX-BL/trunk/V0.02/Doku/README.TXT |
---|
0,0 → 1,77 |
Readme zur "PPM2PentaxIR" (geändert 2.12.2007) |
Auslösen und Zoomen von Pentax Fotokameres per IR, gesteuert durch Servoausgang (PPM) |
Hardwarebasis für die Entwicklung ist eine unbestückte Holger BL-CTRL V1.0 Platinen. |
Auf dieser Platinen wurden lediglich folgende Bauteile bestückt. |
(Bauteilwerte wie bei original BL Bestückung beibehalten) |
IC1 ATMEGA8 - A |
R3 100 |
R10 18K |
R26 4K7 |
R27 1K |
R33 1K |
R32 10 |
C3 100n |
C7 100n |
C11 100n |
C12 10uF/16V |
LED1 LED0805 Grün |
LED2 LED0805 Rot |
Es läst sich natürlich LED1 und LED2 sowie die zugehörigen Vorwiderstände (R27 und R33) einsparen falls man diese eh nicht verwenden möchte, |
zumal Sie eher für Debugzwecke eingesetzt wurden. |
Das PPM Signal (vom Servoausgang) muss an das PPM Pad der BL Platine (Pin12 ATMEGA) |
Masse kann praktisch an einen beliebigen Massepunkt an der BL Platinen. Die Versorgungsspannung geht bei mir einfach direkt an das Ausgangspad |
des nicht vorhanden Spannungsreglers (IC2) bzw. an den Anschlusspunkt welcher auf der BL Paltine mit 5V versehen ist. |
Da kein Spannungsregler verwendet wird ist strickt darauf zu achten, das keine zu hohen Spannungen für die Versorgung verwendet werden, |
die üblichen 4,5 bis 5,x Volt eines Empfänger Ausgangs kann der Amtel gut ab. Besser wäre es natürlich einen Spannungsregler zu verwenden, |
dann aber statt des 5V Reglers einen 3.3 Volt Typ. Hier sollte dann jedoch der RC Oscilator des Atmegas geprüft werden, da zu erwarten ist |
das die Frequenz nicht mehr besonders gut stimmt (tut sie 5V wohl auch nicht) |
Die IR Diode (ich habe fast beliebige Typen ausprobiert welche ich im Bestand hatte) wird an Masse und an das Basispad des nicht bestückten T1 angeschlossen. |
Hierbei dient R3 nun als Vorwiderstand für die LED, deshalb ist R3 auch der einzige Widerstand welcher gegenüber der original BL Bestückung vom Wert her |
geändert ist. |
Wichtig: |
Beim Programieren des ATMegas muß auf die richtigen Fusesettings geachtet werden, der Controller muß mit internem 8Mhz Osc laufen. |
Ich habe zum setzen der Fusebits PonyPorg verwendet. |
Das Programieren des Controller läuft bei mir mit AVRdude unter "Programmers Notepad" aus der WinAVR Installation. |
Wird das mitgelieferte "makefile" verwendet so ist dort als Programmer "PonySer auf Com1" ausgewähl, so das man mit einem Sercon Interface direkt |
aus WinAvr das Programm auf den ATMega progen kann. (geht nur per echter Seriel Schnittstelle, kein USB zu RS232 Wandler) |
Die Bedienung ist derzeit relativ einfach. Bei Mittelstellung des Kanals (Knüppel Mittel) passiert nichts, wird der Kanal nun in die eine Richtung |
gesteuert so wird eine neue Zoomstufe eingestellt (drei Zoomstuffen gibt es bei der Pentax per IR Steuerung), wird der Kanal in |
die andere Richtung gesteuert, so wird ein Bild ausgelöst. |
Schaltpunkte sind derzeit fix bei ca. nach oben 1750us und 1250us nach unten jeweils mit einer Hysterese von 100us. |
Eine normale Graupneranlage gibt üblicherweise bei Kanal Mittelstellung etwas 1500us aus, mit einem Hub in beide Richtungen von ca. 600us |
(bei 100% Servoweg), also 1100us bis 1900us. Somit liegen die Schaltpunkte etwa auf halbem Weg. |
Anzumerken ist jedoch, das der Interne RC Oscilator des ATMEGA8 ohne spezielle Kalibrierung nicht besonders genau ist und somit doch ganz |
schöne Abweichungen auftretten können. Hiermit verschieben sich dann natürlich auch die Schaltpunkte nach oben oder unten. |
Es befindet sich sicher noch die ein oder andere Stelle im Code welche man besser machen oder eleganter lösen könnte. |
Das ganze ist mein erstes Atmel AVR Project und dann auch noch in C , ich bin eigentlich ein eingefleischter |
PIC Assembler Fritze :-) also verzeiht mir den Programmierstiel zumal das ganze innerhalb eines Tages fertig wurde. |
Wenn jemand gerne andere IR Codes ausgeben lassen möchte und genau weis wie diese ausehen, bzw. ich dies rausfinden kann so bin ich auch gerne |
bereits das zu implementieren. |
Viel Spaß beim nachbauen und verbessern. |
Walter Meyer |
30.11.2007 |
freakware GmbH division south |
/IR-TX-BL/trunk/V0.02/IR-Tx.pnproj |
---|
0,0 → 1,0 |
<Project name="IR-Tx"><File path="main.c"></File><File path="main.h"></File><File path="uart.h"></File><File path="uart.c"></File></Project> |
/IR-TX-BL/trunk/V0.02/IR-Tx.pnps |
---|
0,0 → 1,0 |
<pd><ViewState><e p="IR-Tx" x="true"></e></ViewState></pd> |
/IR-TX-BL/trunk/V0.02/IR-Tx.pnws |
---|
0,0 → 1,0 |
<Workspace><File path="c:\mikrokopter\ir-tx_\trunk\v0.02\main.c"></File><Project path="c:\mikrokopter\ir-tx_\trunk\v0.02\ir-tx.pnproj"></Project></Workspace> |
/IR-TX-BL/trunk/V0.02/IR-Tx_V0_02.elf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/IR-TX-BL/trunk/V0.02/IR-Tx_V0_02.hex |
---|
0,0 → 1,105 |
:1000000012C02CC02BC02AC029C03AC027C026C0AD |
:1000100026C0ACC023C022C021C020C01FC01EC04B |
:100020001DC01CC01BC011241FBECFE5D4E0DEBF25 |
:10003000CDBF10E0A0E6B0E0E4E6F6E002C0059037 |
:100040000D92A636B107D9F710E0A6E6B0E001C0E0 |
:100050001D92AB37B107E1F718D103C3D1CF1F927F |
:100060000F920FB60F9211248F93809169008F5FCA |
:10007000809369008F910F900FBE0F901F9018957D |
:100080001F920F920FB60F9211242F933F934F930D |
:100090008F939F930EB406FE0CC08EB58F7B8EBDE2 |
:1000A0001092690086B597B59093700080936F00A9 |
:1000B00049C08EB580648EBD26B537B58091690084 |
:1000C00080916F0090917000281B390B30936E0067 |
:1000D00020936D00C901895592408750974090F553 |
:1000E00088E02533380718F084E398E005C02458E9 |
:1000F000334030F484E893E090936E0080936D0079 |
:100100002091660030916700C90143E0880F991F74 |
:100110004A95E1F7821B930B20916D0030916E00A0 |
:10012000820F931F23E0969587952A95E1F7909388 |
:100130006E0080936D00909367008093660081E06D |
:10014000809368009F918F914F913F912F910F90D5 |
:100150000FBE0F901F90189589E085BD8CE683BD7A |
:1001600085E083BF89B78E7F89BF08951F920F9264 |
:100170000FB60F9211248F939F9390916A00923043 |
:10018000B1F0933020F4913009F052C006C09330A2 |
:10019000E9F0943009F04CC036C085B5806185BD6A |
:1001A00082E080936A0010926C008AE90BC085B5EA |
:1001B0008F7E85BD83E080936A0080916B0086FD11 |
:1001C00003C088EF82BF39C088EEFCCF85B580615F |
:1001D00085BD88EF82BF80916B00880F80936B0094 |
:1001E00080916C008F5F80936C0080916C008730F1 |
:1001F00020F482E080936A0020C084E080936A004B |
:1002000010926C001AC085B58F7E85BD8CE382BFCD |
:1002100080916C00843118F490936A0003C085E0EB |
:1002200080936A0080916C008F5F80936C0005C0A2 |
:1002300089B78E7F89BF10926A009F918F910F902E |
:100240000FBE0F901F901895982F80916A008823F9 |
:10025000E1F781E080936A0090936B0088B718BE45 |
:1002600089B7816089BF08951FBC82EC8EBD89B7B4 |
:10027000846289BF089529B789B78F7D89BF80912E |
:1002800066009091670029BF089588E084BB15BA85 |
:1002900080E881BB12BA8EE087BB18BA54D01FBC6D |
:1002A00082EC8EBD89B7846289BF56DF78948091D5 |
:1002B00068008130E1F71092680089B799B79F7D97 |
:1002C00099BF209166003091670089BF275D364055 |
:1002D00084F081E4B9DFAB9A89B799B79F7D99BF64 |
:1002E000209166003091670089BF23573640A4F7FC |
:1002F000AB9889B799B79F7D99BF209166003091DF |
:10030000670089BF225E344094F6979A80E49CDFB0 |
:1003100089B799B79F7D99BF20916600309167009A |
:1003200089BF26543540A4F39798C1CF1F93182F47 |
:100330008A3011F48DE0FADF5D9BFECF1CB980E0BE |
:1003400090E01F910895599A88E18AB986E880BDA6 |
:1003500089E189B960E070E086E991E001D0089513 |
:10036000EF92FF920F931F93CF93DF938C017B014A |
:10037000892B11F4672BC9F16EE070E081E090E009 |
:100380003BD0FC01009789F1DC0180E88383E11414 |
:10039000F10471F0F386E28681E883838091710035 |
:1003A00090917200892B21F4F0937200E093710018 |
:1003B00001151105E1F01187008783818260838335 |
:1003C0008091730090917400892B89F4F0937400EC |
:1003D000E09373008091750090917600892B39F439 |
:1003E000F0937600E093750002C0A0E0B0E0CD018C |
:1003F000E6E0CDB7DEB726C10F931F93CF93DF930F |
:10040000869F8001879F100D969F100D1124C801B3 |
:100410000DD0EC01009721F0A80160E070E0FFD062 |
:10042000CE01DF91CF911F910F910895CF93DF936C |
:10043000AC01029710F442E050E0A0917900B09135 |
:100440007A00FD01C0E0D0E020E030E020C08081F3 |
:1004500091818417950769F482819381209719F01F |
:100460009B838A8304C090937A0080937900CF01A4 |
:1004700032C04817590738F42115310519F0821791 |
:10048000930708F49C01EF010280F381E02D30977F |
:10049000F1F62115310589F1C901841B950B0497EB |
:1004A00008F4A901E0E0F0E026C08D919C9111973D |
:1004B00082179307E9F44817590779F4ED018A8107 |
:1004C0009B81309719F09383828304C090937A00C4 |
:1004D00080937900CD01029649C0841B950BFD01E4 |
:1004E000E80FF91F4193519302978D939C933AC063 |
:1004F000FD01A281B3811097C1F6809177009091A0 |
:100500007800892B41F48091620090916300909370 |
:100510007800809377002091640030916500211568 |
:10052000310541F42DB73EB7809160009091610094 |
:10053000281B390BE0917700F09178002E1B3F0BC0 |
:100540002417350788F0CA0102962817390760F08A |
:10055000CF01840F951F02969093780080937700C7 |
:1005600041935193CF0102C080E090E0DF91CF91A1 |
:100570000895CF93DF93009709F44EC0EC012297C2 |
:100580001B821A82A0917900B0917A00109711F124 |
:1005900040E050E001C0DC01AC17BD0700F1BB83B7 |
:1005A000AA83FE0121913191E20FF31FEA17FB07A5 |
:1005B00071F42E5F3F4F8D919C911197820F931F85 |
:1005C00099838883FD01828193819B838A8341156E |
:1005D000510559F4D0937A00C09379001DC0FD01F4 |
:1005E00082819381AD010097B1F6FA01D383C28372 |
:1005F00021913191E20FF31FEC17FD0769F42E5F93 |
:100600003F4F88819981820F931FFA0191838083E4 |
:100610008A819B8193838283DF91CF910895DC014E |
:1006200001C06D9341505040E0F708952A88398801 |
:1006300048885F846E847D848C849B84AA84B9847A |
:10064000C884DF80EE80FD800C811B81AA81B98186 |
:10065000CE0FD11D0FB6F894DEBF0FBECDBFED019A |
:040660000895FFCF2B |
:0606640020007B000000F5 |
:00000001FF |
/IR-TX-BL/trunk/V0.02/IR-Tx_V0_02.lss |
---|
0,0 → 1,1016 |
IR-Tx_V0_02.elf: file format elf32-avr |
Sections: |
Idx Name Size VMA LMA File off Algn |
0 .text 00000664 00000000 00000000 00000094 2**1 |
CONTENTS, ALLOC, LOAD, READONLY, CODE |
1 .data 00000006 00800060 00000664 000006f8 2**0 |
CONTENTS, ALLOC, LOAD, DATA |
2 .bss 00000015 00800066 00800066 000006fe 2**0 |
ALLOC |
3 .stab 00000378 00000000 00000000 00000700 2**2 |
CONTENTS, READONLY, DEBUGGING |
4 .stabstr 00000071 00000000 00000000 00000a78 2**0 |
CONTENTS, READONLY, DEBUGGING |
5 .debug_aranges 00000040 00000000 00000000 00000ae9 2**0 |
CONTENTS, READONLY, DEBUGGING |
6 .debug_pubnames 000000ff 00000000 00000000 00000b29 2**0 |
CONTENTS, READONLY, DEBUGGING |
7 .debug_info 0000036d 00000000 00000000 00000c28 2**0 |
CONTENTS, READONLY, DEBUGGING |
8 .debug_abbrev 000001b4 00000000 00000000 00000f95 2**0 |
CONTENTS, READONLY, DEBUGGING |
9 .debug_line 0000059c 00000000 00000000 00001149 2**0 |
CONTENTS, READONLY, DEBUGGING |
10 .debug_frame 000000c0 00000000 00000000 000016e8 2**2 |
CONTENTS, READONLY, DEBUGGING |
11 .debug_str 0000013a 00000000 00000000 000017a8 2**0 |
CONTENTS, READONLY, DEBUGGING |
12 .debug_loc 00000130 00000000 00000000 000018e2 2**0 |
CONTENTS, READONLY, DEBUGGING |
Disassembly of section .text: |
00000000 <__vectors>: |
0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end> |
2: 2c c0 rjmp .+88 ; 0x5c <__bad_interrupt> |
4: 2b c0 rjmp .+86 ; 0x5c <__bad_interrupt> |
6: 2a c0 rjmp .+84 ; 0x5c <__bad_interrupt> |
8: 29 c0 rjmp .+82 ; 0x5c <__bad_interrupt> |
a: 3a c0 rjmp .+116 ; 0x80 <__vector_5> |
c: 27 c0 rjmp .+78 ; 0x5c <__bad_interrupt> |
e: 26 c0 rjmp .+76 ; 0x5c <__bad_interrupt> |
10: 26 c0 rjmp .+76 ; 0x5e <__vector_8> |
12: ac c0 rjmp .+344 ; 0x16c <__vector_9> |
14: 23 c0 rjmp .+70 ; 0x5c <__bad_interrupt> |
16: 22 c0 rjmp .+68 ; 0x5c <__bad_interrupt> |
18: 21 c0 rjmp .+66 ; 0x5c <__bad_interrupt> |
1a: 20 c0 rjmp .+64 ; 0x5c <__bad_interrupt> |
1c: 1f c0 rjmp .+62 ; 0x5c <__bad_interrupt> |
1e: 1e c0 rjmp .+60 ; 0x5c <__bad_interrupt> |
20: 1d c0 rjmp .+58 ; 0x5c <__bad_interrupt> |
22: 1c c0 rjmp .+56 ; 0x5c <__bad_interrupt> |
24: 1b c0 rjmp .+54 ; 0x5c <__bad_interrupt> |
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 e6 ldi r30, 0x64 ; 100 |
3a: f6 e0 ldi r31, 0x06 ; 6 |
3c: 02 c0 rjmp .+4 ; 0x42 <.do_copy_data_start> |
0000003e <.do_copy_data_loop>: |
3e: 05 90 lpm r0, Z+ |
40: 0d 92 st X+, r0 |
00000042 <.do_copy_data_start>: |
42: a6 36 cpi r26, 0x66 ; 102 |
44: b1 07 cpc r27, r17 |
46: d9 f7 brne .-10 ; 0x3e <.do_copy_data_loop> |
00000048 <__do_clear_bss>: |
48: 10 e0 ldi r17, 0x00 ; 0 |
4a: a6 e6 ldi r26, 0x66 ; 102 |
4c: b0 e0 ldi r27, 0x00 ; 0 |
4e: 01 c0 rjmp .+2 ; 0x52 <.do_clear_bss_start> |
00000050 <.do_clear_bss_loop>: |
50: 1d 92 st X+, r1 |
00000052 <.do_clear_bss_start>: |
52: ab 37 cpi r26, 0x7B ; 123 |
54: b1 07 cpc r27, r17 |
56: e1 f7 brne .-8 ; 0x50 <.do_clear_bss_loop> |
58: 18 d1 rcall .+560 ; 0x28a <main> |
5a: 03 c3 rjmp .+1542 ; 0x662 <_exit> |
0000005c <__bad_interrupt>: |
5c: d1 cf rjmp .-94 ; 0x0 <__vectors> |
0000005e <__vector_8>: |
volatile unsigned char IRbit = 0; |
SIGNAL(SIG_OVERFLOW1) |
{ |
5e: 1f 92 push r1 |
60: 0f 92 push r0 |
62: 0f b6 in r0, 0x3f ; 63 |
64: 0f 92 push r0 |
66: 11 24 eor r1, r1 |
68: 8f 93 push r24 |
TMR1OvF++; |
6a: 80 91 69 00 lds r24, 0x0069 |
6e: 8f 5f subi r24, 0xFF ; 255 |
70: 80 93 69 00 sts 0x0069, r24 |
74: 8f 91 pop r24 |
76: 0f 90 pop r0 |
78: 0f be out 0x3f, r0 ; 63 |
7a: 0f 90 pop r0 |
7c: 1f 90 pop r1 |
7e: 18 95 reti |
00000080 <__vector_5>: |
} |
SIGNAL(SIG_INPUT_CAPTURE1) |
{ |
80: 1f 92 push r1 |
82: 0f 92 push r0 |
84: 0f b6 in r0, 0x3f ; 63 |
86: 0f 92 push r0 |
88: 11 24 eor r1, r1 |
8a: 2f 93 push r18 |
8c: 3f 93 push r19 |
8e: 4f 93 push r20 |
90: 8f 93 push r24 |
92: 9f 93 push r25 |
static unsigned int pos_ICR; |
static unsigned int ppm; |
if ((TCCR1B & (1<<ICES1)) != 0) |
94: 0e b4 in r0, 0x2e ; 46 |
96: 06 fe sbrs r0, 6 |
98: 0c c0 rjmp .+24 ; 0xb2 <__vector_5+0x32> |
{ |
TCCR1B &= ~(1<<ICES1); //invert trigger |
9a: 8e b5 in r24, 0x2e ; 46 |
9c: 8f 7b andi r24, 0xBF ; 191 |
9e: 8e bd out 0x2e, r24 ; 46 |
TMR1OvF = 0; |
a0: 10 92 69 00 sts 0x0069, r1 |
pos_ICR = ICR1; |
a4: 86 b5 in r24, 0x26 ; 38 |
a6: 97 b5 in r25, 0x27 ; 39 |
a8: 90 93 70 00 sts 0x0070, r25 |
ac: 80 93 6f 00 sts 0x006F, r24 |
b0: 49 c0 rjmp .+146 ; 0x144 <__vector_5+0xc4> |
} |
else //Negative Flanke |
{ |
TCCR1B |= (1<<ICES1); |
b2: 8e b5 in r24, 0x2e ; 46 |
b4: 80 64 ori r24, 0x40 ; 64 |
b6: 8e bd out 0x2e, r24 ; 46 |
ppm = (ICR1 - pos_ICR + (int) TMR1OvF * 65536); |
b8: 26 b5 in r18, 0x26 ; 38 |
ba: 37 b5 in r19, 0x27 ; 39 |
bc: 80 91 69 00 lds r24, 0x0069 |
c0: 80 91 6f 00 lds r24, 0x006F |
c4: 90 91 70 00 lds r25, 0x0070 |
c8: 28 1b sub r18, r24 |
ca: 39 0b sbc r19, r25 |
cc: 30 93 6e 00 sts 0x006E, r19 |
d0: 20 93 6d 00 sts 0x006D, r18 |
if ((ppm > 600) && (ppm < 2400)) |
d4: c9 01 movw r24, r18 |
d6: 89 55 subi r24, 0x59 ; 89 |
d8: 92 40 sbci r25, 0x02 ; 2 |
da: 87 50 subi r24, 0x07 ; 7 |
dc: 97 40 sbci r25, 0x07 ; 7 |
de: 90 f5 brcc .+100 ; 0x144 <__vector_5+0xc4> |
{ |
if (ppm > 2100) ppm = 2100; |
e0: 88 e0 ldi r24, 0x08 ; 8 |
e2: 25 33 cpi r18, 0x35 ; 53 |
e4: 38 07 cpc r19, r24 |
e6: 18 f0 brcs .+6 ; 0xee <__vector_5+0x6e> |
e8: 84 e3 ldi r24, 0x34 ; 52 |
ea: 98 e0 ldi r25, 0x08 ; 8 |
ec: 05 c0 rjmp .+10 ; 0xf8 <__vector_5+0x78> |
if (ppm < 900) ppm = 900; |
ee: 24 58 subi r18, 0x84 ; 132 |
f0: 33 40 sbci r19, 0x03 ; 3 |
f2: 30 f4 brcc .+12 ; 0x100 <__vector_5+0x80> |
f4: 84 e8 ldi r24, 0x84 ; 132 |
f6: 93 e0 ldi r25, 0x03 ; 3 |
f8: 90 93 6e 00 sts 0x006E, r25 |
fc: 80 93 6d 00 sts 0x006D, r24 |
ppm = (ppm_signal * 7 + ppm) / 8; |
100: 20 91 66 00 lds r18, 0x0066 |
104: 30 91 67 00 lds r19, 0x0067 |
108: c9 01 movw r24, r18 |
10a: 43 e0 ldi r20, 0x03 ; 3 |
10c: 88 0f add r24, r24 |
10e: 99 1f adc r25, r25 |
110: 4a 95 dec r20 |
112: e1 f7 brne .-8 ; 0x10c <__vector_5+0x8c> |
114: 82 1b sub r24, r18 |
116: 93 0b sbc r25, r19 |
118: 20 91 6d 00 lds r18, 0x006D |
11c: 30 91 6e 00 lds r19, 0x006E |
120: 82 0f add r24, r18 |
122: 93 1f adc r25, r19 |
124: 23 e0 ldi r18, 0x03 ; 3 |
126: 96 95 lsr r25 |
128: 87 95 ror r24 |
12a: 2a 95 dec r18 |
12c: e1 f7 brne .-8 ; 0x126 <__vector_5+0xa6> |
12e: 90 93 6e 00 sts 0x006E, r25 |
132: 80 93 6d 00 sts 0x006D, r24 |
ppm_signal = ppm; |
136: 90 93 67 00 sts 0x0067, r25 |
13a: 80 93 66 00 sts 0x0066, r24 |
ppm_new = 1; |
13e: 81 e0 ldi r24, 0x01 ; 1 |
140: 80 93 68 00 sts 0x0068, r24 |
144: 9f 91 pop r25 |
146: 8f 91 pop r24 |
148: 4f 91 pop r20 |
14a: 3f 91 pop r19 |
14c: 2f 91 pop r18 |
14e: 0f 90 pop r0 |
150: 0f be out 0x3f, r0 ; 63 |
152: 0f 90 pop r0 |
154: 1f 90 pop r1 |
156: 18 95 reti |
00000158 <StartIRModulation>: |
} |
} |
} |
/*##############################################################################*/ |
void StartIRModulation(void) |
{ |
158: 89 e0 ldi r24, 0x09 ; 9 |
15a: 85 bd out 0x25, r24 ; 37 |
//Timer1 Config for generation the 38Khz IR Modulation |
TCCR2 = (0<<FOC2)|(0<<WGM20)|(0<<COM21)|(0<<COM20)| |
(1<<WGM21) |(0<<CS22) |(0<<CS21) |(1<<CS20); |
OCR2 = 108; //~38Khz @ 8Mhz |
15c: 8c e6 ldi r24, 0x6C ; 108 |
15e: 83 bd out 0x23, r24 ; 35 |
//Timer 0 Config for getting right timing for IR Pattern |
TCCR0 = (1<<CS02)|(0<<CS01)|(1<<CS00); // clk(@8MHz) / 1024 = 128us / clk (resolution) |
160: 85 e0 ldi r24, 0x05 ; 5 |
162: 83 bf out 0x33, r24 ; 51 |
TIMSK &= ~(1<<TOIE0); // |
164: 89 b7 in r24, 0x39 ; 57 |
166: 8e 7f andi r24, 0xFE ; 254 |
168: 89 bf out 0x39, r24 ; 57 |
16a: 08 95 ret |
0000016c <__vector_9>: |
} |
SIGNAL(SIG_OVERFLOW0) |
{ |
16c: 1f 92 push r1 |
16e: 0f 92 push r0 |
170: 0f b6 in r0, 0x3f ; 63 |
172: 0f 92 push r0 |
174: 11 24 eor r1, r1 |
176: 8f 93 push r24 |
178: 9f 93 push r25 |
switch (IRstate) |
17a: 90 91 6a 00 lds r25, 0x006A |
17e: 92 30 cpi r25, 0x02 ; 2 |
180: b1 f0 breq .+44 ; 0x1ae <__vector_9+0x42> |
182: 93 30 cpi r25, 0x03 ; 3 |
184: 20 f4 brcc .+8 ; 0x18e <__vector_9+0x22> |
186: 91 30 cpi r25, 0x01 ; 1 |
188: 09 f0 breq .+2 ; 0x18c <__vector_9+0x20> |
18a: 52 c0 rjmp .+164 ; 0x230 <__vector_9+0xc4> |
18c: 06 c0 rjmp .+12 ; 0x19a <__vector_9+0x2e> |
18e: 93 30 cpi r25, 0x03 ; 3 |
190: e9 f0 breq .+58 ; 0x1cc <__vector_9+0x60> |
192: 94 30 cpi r25, 0x04 ; 4 |
194: 09 f0 breq .+2 ; 0x198 <__vector_9+0x2c> |
196: 4c c0 rjmp .+152 ; 0x230 <__vector_9+0xc4> |
198: 36 c0 rjmp .+108 ; 0x206 <__vector_9+0x9a> |
{ |
case 1: |
TCCR2 setbit (1<<COM20); |
19a: 85 b5 in r24, 0x25 ; 37 |
19c: 80 61 ori r24, 0x10 ; 16 |
19e: 85 bd out 0x25, r24 ; 37 |
IRstate = 2; |
1a0: 82 e0 ldi r24, 0x02 ; 2 |
1a2: 80 93 6a 00 sts 0x006A, r24 |
IRbit = 0; |
1a6: 10 92 6c 00 sts 0x006C, r1 |
TCNT0 = 255 - (13000 / 128); |
1aa: 8a e9 ldi r24, 0x9A ; 154 |
1ac: 0b c0 rjmp .+22 ; 0x1c4 <__vector_9+0x58> |
break; |
case 2: |
TCCR2 clrbit (1<<COM20); |
1ae: 85 b5 in r24, 0x25 ; 37 |
1b0: 8f 7e andi r24, 0xEF ; 239 |
1b2: 85 bd out 0x25, r24 ; 37 |
IRstate = 3; |
1b4: 83 e0 ldi r24, 0x03 ; 3 |
1b6: 80 93 6a 00 sts 0x006A, r24 |
if ((IRdat & 0x40) == 0) TCNT0 = 255 - (1000 / 128); |
1ba: 80 91 6b 00 lds r24, 0x006B |
1be: 86 fd sbrc r24, 6 |
1c0: 03 c0 rjmp .+6 ; 0x1c8 <__vector_9+0x5c> |
1c2: 88 ef ldi r24, 0xF8 ; 248 |
1c4: 82 bf out 0x32, r24 ; 50 |
1c6: 39 c0 rjmp .+114 ; 0x23a <__vector_9+0xce> |
else TCNT0 = 255 - (3000 / 128); |
1c8: 88 ee ldi r24, 0xE8 ; 232 |
1ca: fc cf rjmp .-8 ; 0x1c4 <__vector_9+0x58> |
break; |
case 3: |
TCCR2 setbit (1<<COM20); |
1cc: 85 b5 in r24, 0x25 ; 37 |
1ce: 80 61 ori r24, 0x10 ; 16 |
1d0: 85 bd out 0x25, r24 ; 37 |
TCNT0 = 255 - (1000 / 128); |
1d2: 88 ef ldi r24, 0xF8 ; 248 |
1d4: 82 bf out 0x32, r24 ; 50 |
IRdat = IRdat << 1; |
1d6: 80 91 6b 00 lds r24, 0x006B |
1da: 88 0f add r24, r24 |
1dc: 80 93 6b 00 sts 0x006B, r24 |
IRbit++; |
1e0: 80 91 6c 00 lds r24, 0x006C |
1e4: 8f 5f subi r24, 0xFF ; 255 |
1e6: 80 93 6c 00 sts 0x006C, r24 |
if (IRbit < 7) IRstate = 2; |
1ea: 80 91 6c 00 lds r24, 0x006C |
1ee: 87 30 cpi r24, 0x07 ; 7 |
1f0: 20 f4 brcc .+8 ; 0x1fa <__vector_9+0x8e> |
1f2: 82 e0 ldi r24, 0x02 ; 2 |
1f4: 80 93 6a 00 sts 0x006A, r24 |
1f8: 20 c0 rjmp .+64 ; 0x23a <__vector_9+0xce> |
else |
{ |
IRstate = 4; |
1fa: 84 e0 ldi r24, 0x04 ; 4 |
1fc: 80 93 6a 00 sts 0x006A, r24 |
IRbit = 0; |
200: 10 92 6c 00 sts 0x006C, r1 |
204: 1a c0 rjmp .+52 ; 0x23a <__vector_9+0xce> |
} |
break; |
case 4: |
TCCR2 clrbit (1<<COM20); |
206: 85 b5 in r24, 0x25 ; 37 |
208: 8f 7e andi r24, 0xEF ; 239 |
20a: 85 bd out 0x25, r24 ; 37 |
TCNT0 = 255 - (25000 / 128); |
20c: 8c e3 ldi r24, 0x3C ; 60 |
20e: 82 bf out 0x32, r24 ; 50 |
if (IRbit < 20) IRstate = 4; |
210: 80 91 6c 00 lds r24, 0x006C |
214: 84 31 cpi r24, 0x14 ; 20 |
216: 18 f4 brcc .+6 ; 0x21e <__vector_9+0xb2> |
218: 90 93 6a 00 sts 0x006A, r25 |
21c: 03 c0 rjmp .+6 ; 0x224 <__vector_9+0xb8> |
else IRstate = 5; |
21e: 85 e0 ldi r24, 0x05 ; 5 |
220: 80 93 6a 00 sts 0x006A, r24 |
IRbit++; |
224: 80 91 6c 00 lds r24, 0x006C |
228: 8f 5f subi r24, 0xFF ; 255 |
22a: 80 93 6c 00 sts 0x006C, r24 |
22e: 05 c0 rjmp .+10 ; 0x23a <__vector_9+0xce> |
break; |
default: |
TIMSK &= ~(1<<TOIE0); |
230: 89 b7 in r24, 0x39 ; 57 |
232: 8e 7f andi r24, 0xFE ; 254 |
234: 89 bf out 0x39, r24 ; 57 |
IRstate = 0; |
236: 10 92 6a 00 sts 0x006A, r1 |
23a: 9f 91 pop r25 |
23c: 8f 91 pop r24 |
23e: 0f 90 pop r0 |
240: 0f be out 0x3f, r0 ; 63 |
242: 0f 90 pop r0 |
244: 1f 90 pop r1 |
246: 18 95 reti |
00000248 <SendIRSignal>: |
break; |
} |
} |
/*##############################################################################*/ |
void SendIRSignal(unsigned char txbyte) |
{ |
248: 98 2f mov r25, r24 |
while (IRstate != 0) {} //IR already in action ?, if so, wait |
24a: 80 91 6a 00 lds r24, 0x006A |
24e: 88 23 and r24, r24 |
250: e1 f7 brne .-8 ; 0x24a <SendIRSignal+0x2> |
IRstate = 1; //initial State |
252: 81 e0 ldi r24, 0x01 ; 1 |
254: 80 93 6a 00 sts 0x006A, r24 |
IRdat = txbyte; //copy IR Data |
258: 90 93 6b 00 sts 0x006B, r25 |
TIFR &= TOV0; //set TMR0 Int Flag |
25c: 88 b7 in r24, 0x38 ; 56 |
25e: 18 be out 0x38, r1 ; 56 |
TIMSK setbit (1<<TOIE0); //Enable TMR0 Int |
260: 89 b7 in r24, 0x39 ; 57 |
262: 81 60 ori r24, 0x01 ; 1 |
264: 89 bf out 0x39, r24 ; 57 |
266: 08 95 ret |
00000268 <StartPPM>: |
} |
/*##############################################################################*/ |
void StartPPM(void) |
{ |
268: 1f bc out 0x2f, r1 ; 47 |
//global timer1 Config |
TCCR1A = (0<<COM1A1)|(0<<COM1A0)|(0<<COM1B1)|(0<<COM1B0)| |
(0<<FOC1A) |(0<<FOC1B) |(0<<WGM10) |(0<<WGM11); |
TCCR1B = (1<<ICNC1)|(1<<ICES1)|(0<<WGM13)| |
26a: 82 ec ldi r24, 0xC2 ; 194 |
26c: 8e bd out 0x2e, r24 ; 46 |
(0<<WGM12)|(0<<CS12)|(1<<CS11)|(0<<CS10); //ICP_POS_FLANKE |
// interrupts |
TIMSK |= (1<<TICIE1)|(1<<TOIE1); //ICP_INT_ENABLE and TIMER1_INT_ENABLE |
26e: 89 b7 in r24, 0x39 ; 57 |
270: 84 62 ori r24, 0x24 ; 36 |
272: 89 bf out 0x39, r24 ; 57 |
274: 08 95 ret |
00000276 <GetPPM>: |
} |
int GetPPM(void) |
{ |
276: 29 b7 in r18, 0x39 ; 57 |
//this routines seems to be nesseccary, as reading a 16 bit value |
//on a 8 bit machine is not atomic, so if an interrupt apears between reading |
//low and high byte of the 16 bit value a wrong result is possible |
unsigned char intmask; |
unsigned int ppm_temp; |
intmask = TIMSK; //backup interupt enable bits |
TIMSK &= ~(1<<TICIE1); //disable ppm interrupt |
278: 89 b7 in r24, 0x39 ; 57 |
27a: 8f 7d andi r24, 0xDF ; 223 |
27c: 89 bf out 0x39, r24 ; 57 |
ppm_temp = ppm_signal; |
27e: 80 91 66 00 lds r24, 0x0066 |
282: 90 91 67 00 lds r25, 0x0067 |
TIMSK = intmask; //restore interupt enable bits |
286: 29 bf out 0x39, r18 ; 57 |
288: 08 95 ret |
0000028a <main>: |
return(ppm_temp); //return ppm_signal |
} |
/*##############################################################################*/ |
// MAIN |
/*##############################################################################*/ |
int main (void) |
{ |
28a: 88 e0 ldi r24, 0x08 ; 8 |
28c: 84 bb out 0x14, r24 ; 20 |
DDRC = (1<<ledred); |
PORTC = 0x00; |
28e: 15 ba out 0x15, r1 ; 21 |
DDRD = (1<<ledgreen); |
290: 80 e8 ldi r24, 0x80 ; 128 |
292: 81 bb out 0x11, r24 ; 17 |
PORTD = 0x00; |
294: 12 ba out 0x12, r1 ; 18 |
DDRB = (1<<1)|(1<<2)|(1<<3); |
296: 8e e0 ldi r24, 0x0E ; 14 |
298: 87 bb out 0x17, r24 ; 23 |
PORTB = 0x00; |
29a: 18 ba out 0x18, r1 ; 24 |
StartUART(); |
29c: 54 d0 rcall .+168 ; 0x346 <StartUART> |
29e: 1f bc out 0x2f, r1 ; 47 |
2a0: 82 ec ldi r24, 0xC2 ; 194 |
2a2: 8e bd out 0x2e, r24 ; 46 |
2a4: 89 b7 in r24, 0x39 ; 57 |
2a6: 84 62 ori r24, 0x24 ; 36 |
2a8: 89 bf out 0x39, r24 ; 57 |
StartPPM(); |
StartIRModulation(); |
2aa: 56 df rcall .-340 ; 0x158 <StartIRModulation> |
sei(); |
2ac: 78 94 sei |
while (1) |
{ |
//printf("%d ",ppm_signal); |
if (ppm_new == 1) |
2ae: 80 91 68 00 lds r24, 0x0068 |
2b2: 81 30 cpi r24, 0x01 ; 1 |
2b4: e1 f7 brne .-8 ; 0x2ae <main+0x24> |
{ |
ppm_new = 0; |
2b6: 10 92 68 00 sts 0x0068, r1 |
2ba: 89 b7 in r24, 0x39 ; 57 |
2bc: 99 b7 in r25, 0x39 ; 57 |
2be: 9f 7d andi r25, 0xDF ; 223 |
2c0: 99 bf out 0x39, r25 ; 57 |
2c2: 20 91 66 00 lds r18, 0x0066 |
2c6: 30 91 67 00 lds r19, 0x0067 |
2ca: 89 bf out 0x39, r24 ; 57 |
if (GetPPM() > 1750) |
2cc: 27 5d subi r18, 0xD7 ; 215 |
2ce: 36 40 sbci r19, 0x06 ; 6 |
2d0: 84 f0 brlt .+32 ; 0x2f2 <main+0x68> |
{ |
SendIRSignal(ZOOM); |
2d2: 81 e4 ldi r24, 0x41 ; 65 |
2d4: b9 df rcall .-142 ; 0x248 <SendIRSignal> |
PORTC |= (1<<ledred); |
2d6: ab 9a sbi 0x15, 3 ; 21 |
2d8: 89 b7 in r24, 0x39 ; 57 |
2da: 99 b7 in r25, 0x39 ; 57 |
2dc: 9f 7d andi r25, 0xDF ; 223 |
2de: 99 bf out 0x39, r25 ; 57 |
2e0: 20 91 66 00 lds r18, 0x0066 |
2e4: 30 91 67 00 lds r19, 0x0067 |
2e8: 89 bf out 0x39, r24 ; 57 |
while (GetPPM() > 1650) {} |
2ea: 23 57 subi r18, 0x73 ; 115 |
2ec: 36 40 sbci r19, 0x06 ; 6 |
2ee: a4 f7 brge .-24 ; 0x2d8 <main+0x4e> |
PORTC &= ~(1<<ledred); |
2f0: ab 98 cbi 0x15, 3 ; 21 |
2f2: 89 b7 in r24, 0x39 ; 57 |
2f4: 99 b7 in r25, 0x39 ; 57 |
2f6: 9f 7d andi r25, 0xDF ; 223 |
2f8: 99 bf out 0x39, r25 ; 57 |
2fa: 20 91 66 00 lds r18, 0x0066 |
2fe: 30 91 67 00 lds r19, 0x0067 |
302: 89 bf out 0x39, r24 ; 57 |
} |
if (GetPPM() < 1250) |
304: 22 5e subi r18, 0xE2 ; 226 |
306: 34 40 sbci r19, 0x04 ; 4 |
308: 94 f6 brge .-92 ; 0x2ae <main+0x24> |
{ |
PORTD |= (1<<ledgreen); |
30a: 97 9a sbi 0x12, 7 ; 18 |
SendIRSignal(TRIGGER); |
30c: 80 e4 ldi r24, 0x40 ; 64 |
30e: 9c df rcall .-200 ; 0x248 <SendIRSignal> |
310: 89 b7 in r24, 0x39 ; 57 |
312: 99 b7 in r25, 0x39 ; 57 |
314: 9f 7d andi r25, 0xDF ; 223 |
316: 99 bf out 0x39, r25 ; 57 |
318: 20 91 66 00 lds r18, 0x0066 |
31c: 30 91 67 00 lds r19, 0x0067 |
320: 89 bf out 0x39, r24 ; 57 |
while (GetPPM() < 1350) {} |
322: 26 54 subi r18, 0x46 ; 70 |
324: 35 40 sbci r19, 0x05 ; 5 |
326: a4 f3 brlt .-24 ; 0x310 <main+0x86> |
PORTD &= ~(1<<ledgreen); |
328: 97 98 cbi 0x12, 7 ; 18 |
32a: c1 cf rjmp .-126 ; 0x2ae <main+0x24> |
0000032c <uart_putchar>: |
} |
int uart_putchar (char c) |
{ |
32c: 1f 93 push r17 |
32e: 18 2f mov r17, r24 |
if (c == '\n') uart_putchar('\r'); |
330: 8a 30 cpi r24, 0x0A ; 10 |
332: 11 f4 brne .+4 ; 0x338 <uart_putchar+0xc> |
334: 8d e0 ldi r24, 0x0D ; 13 |
336: fa df rcall .-12 ; 0x32c <uart_putchar> |
loop_until_bit_is_set(UCSRA, UDRE); |
338: 5d 9b sbis 0x0b, 5 ; 11 |
33a: fe cf rjmp .-4 ; 0x338 <uart_putchar+0xc> |
UDR = c; |
33c: 1c b9 out 0x0c, r17 ; 12 |
return (0); |
} |
33e: 80 e0 ldi r24, 0x00 ; 0 |
340: 90 e0 ldi r25, 0x00 ; 0 |
342: 1f 91 pop r17 |
344: 08 95 ret |
00000346 <StartUART>: |
346: 59 9a sbi 0x0b, 1 ; 11 |
348: 88 e1 ldi r24, 0x18 ; 24 |
34a: 8a b9 out 0x0a, r24 ; 10 |
34c: 86 e8 ldi r24, 0x86 ; 134 |
34e: 80 bd out 0x20, r24 ; 32 |
350: 89 e1 ldi r24, 0x19 ; 25 |
352: 89 b9 out 0x09, r24 ; 9 |
354: 60 e0 ldi r22, 0x00 ; 0 |
356: 70 e0 ldi r23, 0x00 ; 0 |
358: 86 e9 ldi r24, 0x96 ; 150 |
35a: 91 e0 ldi r25, 0x01 ; 1 |
35c: 01 d0 rcall .+2 ; 0x360 <fdevopen> |
35e: 08 95 ret |
00000360 <fdevopen>: |
360: ef 92 push r14 |
362: ff 92 push r15 |
364: 0f 93 push r16 |
366: 1f 93 push r17 |
368: cf 93 push r28 |
36a: df 93 push r29 |
36c: 8c 01 movw r16, r24 |
36e: 7b 01 movw r14, r22 |
370: 89 2b or r24, r25 |
372: 11 f4 brne .+4 ; 0x378 <fdevopen+0x18> |
374: 67 2b or r22, r23 |
376: c9 f1 breq .+114 ; 0x3ea <fdevopen+0x8a> |
378: 6e e0 ldi r22, 0x0E ; 14 |
37a: 70 e0 ldi r23, 0x00 ; 0 |
37c: 81 e0 ldi r24, 0x01 ; 1 |
37e: 90 e0 ldi r25, 0x00 ; 0 |
380: 3b d0 rcall .+118 ; 0x3f8 <calloc> |
382: fc 01 movw r30, r24 |
384: 00 97 sbiw r24, 0x00 ; 0 |
386: 89 f1 breq .+98 ; 0x3ea <fdevopen+0x8a> |
388: dc 01 movw r26, r24 |
38a: 80 e8 ldi r24, 0x80 ; 128 |
38c: 83 83 std Z+3, r24 ; 0x03 |
38e: e1 14 cp r14, r1 |
390: f1 04 cpc r15, r1 |
392: 71 f0 breq .+28 ; 0x3b0 <fdevopen+0x50> |
394: f3 86 std Z+11, r15 ; 0x0b |
396: e2 86 std Z+10, r14 ; 0x0a |
398: 81 e8 ldi r24, 0x81 ; 129 |
39a: 83 83 std Z+3, r24 ; 0x03 |
39c: 80 91 71 00 lds r24, 0x0071 |
3a0: 90 91 72 00 lds r25, 0x0072 |
3a4: 89 2b or r24, r25 |
3a6: 21 f4 brne .+8 ; 0x3b0 <fdevopen+0x50> |
3a8: f0 93 72 00 sts 0x0072, r31 |
3ac: e0 93 71 00 sts 0x0071, r30 |
3b0: 01 15 cp r16, r1 |
3b2: 11 05 cpc r17, r1 |
3b4: e1 f0 breq .+56 ; 0x3ee <fdevopen+0x8e> |
3b6: 11 87 std Z+9, r17 ; 0x09 |
3b8: 00 87 std Z+8, r16 ; 0x08 |
3ba: 83 81 ldd r24, Z+3 ; 0x03 |
3bc: 82 60 ori r24, 0x02 ; 2 |
3be: 83 83 std Z+3, r24 ; 0x03 |
3c0: 80 91 73 00 lds r24, 0x0073 |
3c4: 90 91 74 00 lds r25, 0x0074 |
3c8: 89 2b or r24, r25 |
3ca: 89 f4 brne .+34 ; 0x3ee <fdevopen+0x8e> |
3cc: f0 93 74 00 sts 0x0074, r31 |
3d0: e0 93 73 00 sts 0x0073, r30 |
3d4: 80 91 75 00 lds r24, 0x0075 |
3d8: 90 91 76 00 lds r25, 0x0076 |
3dc: 89 2b or r24, r25 |
3de: 39 f4 brne .+14 ; 0x3ee <fdevopen+0x8e> |
3e0: f0 93 76 00 sts 0x0076, r31 |
3e4: e0 93 75 00 sts 0x0075, r30 |
3e8: 02 c0 rjmp .+4 ; 0x3ee <fdevopen+0x8e> |
3ea: a0 e0 ldi r26, 0x00 ; 0 |
3ec: b0 e0 ldi r27, 0x00 ; 0 |
3ee: cd 01 movw r24, r26 |
3f0: e6 e0 ldi r30, 0x06 ; 6 |
3f2: cd b7 in r28, 0x3d ; 61 |
3f4: de b7 in r29, 0x3e ; 62 |
3f6: 26 c1 rjmp .+588 ; 0x644 <__epilogue_restores__+0x18> |
000003f8 <calloc>: |
3f8: 0f 93 push r16 |
3fa: 1f 93 push r17 |
3fc: cf 93 push r28 |
3fe: df 93 push r29 |
400: 86 9f mul r24, r22 |
402: 80 01 movw r16, r0 |
404: 87 9f mul r24, r23 |
406: 10 0d add r17, r0 |
408: 96 9f mul r25, r22 |
40a: 10 0d add r17, r0 |
40c: 11 24 eor r1, r1 |
40e: c8 01 movw r24, r16 |
410: 0d d0 rcall .+26 ; 0x42c <malloc> |
412: ec 01 movw r28, r24 |
414: 00 97 sbiw r24, 0x00 ; 0 |
416: 21 f0 breq .+8 ; 0x420 <calloc+0x28> |
418: a8 01 movw r20, r16 |
41a: 60 e0 ldi r22, 0x00 ; 0 |
41c: 70 e0 ldi r23, 0x00 ; 0 |
41e: ff d0 rcall .+510 ; 0x61e <memset> |
420: ce 01 movw r24, r28 |
422: df 91 pop r29 |
424: cf 91 pop r28 |
426: 1f 91 pop r17 |
428: 0f 91 pop r16 |
42a: 08 95 ret |
0000042c <malloc>: |
42c: cf 93 push r28 |
42e: df 93 push r29 |
430: ac 01 movw r20, r24 |
432: 02 97 sbiw r24, 0x02 ; 2 |
434: 10 f4 brcc .+4 ; 0x43a <malloc+0xe> |
436: 42 e0 ldi r20, 0x02 ; 2 |
438: 50 e0 ldi r21, 0x00 ; 0 |
43a: a0 91 79 00 lds r26, 0x0079 |
43e: b0 91 7a 00 lds r27, 0x007A |
442: fd 01 movw r30, r26 |
444: c0 e0 ldi r28, 0x00 ; 0 |
446: d0 e0 ldi r29, 0x00 ; 0 |
448: 20 e0 ldi r18, 0x00 ; 0 |
44a: 30 e0 ldi r19, 0x00 ; 0 |
44c: 20 c0 rjmp .+64 ; 0x48e <__stack+0x2f> |
44e: 80 81 ld r24, Z |
450: 91 81 ldd r25, Z+1 ; 0x01 |
452: 84 17 cp r24, r20 |
454: 95 07 cpc r25, r21 |
456: 69 f4 brne .+26 ; 0x472 <__stack+0x13> |
458: 82 81 ldd r24, Z+2 ; 0x02 |
45a: 93 81 ldd r25, Z+3 ; 0x03 |
45c: 20 97 sbiw r28, 0x00 ; 0 |
45e: 19 f0 breq .+6 ; 0x466 <__stack+0x7> |
460: 9b 83 std Y+3, r25 ; 0x03 |
462: 8a 83 std Y+2, r24 ; 0x02 |
464: 04 c0 rjmp .+8 ; 0x46e <__stack+0xf> |
466: 90 93 7a 00 sts 0x007A, r25 |
46a: 80 93 79 00 sts 0x0079, r24 |
46e: cf 01 movw r24, r30 |
470: 32 c0 rjmp .+100 ; 0x4d6 <__stack+0x77> |
472: 48 17 cp r20, r24 |
474: 59 07 cpc r21, r25 |
476: 38 f4 brcc .+14 ; 0x486 <__stack+0x27> |
478: 21 15 cp r18, r1 |
47a: 31 05 cpc r19, r1 |
47c: 19 f0 breq .+6 ; 0x484 <__stack+0x25> |
47e: 82 17 cp r24, r18 |
480: 93 07 cpc r25, r19 |
482: 08 f4 brcc .+2 ; 0x486 <__stack+0x27> |
484: 9c 01 movw r18, r24 |
486: ef 01 movw r28, r30 |
488: 02 80 ldd r0, Z+2 ; 0x02 |
48a: f3 81 ldd r31, Z+3 ; 0x03 |
48c: e0 2d mov r30, r0 |
48e: 30 97 sbiw r30, 0x00 ; 0 |
490: f1 f6 brne .-68 ; 0x44e <malloc+0x22> |
492: 21 15 cp r18, r1 |
494: 31 05 cpc r19, r1 |
496: 89 f1 breq .+98 ; 0x4fa <__stack+0x9b> |
498: c9 01 movw r24, r18 |
49a: 84 1b sub r24, r20 |
49c: 95 0b sbc r25, r21 |
49e: 04 97 sbiw r24, 0x04 ; 4 |
4a0: 08 f4 brcc .+2 ; 0x4a4 <__stack+0x45> |
4a2: a9 01 movw r20, r18 |
4a4: e0 e0 ldi r30, 0x00 ; 0 |
4a6: f0 e0 ldi r31, 0x00 ; 0 |
4a8: 26 c0 rjmp .+76 ; 0x4f6 <__stack+0x97> |
4aa: 8d 91 ld r24, X+ |
4ac: 9c 91 ld r25, X |
4ae: 11 97 sbiw r26, 0x01 ; 1 |
4b0: 82 17 cp r24, r18 |
4b2: 93 07 cpc r25, r19 |
4b4: e9 f4 brne .+58 ; 0x4f0 <__stack+0x91> |
4b6: 48 17 cp r20, r24 |
4b8: 59 07 cpc r21, r25 |
4ba: 79 f4 brne .+30 ; 0x4da <__stack+0x7b> |
4bc: ed 01 movw r28, r26 |
4be: 8a 81 ldd r24, Y+2 ; 0x02 |
4c0: 9b 81 ldd r25, Y+3 ; 0x03 |
4c2: 30 97 sbiw r30, 0x00 ; 0 |
4c4: 19 f0 breq .+6 ; 0x4cc <__stack+0x6d> |
4c6: 93 83 std Z+3, r25 ; 0x03 |
4c8: 82 83 std Z+2, r24 ; 0x02 |
4ca: 04 c0 rjmp .+8 ; 0x4d4 <__stack+0x75> |
4cc: 90 93 7a 00 sts 0x007A, r25 |
4d0: 80 93 79 00 sts 0x0079, r24 |
4d4: cd 01 movw r24, r26 |
4d6: 02 96 adiw r24, 0x02 ; 2 |
4d8: 49 c0 rjmp .+146 ; 0x56c <__stack+0x10d> |
4da: 84 1b sub r24, r20 |
4dc: 95 0b sbc r25, r21 |
4de: fd 01 movw r30, r26 |
4e0: e8 0f add r30, r24 |
4e2: f9 1f adc r31, r25 |
4e4: 41 93 st Z+, r20 |
4e6: 51 93 st Z+, r21 |
4e8: 02 97 sbiw r24, 0x02 ; 2 |
4ea: 8d 93 st X+, r24 |
4ec: 9c 93 st X, r25 |
4ee: 3a c0 rjmp .+116 ; 0x564 <__stack+0x105> |
4f0: fd 01 movw r30, r26 |
4f2: a2 81 ldd r26, Z+2 ; 0x02 |
4f4: b3 81 ldd r27, Z+3 ; 0x03 |
4f6: 10 97 sbiw r26, 0x00 ; 0 |
4f8: c1 f6 brne .-80 ; 0x4aa <__stack+0x4b> |
4fa: 80 91 77 00 lds r24, 0x0077 |
4fe: 90 91 78 00 lds r25, 0x0078 |
502: 89 2b or r24, r25 |
504: 41 f4 brne .+16 ; 0x516 <__stack+0xb7> |
506: 80 91 62 00 lds r24, 0x0062 |
50a: 90 91 63 00 lds r25, 0x0063 |
50e: 90 93 78 00 sts 0x0078, r25 |
512: 80 93 77 00 sts 0x0077, r24 |
516: 20 91 64 00 lds r18, 0x0064 |
51a: 30 91 65 00 lds r19, 0x0065 |
51e: 21 15 cp r18, r1 |
520: 31 05 cpc r19, r1 |
522: 41 f4 brne .+16 ; 0x534 <__stack+0xd5> |
524: 2d b7 in r18, 0x3d ; 61 |
526: 3e b7 in r19, 0x3e ; 62 |
528: 80 91 60 00 lds r24, 0x0060 |
52c: 90 91 61 00 lds r25, 0x0061 |
530: 28 1b sub r18, r24 |
532: 39 0b sbc r19, r25 |
534: e0 91 77 00 lds r30, 0x0077 |
538: f0 91 78 00 lds r31, 0x0078 |
53c: 2e 1b sub r18, r30 |
53e: 3f 0b sbc r19, r31 |
540: 24 17 cp r18, r20 |
542: 35 07 cpc r19, r21 |
544: 88 f0 brcs .+34 ; 0x568 <__stack+0x109> |
546: ca 01 movw r24, r20 |
548: 02 96 adiw r24, 0x02 ; 2 |
54a: 28 17 cp r18, r24 |
54c: 39 07 cpc r19, r25 |
54e: 60 f0 brcs .+24 ; 0x568 <__stack+0x109> |
550: cf 01 movw r24, r30 |
552: 84 0f add r24, r20 |
554: 95 1f adc r25, r21 |
556: 02 96 adiw r24, 0x02 ; 2 |
558: 90 93 78 00 sts 0x0078, r25 |
55c: 80 93 77 00 sts 0x0077, r24 |
560: 41 93 st Z+, r20 |
562: 51 93 st Z+, r21 |
564: cf 01 movw r24, r30 |
566: 02 c0 rjmp .+4 ; 0x56c <__stack+0x10d> |
568: 80 e0 ldi r24, 0x00 ; 0 |
56a: 90 e0 ldi r25, 0x00 ; 0 |
56c: df 91 pop r29 |
56e: cf 91 pop r28 |
570: 08 95 ret |
00000572 <free>: |
572: cf 93 push r28 |
574: df 93 push r29 |
576: 00 97 sbiw r24, 0x00 ; 0 |
578: 09 f4 brne .+2 ; 0x57c <free+0xa> |
57a: 4e c0 rjmp .+156 ; 0x618 <free+0xa6> |
57c: ec 01 movw r28, r24 |
57e: 22 97 sbiw r28, 0x02 ; 2 |
580: 1b 82 std Y+3, r1 ; 0x03 |
582: 1a 82 std Y+2, r1 ; 0x02 |
584: a0 91 79 00 lds r26, 0x0079 |
588: b0 91 7a 00 lds r27, 0x007A |
58c: 10 97 sbiw r26, 0x00 ; 0 |
58e: 11 f1 breq .+68 ; 0x5d4 <free+0x62> |
590: 40 e0 ldi r20, 0x00 ; 0 |
592: 50 e0 ldi r21, 0x00 ; 0 |
594: 01 c0 rjmp .+2 ; 0x598 <free+0x26> |
596: dc 01 movw r26, r24 |
598: ac 17 cp r26, r28 |
59a: bd 07 cpc r27, r29 |
59c: 00 f1 brcs .+64 ; 0x5de <free+0x6c> |
59e: bb 83 std Y+3, r27 ; 0x03 |
5a0: aa 83 std Y+2, r26 ; 0x02 |
5a2: fe 01 movw r30, r28 |
5a4: 21 91 ld r18, Z+ |
5a6: 31 91 ld r19, Z+ |
5a8: e2 0f add r30, r18 |
5aa: f3 1f adc r31, r19 |
5ac: ea 17 cp r30, r26 |
5ae: fb 07 cpc r31, r27 |
5b0: 71 f4 brne .+28 ; 0x5ce <free+0x5c> |
5b2: 2e 5f subi r18, 0xFE ; 254 |
5b4: 3f 4f sbci r19, 0xFF ; 255 |
5b6: 8d 91 ld r24, X+ |
5b8: 9c 91 ld r25, X |
5ba: 11 97 sbiw r26, 0x01 ; 1 |
5bc: 82 0f add r24, r18 |
5be: 93 1f adc r25, r19 |
5c0: 99 83 std Y+1, r25 ; 0x01 |
5c2: 88 83 st Y, r24 |
5c4: fd 01 movw r30, r26 |
5c6: 82 81 ldd r24, Z+2 ; 0x02 |
5c8: 93 81 ldd r25, Z+3 ; 0x03 |
5ca: 9b 83 std Y+3, r25 ; 0x03 |
5cc: 8a 83 std Y+2, r24 ; 0x02 |
5ce: 41 15 cp r20, r1 |
5d0: 51 05 cpc r21, r1 |
5d2: 59 f4 brne .+22 ; 0x5ea <free+0x78> |
5d4: d0 93 7a 00 sts 0x007A, r29 |
5d8: c0 93 79 00 sts 0x0079, r28 |
5dc: 1d c0 rjmp .+58 ; 0x618 <free+0xa6> |
5de: fd 01 movw r30, r26 |
5e0: 82 81 ldd r24, Z+2 ; 0x02 |
5e2: 93 81 ldd r25, Z+3 ; 0x03 |
5e4: ad 01 movw r20, r26 |
5e6: 00 97 sbiw r24, 0x00 ; 0 |
5e8: b1 f6 brne .-84 ; 0x596 <free+0x24> |
5ea: fa 01 movw r30, r20 |
5ec: d3 83 std Z+3, r29 ; 0x03 |
5ee: c2 83 std Z+2, r28 ; 0x02 |
5f0: 21 91 ld r18, Z+ |
5f2: 31 91 ld r19, Z+ |
5f4: e2 0f add r30, r18 |
5f6: f3 1f adc r31, r19 |
5f8: ec 17 cp r30, r28 |
5fa: fd 07 cpc r31, r29 |
5fc: 69 f4 brne .+26 ; 0x618 <free+0xa6> |
5fe: 2e 5f subi r18, 0xFE ; 254 |
600: 3f 4f sbci r19, 0xFF ; 255 |
602: 88 81 ld r24, Y |
604: 99 81 ldd r25, Y+1 ; 0x01 |
606: 82 0f add r24, r18 |
608: 93 1f adc r25, r19 |
60a: fa 01 movw r30, r20 |
60c: 91 83 std Z+1, r25 ; 0x01 |
60e: 80 83 st Z, r24 |
610: 8a 81 ldd r24, Y+2 ; 0x02 |
612: 9b 81 ldd r25, Y+3 ; 0x03 |
614: 93 83 std Z+3, r25 ; 0x03 |
616: 82 83 std Z+2, r24 ; 0x02 |
618: df 91 pop r29 |
61a: cf 91 pop r28 |
61c: 08 95 ret |
0000061e <memset>: |
61e: dc 01 movw r26, r24 |
620: 01 c0 rjmp .+2 ; 0x624 <memset+0x6> |
622: 6d 93 st X+, r22 |
624: 41 50 subi r20, 0x01 ; 1 |
626: 50 40 sbci r21, 0x00 ; 0 |
628: e0 f7 brcc .-8 ; 0x622 <memset+0x4> |
62a: 08 95 ret |
0000062c <__epilogue_restores__>: |
62c: 2a 88 ldd r2, Y+18 ; 0x12 |
62e: 39 88 ldd r3, Y+17 ; 0x11 |
630: 48 88 ldd r4, Y+16 ; 0x10 |
632: 5f 84 ldd r5, Y+15 ; 0x0f |
634: 6e 84 ldd r6, Y+14 ; 0x0e |
636: 7d 84 ldd r7, Y+13 ; 0x0d |
638: 8c 84 ldd r8, Y+12 ; 0x0c |
63a: 9b 84 ldd r9, Y+11 ; 0x0b |
63c: aa 84 ldd r10, Y+10 ; 0x0a |
63e: b9 84 ldd r11, Y+9 ; 0x09 |
640: c8 84 ldd r12, Y+8 ; 0x08 |
642: df 80 ldd r13, Y+7 ; 0x07 |
644: ee 80 ldd r14, Y+6 ; 0x06 |
646: fd 80 ldd r15, Y+5 ; 0x05 |
648: 0c 81 ldd r16, Y+4 ; 0x04 |
64a: 1b 81 ldd r17, Y+3 ; 0x03 |
64c: aa 81 ldd r26, Y+2 ; 0x02 |
64e: b9 81 ldd r27, Y+1 ; 0x01 |
650: ce 0f add r28, r30 |
652: d1 1d adc r29, r1 |
654: 0f b6 in r0, 0x3f ; 63 |
656: f8 94 cli |
658: de bf out 0x3e, r29 ; 62 |
65a: 0f be out 0x3f, r0 ; 63 |
65c: cd bf out 0x3d, r28 ; 61 |
65e: ed 01 movw r28, r26 |
660: 08 95 ret |
00000662 <_exit>: |
662: ff cf rjmp .-2 ; 0x662 <_exit> |
/IR-TX-BL/trunk/V0.02/IR-Tx_V0_02.map |
---|
0,0 → 1,516 |
Archive member included because of file (symbol) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o (exit) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
main.o (__do_copy_data) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
main.o (__do_clear_bss) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o (fdevopen) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) (__iob) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) (calloc) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) (malloc) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) (memset) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) (__epilogue_restores__) |
Allocating common symbols |
Common symbol size file |
__brkval 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__flp 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__iob 0x6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
Discarded input sections |
.stabstr 0x00000000 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
Memory Configuration |
Name Origin Length Attributes |
text 0x00000000 0x00002000 xr |
data 0x00800060 0x0000ffa0 rw !x |
eeprom 0x00810000 0x00010000 rw !x |
*default* 0x00000000 0xffffffff |
Linker script and memory map |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
LOAD main.o |
LOAD uart.o |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libm.a |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a |
LOAD c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a |
.hash |
*(.hash) |
.dynsym |
*(.dynsym) |
.dynstr |
*(.dynstr) |
.gnu.version |
*(.gnu.version) |
.gnu.version_d |
*(.gnu.version_d) |
.gnu.version_r |
*(.gnu.version_r) |
.rel.init |
*(.rel.init) |
.rela.init |
*(.rela.init) |
.rel.text |
*(.rel.text) |
*(.rel.text.*) |
*(.rel.gnu.linkonce.t*) |
.rela.text |
*(.rela.text) |
*(.rela.text.*) |
*(.rela.gnu.linkonce.t*) |
.rel.fini |
*(.rel.fini) |
.rela.fini |
*(.rela.fini) |
.rel.rodata |
*(.rel.rodata) |
*(.rel.rodata.*) |
*(.rel.gnu.linkonce.r*) |
.rela.rodata |
*(.rela.rodata) |
*(.rela.rodata.*) |
*(.rela.gnu.linkonce.r*) |
.rel.data |
*(.rel.data) |
*(.rel.data.*) |
*(.rel.gnu.linkonce.d*) |
.rela.data |
*(.rela.data) |
*(.rela.data.*) |
*(.rela.gnu.linkonce.d*) |
.rel.ctors |
*(.rel.ctors) |
.rela.ctors |
*(.rela.ctors) |
.rel.dtors |
*(.rel.dtors) |
.rela.dtors |
*(.rela.dtors) |
.rel.got |
*(.rel.got) |
.rela.got |
*(.rela.got) |
.rel.bss |
*(.rel.bss) |
.rela.bss |
*(.rela.bss) |
.rel.plt |
*(.rel.plt) |
.rela.plt |
*(.rela.plt) |
.text 0x00000000 0x664 |
*(.vectors) |
.vectors 0x00000000 0x26 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
0x00000000 __vectors |
0x00000000 __vector_default |
*(.vectors) |
*(.progmem.gcc*) |
*(.progmem*) |
0x00000026 . = ALIGN (0x2) |
0x00000026 __trampolines_start = . |
*(.trampolines) |
.trampolines 0x00000026 0x0 linker stubs |
*(.trampolines*) |
0x00000026 __trampolines_end = . |
*(.jumptables) |
*(.jumptables*) |
*(.lowtext) |
*(.lowtext*) |
0x00000026 __ctors_start = . |
*(.ctors) |
0x00000026 __ctors_end = . |
0x00000026 __dtors_start = . |
*(.dtors) |
0x00000026 __dtors_end = . |
SORT(*)(.ctors) |
SORT(*)(.dtors) |
*(.init0) |
.init0 0x00000026 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
0x00000026 __init |
*(.init0) |
*(.init1) |
*(.init1) |
*(.init2) |
.init2 0x00000026 0xc c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
*(.init2) |
*(.init3) |
*(.init3) |
*(.init4) |
.init4 0x00000032 0x16 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
0x00000032 __do_copy_data |
.init4 0x00000048 0x10 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
0x00000048 __do_clear_bss |
*(.init4) |
*(.init5) |
*(.init5) |
*(.init6) |
*(.init6) |
*(.init7) |
*(.init7) |
*(.init8) |
*(.init8) |
*(.init9) |
.init9 0x00000058 0x4 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
*(.init9) |
*(.text) |
.text 0x0000005c 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
0x0000005c __vector_1 |
0x0000005c __vector_12 |
0x0000005c __bad_interrupt |
0x0000005c __vector_6 |
0x0000005c __vector_3 |
0x0000005c __vector_11 |
0x0000005c __vector_13 |
0x0000005c __vector_17 |
0x0000005c __vector_7 |
0x0000005c __vector_4 |
0x0000005c __vector_2 |
0x0000005c __vector_15 |
0x0000005c __vector_14 |
0x0000005c __vector_10 |
0x0000005c __vector_16 |
0x0000005c __vector_18 |
.text 0x0000005e 0x2ce main.o |
0x00000248 SendIRSignal |
0x00000276 GetPPM |
0x00000158 StartIRModulation |
0x00000268 StartPPM |
0x00000080 __vector_5 |
0x0000028a main |
0x0000016c __vector_9 |
0x0000005e __vector_8 |
.text 0x0000032c 0x34 uart.o |
0x00000346 StartUART |
0x0000032c uart_putchar |
.text 0x00000360 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.text 0x00000360 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.text 0x00000360 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.text 0x00000360 0x98 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
0x00000360 fdevopen |
.text 0x000003f8 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
.text 0x000003f8 0x34 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
0x000003f8 calloc |
.text 0x0000042c 0x1f2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
0x0000042c malloc |
0x00000572 free |
.text 0x0000061e 0xe c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
0x0000061e memset |
.text 0x0000062c 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
0x0000062c . = ALIGN (0x2) |
*(.text.*) |
.text.libgcc 0x0000062c 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.text.libgcc 0x0000062c 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.text.libgcc 0x0000062c 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.text.libgcc 0x0000062c 0x36 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
0x0000062c __epilogue_restores__ |
0x00000662 . = ALIGN (0x2) |
*(.fini9) |
.fini9 0x00000662 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
0x00000662 exit |
0x00000662 _exit |
*(.fini9) |
*(.fini8) |
*(.fini8) |
*(.fini7) |
*(.fini7) |
*(.fini6) |
*(.fini6) |
*(.fini5) |
*(.fini5) |
*(.fini4) |
*(.fini4) |
*(.fini3) |
*(.fini3) |
*(.fini2) |
*(.fini2) |
*(.fini1) |
*(.fini1) |
*(.fini0) |
.fini0 0x00000662 0x2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
*(.fini0) |
0x00000664 _etext = . |
.data 0x00800060 0x6 load address 0x00000664 |
0x00800060 PROVIDE (__data_start, .) |
*(.data) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.data 0x00800060 0x0 main.o |
.data 0x00800060 0x0 uart.o |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
.data 0x00800060 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
.data 0x00800060 0x6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
0x00800062 __malloc_heap_start |
0x00800064 __malloc_heap_end |
0x00800060 __malloc_margin |
.data 0x00800066 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
.data 0x00800066 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
*(.data*) |
*(.rodata) |
*(.rodata*) |
*(.gnu.linkonce.d*) |
0x00800066 . = ALIGN (0x2) |
0x00800066 _edata = . |
0x00800066 PROVIDE (__data_end, .) |
.bss 0x00800066 0x15 |
0x00800066 PROVIDE (__bss_start, .) |
*(.bss) |
.bss 0x00800066 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.bss 0x00800066 0xb main.o |
0x0080006a IRstate |
0x00800069 TMR1OvF |
0x0080006c IRbit |
0x00800068 ppm_new |
0x0080006b IRdat |
0x00800066 ppm_signal |
.bss 0x00800071 0x0 uart.o |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
.bss 0x00800071 0x0 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
*(.bss*) |
*(COMMON) |
COMMON 0x00800071 0x6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
0x00800071 __iob |
COMMON 0x00800077 0x4 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
0x00800077 __brkval |
0x00800079 __flp |
0x0080007b PROVIDE (__bss_end, .) |
0x00000664 __data_load_start = LOADADDR (.data) |
0x0000066a __data_load_end = (__data_load_start + SIZEOF (.data)) |
.noinit 0x0080007b 0x0 |
0x0080007b PROVIDE (__noinit_start, .) |
*(.noinit*) |
0x0080007b PROVIDE (__noinit_end, .) |
0x0080007b _end = . |
0x0080007b PROVIDE (__heap_start, .) |
.eeprom 0x00810000 0x0 |
*(.eeprom*) |
0x00810000 __eeprom_end = . |
.stab 0x00000000 0x378 |
*(.stab) |
.stab 0x00000000 0x378 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.stabstr 0x00000000 0x71 |
*(.stabstr) |
.stabstr 0x00000000 0x71 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
.stab.excl |
*(.stab.excl) |
.stab.exclstr |
*(.stab.exclstr) |
.stab.index |
*(.stab.index) |
.stab.indexstr |
*(.stab.indexstr) |
.comment |
*(.comment) |
.debug |
*(.debug) |
.line |
*(.line) |
.debug_srcinfo |
*(.debug_srcinfo) |
.debug_sfnames |
*(.debug_sfnames) |
.debug_aranges 0x00000000 0x40 |
*(.debug_aranges) |
.debug_aranges |
0x00000000 0x20 main.o |
.debug_aranges |
0x00000020 0x20 uart.o |
.debug_pubnames |
0x00000000 0xff |
*(.debug_pubnames) |
.debug_pubnames |
0x00000000 0xce main.o |
.debug_pubnames |
0x000000ce 0x31 uart.o |
.debug_info 0x00000000 0x36d |
*(.debug_info) |
.debug_info 0x00000000 0x2ca main.o |
.debug_info 0x000002ca 0xa3 uart.o |
*(.gnu.linkonce.wi.*) |
.debug_abbrev 0x00000000 0x1b4 |
*(.debug_abbrev) |
.debug_abbrev 0x00000000 0x14d main.o |
.debug_abbrev 0x0000014d 0x67 uart.o |
.debug_line 0x00000000 0x59c |
*(.debug_line) |
.debug_line 0x00000000 0x436 main.o |
.debug_line 0x00000436 0x166 uart.o |
.debug_frame 0x00000000 0xc0 |
*(.debug_frame) |
.debug_frame 0x00000000 0x90 main.o |
.debug_frame 0x00000090 0x30 uart.o |
.debug_str 0x00000000 0x13a |
*(.debug_str) |
.debug_str 0x00000000 0x11c main.o |
0x155 (size before relaxing) |
.debug_str 0x0000011c 0x1e uart.o |
0xc8 (size before relaxing) |
.debug_loc 0x00000000 0x130 |
*(.debug_loc) |
.debug_loc 0x00000000 0x112 main.o |
.debug_loc 0x00000112 0x1e uart.o |
.debug_macinfo |
*(.debug_macinfo) |
OUTPUT(IR-Tx_V0_02.elf elf32-avr) |
LOAD linker stubs |
Cross Reference Table |
Symbol File |
GetPPM main.o |
IRbit main.o |
IRdat main.o |
IRstate main.o |
SendIRSignal main.o |
StartIRModulation main.o |
StartPPM main.o |
StartUART uart.o |
main.o |
TMR1OvF main.o |
__bad_interrupt c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__brkval c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__bss_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
__bss_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
__data_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
__data_load_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
__data_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
__do_clear_bss c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_clear_bss.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o |
main.o |
__do_copy_data c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_copy_data.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o |
main.o |
__epilogue_restores__ c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_epilogue.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
__flp c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__heap_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__heap_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__init c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__iob c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(iob.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
__malloc_heap_end c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__malloc_heap_start c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__malloc_margin c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
__stack c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_1 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_10 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_11 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_12 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_13 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_14 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_15 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_16 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_17 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_18 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_2 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_3 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_4 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_5 main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_6 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_7 c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_8 main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_9 main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vector_default c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
__vectors c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
_exit c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
calloc c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
exit c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/avr4\libgcc.a(_exit.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
fdevopen c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(fdevopen.o) |
uart.o |
free c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
main main.o |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4/crtm8.o |
malloc c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(malloc.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
memset c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(memset.o) |
c:/programme/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr4\libc.a(calloc.o) |
ppm_new main.o |
ppm_signal main.o |
uart_putchar uart.o |
/IR-TX-BL/trunk/V0.02/IR-Tx_V0_02.sym |
---|
0,0 → 1,107 |
00000000 W __heap_end |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 a __tmp_reg__ |
00000000 W __vector_default |
00000000 T __vectors |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000001 a __zero_reg__ |
00000026 T __ctors_end |
00000026 T __ctors_start |
00000026 T __dtors_end |
00000026 T __dtors_start |
00000026 W __init |
00000026 T __trampolines_end |
00000026 T __trampolines_start |
00000032 T __do_copy_data |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003d a __SP_L__ |
0000003e t .do_copy_data_loop |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003e a __SP_H__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
0000003f a __SREG__ |
00000042 t .do_copy_data_start |
00000048 T __do_clear_bss |
00000050 t .do_clear_bss_loop |
00000052 t .do_clear_bss_start |
0000005c T __bad_interrupt |
0000005c W __vector_1 |
0000005c W __vector_10 |
0000005c W __vector_11 |
0000005c W __vector_12 |
0000005c W __vector_13 |
0000005c W __vector_14 |
0000005c W __vector_15 |
0000005c W __vector_16 |
0000005c W __vector_17 |
0000005c W __vector_18 |
0000005c W __vector_2 |
0000005c W __vector_3 |
0000005c W __vector_4 |
0000005c W __vector_6 |
0000005c W __vector_7 |
0000005e T __vector_8 |
00000080 T __vector_5 |
00000158 T StartIRModulation |
0000016c T __vector_9 |
00000248 T SendIRSignal |
00000268 T StartPPM |
00000276 T GetPPM |
0000028a T main |
0000032c T uart_putchar |
00000346 T StartUART |
00000360 T fdevopen |
000003f8 T calloc |
0000042c T malloc |
0000045f W __stack |
00000572 T free |
0000061e T memset |
0000062c T __epilogue_restores__ |
00000662 t __stop_program |
00000662 T _exit |
00000662 W exit |
00000664 A __data_load_start |
00000664 T _etext |
0000066a A __data_load_end |
00800060 D __data_start |
00800060 D __malloc_margin |
00800062 D __malloc_heap_start |
00800064 D __malloc_heap_end |
00800066 B __bss_start |
00800066 D __data_end |
00800066 D _edata |
00800066 B ppm_signal |
00800068 B ppm_new |
00800069 B TMR1OvF |
0080006a B IRstate |
0080006b B IRdat |
0080006c B IRbit |
0080006d b ppm.1753 |
0080006f b pos_ICR.1752 |
00800071 B __iob |
00800077 B __brkval |
00800079 B __flp |
0080007b B __bss_end |
0080007b A __heap_start |
0080007b A _end |
00810000 A __eeprom_end |
/IR-TX-BL/trunk/V0.02/main.c |
---|
0,0 → 1,220 |
//############################################################################ |
// - PPM2PentaxIR Main |
// - ATMEGA8 mit 8MHz |
// - Nur für den privaten Gebrauch |
// - Keine Garantie auf Fehlerfreiheit |
// - Kommerzielle Nutzung nur mit meiner Zustimmung |
// - walter Meyer @ www.freakware.de |
// - 30.11.2007 |
// - Make sure Fuses are programmed for internal 8 MHz RC Oscilator |
//############################################################################*/ |
#include "main.h" |
#include "uart.h" |
volatile unsigned int ppm_signal = 0; |
volatile unsigned char ppm_new = 0; |
volatile unsigned char TMR1OvF = 0; |
volatile unsigned char IRstate = 0; |
volatile unsigned char IRdat = 0; |
volatile unsigned char IRbit = 0; |
SIGNAL(SIG_OVERFLOW1) |
{ |
TMR1OvF++; |
} |
SIGNAL(SIG_INPUT_CAPTURE1) |
{ |
static unsigned int pos_ICR; |
static unsigned int ppm; |
if ((TCCR1B & (1<<ICES1)) != 0) |
{ |
TCCR1B &= ~(1<<ICES1); //invert trigger |
TMR1OvF = 0; |
pos_ICR = ICR1; |
} |
else //Negative Flanke |
{ |
TCCR1B |= (1<<ICES1); |
ppm = (ICR1 - pos_ICR + (int) TMR1OvF * 65536); |
if ((ppm > 600) && (ppm < 2400)) |
{ |
if (ppm > 2100) ppm = 2100; |
if (ppm < 900) ppm = 900; |
ppm = (ppm_signal * 7 + ppm) / 8; |
ppm_signal = ppm; |
ppm_new = 1; |
} |
} |
} |
/*##############################################################################*/ |
void StartIRModulation(void) |
{ |
//Timer1 Config for generation the 38Khz IR Modulation |
TCCR2 = (0<<FOC2)|(0<<WGM20)|(0<<COM21)|(0<<COM20)| |
(1<<WGM21) |(0<<CS22) |(0<<CS21) |(1<<CS20); |
OCR2 = 108; //~38Khz @ 8Mhz |
//Timer 0 Config for getting right timing for IR Pattern |
TCCR0 = (1<<CS02)|(0<<CS01)|(1<<CS00); // clk(@8MHz) / 1024 = 128us / clk (resolution) |
TIMSK &= ~(1<<TOIE0); // |
} |
SIGNAL(SIG_OVERFLOW0) |
{ |
switch (IRstate) |
{ |
case 1: |
TCCR2 setbit (1<<COM20); |
IRstate = 2; |
IRbit = 0; |
TCNT0 = 255 - (13000 / 128); |
break; |
case 2: |
TCCR2 clrbit (1<<COM20); |
IRstate = 3; |
if ((IRdat & 0x40) == 0) TCNT0 = 255 - (1000 / 128); |
else TCNT0 = 255 - (3000 / 128); |
break; |
case 3: |
TCCR2 setbit (1<<COM20); |
TCNT0 = 255 - (1000 / 128); |
IRdat = IRdat << 1; |
IRbit++; |
if (IRbit < 7) IRstate = 2; |
else |
{ |
IRstate = 4; |
IRbit = 0; |
} |
break; |
case 4: |
TCCR2 clrbit (1<<COM20); |
TCNT0 = 255 - (25000 / 128); |
if (IRbit < 20) IRstate = 4; |
else IRstate = 5; |
IRbit++; |
break; |
default: |
TIMSK &= ~(1<<TOIE0); |
IRstate = 0; |
break; |
} |
} |
/*##############################################################################*/ |
void SendIRSignal(unsigned char txbyte) |
{ |
while (IRstate != 0) {} //IR already in action ?, if so, wait |
IRstate = 1; //initial State |
IRdat = txbyte; //copy IR Data |
TIFR &= TOV0; //set TMR0 Int Flag |
TIMSK setbit (1<<TOIE0); //Enable TMR0 Int |
} |
/*##############################################################################*/ |
void StartPPM(void) |
{ |
//global timer1 Config |
TCCR1A = (0<<COM1A1)|(0<<COM1A0)|(0<<COM1B1)|(0<<COM1B0)| |
(0<<FOC1A) |(0<<FOC1B) |(0<<WGM10) |(0<<WGM11); |
TCCR1B = (1<<ICNC1)|(1<<ICES1)|(0<<WGM13)| |
(0<<WGM12)|(0<<CS12)|(1<<CS11)|(0<<CS10); //ICP_POS_FLANKE |
// interrupts |
TIMSK |= (1<<TICIE1)|(1<<TOIE1); //ICP_INT_ENABLE and TIMER1_INT_ENABLE |
} |
int GetPPM(void) |
{ |
//this routines seems to be nesseccary, as reading a 16 bit value |
//on a 8 bit machine is not atomic, so if an interrupt apears between reading |
//low and high byte of the 16 bit value a wrong result is possible |
unsigned char intmask; |
unsigned int ppm_temp; |
intmask = TIMSK; //backup interupt enable bits |
TIMSK &= ~(1<<TICIE1); //disable ppm interrupt |
ppm_temp = ppm_signal; |
TIMSK = intmask; //restore interupt enable bits |
return(ppm_temp); //return ppm_signal |
} |
/*##############################################################################*/ |
// MAIN |
/*##############################################################################*/ |
int main (void) |
{ |
DDRC = (1<<ledred); |
PORTC = 0x00; |
DDRD = (1<<ledgreen); |
PORTD = 0x00; |
DDRB = (1<<1)|(1<<2)|(1<<3); |
PORTB = 0x00; |
StartUART(); |
StartPPM(); |
StartIRModulation(); |
sei(); |
while (1) |
{ |
//printf("%d ",ppm_signal); |
if (ppm_new == 1) |
{ |
ppm_new = 0; |
if (GetPPM() > 1750) |
{ |
SendIRSignal(ZOOM); |
PORTC |= (1<<ledred); |
while (GetPPM() > 1650) {} |
PORTC &= ~(1<<ledred); |
} |
if (GetPPM() < 1250) |
{ |
PORTD |= (1<<ledgreen); |
SendIRSignal(TRIGGER); |
while (GetPPM() < 1350) {} |
PORTD &= ~(1<<ledgreen); |
} |
} |
} |
} |
/IR-TX-BL/trunk/V0.02/main.d |
---|
0,0 → 1,0 |
main.o main.d : main.c main.h uart.h |
/IR-TX-BL/trunk/V0.02/main.h |
---|
0,0 → 1,31 |
#ifndef _MAIN_H |
#define _MAIN_H |
#define SYSCLK 8000000L |
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
#include <avr/io.h> |
#include <avr/interrupt.h> |
#include <avr/eeprom.h> |
#define setbit |= |
#define clrbit &=~ |
#define invbit ^= |
#define ledred 3 //on Port C |
#define ledgreen 7 //on Port D |
#define correction -60 |
#define ZOOM 0x41 |
#define TRIGGER 0x40 |
#endif //_MAIN_H |
/IR-TX-BL/trunk/V0.02/main.lst |
---|
0,0 → 1,609 |
1 .file "main.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
17 .Ltext0: |
18 .global __vector_8 |
20 __vector_8: |
21 .LFB10: |
22 .LM1: |
23 /* prologue: frame size=0 */ |
24 0000 1F92 push __zero_reg__ |
25 0002 0F92 push __tmp_reg__ |
26 0004 0FB6 in __tmp_reg__,__SREG__ |
27 0006 0F92 push __tmp_reg__ |
28 0008 1124 clr __zero_reg__ |
29 000a 8F93 push r24 |
30 /* prologue end (size=6) */ |
31 .LM2: |
32 000c 8091 0000 lds r24,TMR1OvF |
33 0010 8F5F subi r24,lo8(-(1)) |
34 0012 8093 0000 sts TMR1OvF,r24 |
35 /* epilogue: frame size=0 */ |
36 0016 8F91 pop r24 |
37 0018 0F90 pop __tmp_reg__ |
38 001a 0FBE out __SREG__,__tmp_reg__ |
39 001c 0F90 pop __tmp_reg__ |
40 001e 1F90 pop __zero_reg__ |
41 0020 1895 reti |
42 /* epilogue end (size=6) */ |
43 /* function __vector_8 size 17 (5) */ |
44 .LFE10: |
46 .global __vector_5 |
48 __vector_5: |
49 .LFB11: |
50 .LM3: |
51 /* prologue: frame size=0 */ |
52 0022 1F92 push __zero_reg__ |
53 0024 0F92 push __tmp_reg__ |
54 0026 0FB6 in __tmp_reg__,__SREG__ |
55 0028 0F92 push __tmp_reg__ |
56 002a 1124 clr __zero_reg__ |
57 002c 2F93 push r18 |
58 002e 3F93 push r19 |
59 0030 4F93 push r20 |
60 0032 8F93 push r24 |
61 0034 9F93 push r25 |
62 /* prologue end (size=10) */ |
63 .LM4: |
64 0036 0EB4 in __tmp_reg__,78-0x20 |
65 0038 06FE sbrs __tmp_reg__,6 |
66 003a 00C0 rjmp .L4 |
67 .LM5: |
68 003c 8EB5 in r24,78-0x20 |
69 003e 8F7B andi r24,lo8(-65) |
70 0040 8EBD out 78-0x20,r24 |
71 .LM6: |
72 0042 1092 0000 sts TMR1OvF,__zero_reg__ |
73 .LM7: |
74 0046 86B5 in r24,70-0x20 |
75 0048 97B5 in r25,(70)+1-0x20 |
76 004a 9093 0000 sts (pos_ICR.1752)+1,r25 |
77 004e 8093 0000 sts pos_ICR.1752,r24 |
78 0052 00C0 rjmp .L12 |
79 .L4: |
80 .LM8: |
81 0054 8EB5 in r24,78-0x20 |
82 0056 8064 ori r24,lo8(64) |
83 0058 8EBD out 78-0x20,r24 |
84 .LM9: |
85 005a 26B5 in r18,70-0x20 |
86 005c 37B5 in r19,(70)+1-0x20 |
87 005e 8091 0000 lds r24,TMR1OvF |
88 0062 8091 0000 lds r24,pos_ICR.1752 |
89 0066 9091 0000 lds r25,(pos_ICR.1752)+1 |
90 006a 281B sub r18,r24 |
91 006c 390B sbc r19,r25 |
92 006e 3093 0000 sts (ppm.1753)+1,r19 |
93 0072 2093 0000 sts ppm.1753,r18 |
94 .LM10: |
95 0076 C901 movw r24,r18 |
96 0078 8955 subi r24,lo8(-(-601)) |
97 007a 9240 sbci r25,hi8(-(-601)) |
98 007c 8750 subi r24,lo8(1799) |
99 007e 9740 sbci r25,hi8(1799) |
100 0080 00F4 brsh .L12 |
101 .LM11: |
102 0082 88E0 ldi r24,hi8(2101) |
103 0084 2533 cpi r18,lo8(2101) |
104 0086 3807 cpc r19,r24 |
105 0088 00F0 brlo .L8 |
106 008a 84E3 ldi r24,lo8(2100) |
107 008c 98E0 ldi r25,hi8(2100) |
108 008e 00C0 rjmp .L13 |
109 .L8: |
110 .LM12: |
111 0090 2458 subi r18,lo8(900) |
112 0092 3340 sbci r19,hi8(900) |
113 0094 00F4 brsh .L10 |
114 0096 84E8 ldi r24,lo8(900) |
115 0098 93E0 ldi r25,hi8(900) |
116 .L13: |
117 009a 9093 0000 sts (ppm.1753)+1,r25 |
118 009e 8093 0000 sts ppm.1753,r24 |
119 .L10: |
120 .LM13: |
121 00a2 2091 0000 lds r18,ppm_signal |
122 00a6 3091 0000 lds r19,(ppm_signal)+1 |
123 00aa C901 movw r24,r18 |
124 00ac 43E0 ldi r20,3 |
125 00ae 880F 1: lsl r24 |
126 00b0 991F rol r25 |
127 00b2 4A95 dec r20 |
128 00b4 01F4 brne 1b |
129 00b6 821B sub r24,r18 |
130 00b8 930B sbc r25,r19 |
131 00ba 2091 0000 lds r18,ppm.1753 |
132 00be 3091 0000 lds r19,(ppm.1753)+1 |
133 00c2 820F add r24,r18 |
134 00c4 931F adc r25,r19 |
135 00c6 23E0 ldi r18,3 |
136 00c8 9695 1: lsr r25 |
137 00ca 8795 ror r24 |
138 00cc 2A95 dec r18 |
139 00ce 01F4 brne 1b |
140 00d0 9093 0000 sts (ppm.1753)+1,r25 |
141 00d4 8093 0000 sts ppm.1753,r24 |
142 .LM14: |
143 00d8 9093 0000 sts (ppm_signal)+1,r25 |
144 00dc 8093 0000 sts ppm_signal,r24 |
145 .LM15: |
146 00e0 81E0 ldi r24,lo8(1) |
147 00e2 8093 0000 sts ppm_new,r24 |
148 .L12: |
149 /* epilogue: frame size=0 */ |
150 00e6 9F91 pop r25 |
151 00e8 8F91 pop r24 |
152 00ea 4F91 pop r20 |
153 00ec 3F91 pop r19 |
154 00ee 2F91 pop r18 |
155 00f0 0F90 pop __tmp_reg__ |
156 00f2 0FBE out __SREG__,__tmp_reg__ |
157 00f4 0F90 pop __tmp_reg__ |
158 00f6 1F90 pop __zero_reg__ |
159 00f8 1895 reti |
160 /* epilogue end (size=10) */ |
161 /* function __vector_5 size 110 (90) */ |
162 .LFE11: |
164 .global StartIRModulation |
166 StartIRModulation: |
167 .LFB12: |
168 .LM16: |
169 /* prologue: frame size=0 */ |
170 /* prologue end (size=0) */ |
171 .LM17: |
172 00fa 89E0 ldi r24,lo8(9) |
173 00fc 85BD out 69-0x20,r24 |
174 .LM18: |
175 00fe 8CE6 ldi r24,lo8(108) |
176 0100 83BD out 67-0x20,r24 |
177 .LM19: |
178 0102 85E0 ldi r24,lo8(5) |
179 0104 83BF out 83-0x20,r24 |
180 .LM20: |
181 0106 89B7 in r24,89-0x20 |
182 0108 8E7F andi r24,lo8(-2) |
183 010a 89BF out 89-0x20,r24 |
184 /* epilogue: frame size=0 */ |
185 010c 0895 ret |
186 /* epilogue end (size=1) */ |
187 /* function StartIRModulation size 10 (9) */ |
188 .LFE12: |
190 .global __vector_9 |
192 __vector_9: |
193 .LFB13: |
194 .LM21: |
195 /* prologue: frame size=0 */ |
196 010e 1F92 push __zero_reg__ |
197 0110 0F92 push __tmp_reg__ |
198 0112 0FB6 in __tmp_reg__,__SREG__ |
199 0114 0F92 push __tmp_reg__ |
200 0116 1124 clr __zero_reg__ |
201 0118 8F93 push r24 |
202 011a 9F93 push r25 |
203 /* prologue end (size=7) */ |
204 .LM22: |
205 011c 9091 0000 lds r25,IRstate |
206 0120 9230 cpi r25,lo8(2) |
207 0122 01F0 breq .L19 |
208 .LM23: |
209 0124 9330 cpi r25,lo8(3) |
210 0126 00F4 brsh .L22 |
211 0128 9130 cpi r25,lo8(1) |
212 012a 01F0 breq .+2 |
213 012c 00C0 rjmp .L17 |
214 012e 00C0 rjmp .L18 |
215 .L22: |
216 0130 9330 cpi r25,lo8(3) |
217 0132 01F0 breq .L20 |
218 0134 9430 cpi r25,lo8(4) |
219 0136 01F0 breq .+2 |
220 0138 00C0 rjmp .L17 |
221 013a 00C0 rjmp .L21 |
222 .L18: |
223 .LM24: |
224 013c 85B5 in r24,69-0x20 |
225 013e 8061 ori r24,lo8(16) |
226 0140 85BD out 69-0x20,r24 |
227 .LM25: |
228 0142 82E0 ldi r24,lo8(2) |
229 0144 8093 0000 sts IRstate,r24 |
230 .LM26: |
231 0148 1092 0000 sts IRbit,__zero_reg__ |
232 .LM27: |
233 014c 8AE9 ldi r24,lo8(-102) |
234 014e 00C0 rjmp .L32 |
235 .L19: |
236 .LM28: |
237 0150 85B5 in r24,69-0x20 |
238 0152 8F7E andi r24,lo8(-17) |
239 0154 85BD out 69-0x20,r24 |
240 .LM29: |
241 0156 83E0 ldi r24,lo8(3) |
242 0158 8093 0000 sts IRstate,r24 |
243 .LM30: |
244 015c 8091 0000 lds r24,IRdat |
245 0160 86FD sbrc r24,6 |
246 0162 00C0 rjmp .L24 |
247 0164 88EF ldi r24,lo8(-8) |
248 .L32: |
249 0166 82BF out 82-0x20,r24 |
250 0168 00C0 rjmp .L31 |
251 .L24: |
252 .LM31: |
253 016a 88EE ldi r24,lo8(-24) |
254 016c 00C0 rjmp .L32 |
255 .L20: |
256 .LM32: |
257 016e 85B5 in r24,69-0x20 |
258 0170 8061 ori r24,lo8(16) |
259 0172 85BD out 69-0x20,r24 |
260 .LM33: |
261 0174 88EF ldi r24,lo8(-8) |
262 0176 82BF out 82-0x20,r24 |
263 .LM34: |
264 0178 8091 0000 lds r24,IRdat |
265 017c 880F lsl r24 |
266 017e 8093 0000 sts IRdat,r24 |
267 .LM35: |
268 0182 8091 0000 lds r24,IRbit |
269 0186 8F5F subi r24,lo8(-(1)) |
270 0188 8093 0000 sts IRbit,r24 |
271 .LM36: |
272 018c 8091 0000 lds r24,IRbit |
273 0190 8730 cpi r24,lo8(7) |
274 0192 00F4 brsh .L26 |
275 0194 82E0 ldi r24,lo8(2) |
276 0196 8093 0000 sts IRstate,r24 |
277 019a 00C0 rjmp .L31 |
278 .L26: |
279 .LM37: |
280 019c 84E0 ldi r24,lo8(4) |
281 019e 8093 0000 sts IRstate,r24 |
282 .LM38: |
283 01a2 1092 0000 sts IRbit,__zero_reg__ |
284 01a6 00C0 rjmp .L31 |
285 .L21: |
286 .LM39: |
287 01a8 85B5 in r24,69-0x20 |
288 01aa 8F7E andi r24,lo8(-17) |
289 01ac 85BD out 69-0x20,r24 |
290 .LM40: |
291 01ae 8CE3 ldi r24,lo8(60) |
292 01b0 82BF out 82-0x20,r24 |
293 .LM41: |
294 01b2 8091 0000 lds r24,IRbit |
295 01b6 8431 cpi r24,lo8(20) |
296 01b8 00F4 brsh .L28 |
297 01ba 9093 0000 sts IRstate,r25 |
298 01be 00C0 rjmp .L30 |
299 .L28: |
300 .LM42: |
301 01c0 85E0 ldi r24,lo8(5) |
302 01c2 8093 0000 sts IRstate,r24 |
303 .L30: |
304 .LM43: |
305 01c6 8091 0000 lds r24,IRbit |
306 01ca 8F5F subi r24,lo8(-(1)) |
307 01cc 8093 0000 sts IRbit,r24 |
308 01d0 00C0 rjmp .L31 |
309 .L17: |
310 .LM44: |
311 01d2 89B7 in r24,89-0x20 |
312 01d4 8E7F andi r24,lo8(-2) |
313 01d6 89BF out 89-0x20,r24 |
314 .LM45: |
315 01d8 1092 0000 sts IRstate,__zero_reg__ |
316 .L31: |
317 /* epilogue: frame size=0 */ |
318 01dc 9F91 pop r25 |
319 01de 8F91 pop r24 |
320 01e0 0F90 pop __tmp_reg__ |
321 01e2 0FBE out __SREG__,__tmp_reg__ |
322 01e4 0F90 pop __tmp_reg__ |
323 01e6 1F90 pop __zero_reg__ |
324 01e8 1895 reti |
325 /* epilogue end (size=7) */ |
326 /* function __vector_9 size 110 (96) */ |
327 .LFE13: |
329 .global SendIRSignal |
331 SendIRSignal: |
332 .LFB14: |
333 .LM46: |
334 /* prologue: frame size=0 */ |
335 /* prologue end (size=0) */ |
336 .LVL0: |
337 01ea 982F mov r25,r24 |
338 .LVL1: |
339 .L35: |
340 .LM47: |
341 01ec 8091 0000 lds r24,IRstate |
342 01f0 8823 tst r24 |
343 01f2 01F4 brne .L35 |
344 .LM48: |
345 01f4 81E0 ldi r24,lo8(1) |
346 01f6 8093 0000 sts IRstate,r24 |
347 .LM49: |
348 01fa 9093 0000 sts IRdat,r25 |
349 .LM50: |
350 01fe 88B7 in r24,88-0x20 |
351 0200 18BE out 88-0x20,__zero_reg__ |
352 .LM51: |
353 0202 89B7 in r24,89-0x20 |
354 0204 8160 ori r24,lo8(1) |
355 0206 89BF out 89-0x20,r24 |
356 /* epilogue: frame size=0 */ |
357 0208 0895 ret |
358 /* epilogue end (size=1) */ |
359 /* function SendIRSignal size 16 (15) */ |
360 .LFE14: |
362 .global StartPPM |
364 StartPPM: |
365 .LFB15: |
366 .LM52: |
367 /* prologue: frame size=0 */ |
368 /* prologue end (size=0) */ |
369 .LM53: |
370 020a 1FBC out 79-0x20,__zero_reg__ |
371 .LM54: |
372 020c 82EC ldi r24,lo8(-62) |
373 020e 8EBD out 78-0x20,r24 |
374 .LM55: |
375 0210 89B7 in r24,89-0x20 |
376 0212 8462 ori r24,lo8(36) |
377 0214 89BF out 89-0x20,r24 |
378 /* epilogue: frame size=0 */ |
379 0216 0895 ret |
380 /* epilogue end (size=1) */ |
381 /* function StartPPM size 7 (6) */ |
382 .LFE15: |
384 .global GetPPM |
386 GetPPM: |
387 .LFB16: |
388 .LM56: |
389 /* prologue: frame size=0 */ |
390 /* prologue end (size=0) */ |
391 .LM57: |
392 0218 29B7 in r18,89-0x20 |
393 .LVL2: |
394 .LM58: |
395 021a 89B7 in r24,89-0x20 |
396 021c 8F7D andi r24,lo8(-33) |
397 021e 89BF out 89-0x20,r24 |
398 .LM59: |
399 0220 8091 0000 lds r24,ppm_signal |
400 0224 9091 0000 lds r25,(ppm_signal)+1 |
401 .LVL3: |
402 .LM60: |
403 0228 29BF out 89-0x20,r18 |
404 .LVL4: |
405 /* epilogue: frame size=0 */ |
406 022a 0895 ret |
407 /* epilogue end (size=1) */ |
408 /* function GetPPM size 10 (9) */ |
409 .LFE16: |
411 .global main |
413 main: |
414 .LFB17: |
415 .LM61: |
416 /* prologue: frame size=0 */ |
417 /* prologue end (size=0) */ |
418 .LM62: |
419 022c 88E0 ldi r24,lo8(8) |
420 022e 84BB out 52-0x20,r24 |
421 .LM63: |
422 0230 15BA out 53-0x20,__zero_reg__ |
423 .LM64: |
424 0232 80E8 ldi r24,lo8(-128) |
425 0234 81BB out 49-0x20,r24 |
426 .LM65: |
427 0236 12BA out 50-0x20,__zero_reg__ |
428 .LM66: |
429 0238 8EE0 ldi r24,lo8(14) |
430 023a 87BB out 55-0x20,r24 |
431 .LM67: |
432 023c 18BA out 56-0x20,__zero_reg__ |
433 .LM68: |
434 023e 00D0 rcall StartUART |
435 .LBB12: |
436 .LBB13: |
437 .LM69: |
438 0240 1FBC out 79-0x20,__zero_reg__ |
439 .LM70: |
440 0242 82EC ldi r24,lo8(-62) |
441 0244 8EBD out 78-0x20,r24 |
442 .LM71: |
443 0246 89B7 in r24,89-0x20 |
444 0248 8462 ori r24,lo8(36) |
445 024a 89BF out 89-0x20,r24 |
446 .LBE13: |
447 .LBE12: |
448 .LM72: |
449 024c 00D0 rcall StartIRModulation |
450 .LM73: |
451 /* #APP */ |
452 024e 7894 sei |
453 .LVL5: |
454 /* #NOAPP */ |
455 .L64: |
456 .LM74: |
457 0250 8091 0000 lds r24,ppm_new |
458 0254 8130 cpi r24,lo8(1) |
459 0256 01F4 brne .L64 |
460 .LM75: |
461 0258 1092 0000 sts ppm_new,__zero_reg__ |
462 .LBB14: |
463 .LBB15: |
464 .LM76: |
465 025c 89B7 in r24,89-0x20 |
466 .LVL6: |
467 .LM77: |
468 025e 99B7 in r25,89-0x20 |
469 0260 9F7D andi r25,lo8(-33) |
470 0262 99BF out 89-0x20,r25 |
471 .LM78: |
472 0264 2091 0000 lds r18,ppm_signal |
473 0268 3091 0000 lds r19,(ppm_signal)+1 |
474 .LVL7: |
475 .LM79: |
476 026c 89BF out 89-0x20,r24 |
477 .LBE15: |
478 .LBE14: |
479 .LM80: |
480 026e 275D subi r18,lo8(1751) |
481 0270 3640 sbci r19,hi8(1751) |
482 .LVL8: |
483 0272 04F0 brlt .L47 |
484 .LM81: |
485 0274 81E4 ldi r24,lo8(65) |
486 0276 00D0 rcall SendIRSignal |
487 .LVL9: |
488 .LM82: |
489 0278 AB9A sbi 53-0x20,3 |
490 .L49: |
491 .LBB16: |
492 .LBB17: |
493 .LM83: |
494 027a 89B7 in r24,89-0x20 |
495 .LVL10: |
496 .LM84: |
497 027c 99B7 in r25,89-0x20 |
498 027e 9F7D andi r25,lo8(-33) |
499 0280 99BF out 89-0x20,r25 |
500 .LM85: |
501 0282 2091 0000 lds r18,ppm_signal |
502 0286 3091 0000 lds r19,(ppm_signal)+1 |
503 .LVL11: |
504 .LM86: |
505 028a 89BF out 89-0x20,r24 |
506 .LBE17: |
507 .LBE16: |
508 .LM87: |
509 028c 2357 subi r18,lo8(1651) |
510 028e 3640 sbci r19,hi8(1651) |
511 .LVL12: |
512 0290 04F4 brge .L49 |
513 .LM88: |
514 0292 AB98 cbi 53-0x20,3 |
515 .LVL13: |
516 .L47: |
517 .LBB18: |
518 .LBB19: |
519 .LM89: |
520 0294 89B7 in r24,89-0x20 |
521 .LVL14: |
522 .LM90: |
523 0296 99B7 in r25,89-0x20 |
524 0298 9F7D andi r25,lo8(-33) |
525 029a 99BF out 89-0x20,r25 |
526 .LM91: |
527 029c 2091 0000 lds r18,ppm_signal |
528 02a0 3091 0000 lds r19,(ppm_signal)+1 |
529 .LVL15: |
530 .LM92: |
531 02a4 89BF out 89-0x20,r24 |
532 .LBE19: |
533 .LBE18: |
534 .LM93: |
535 02a6 225E subi r18,lo8(1250) |
536 02a8 3440 sbci r19,hi8(1250) |
537 .LVL16: |
538 02aa 04F4 brge .L64 |
539 .LM94: |
540 02ac 979A sbi 50-0x20,7 |
541 .LM95: |
542 02ae 80E4 ldi r24,lo8(64) |
543 02b0 00D0 rcall SendIRSignal |
544 .LVL17: |
545 .L52: |
546 .LBB20: |
547 .LBB21: |
548 .LM96: |
549 02b2 89B7 in r24,89-0x20 |
550 .LVL18: |
551 .LM97: |
552 02b4 99B7 in r25,89-0x20 |
553 02b6 9F7D andi r25,lo8(-33) |
554 02b8 99BF out 89-0x20,r25 |
555 .LM98: |
556 02ba 2091 0000 lds r18,ppm_signal |
557 02be 3091 0000 lds r19,(ppm_signal)+1 |
558 .LVL19: |
559 .LM99: |
560 02c2 89BF out 89-0x20,r24 |
561 .LBE21: |
562 .LBE20: |
563 .LM100: |
564 02c4 2654 subi r18,lo8(1350) |
565 02c6 3540 sbci r19,hi8(1350) |
566 .LVL20: |
567 02c8 04F0 brlt .L52 |
568 .LM101: |
569 02ca 9798 cbi 50-0x20,7 |
570 02cc 00C0 rjmp .L64 |
571 /* epilogue: frame size=0 */ |
572 /* epilogue: noreturn */ |
573 /* epilogue end (size=0) */ |
574 /* function main size 86 (86) */ |
575 .LFE17: |
577 .global ppm_signal |
578 .global ppm_signal |
579 .section .bss |
582 ppm_signal: |
583 0000 0000 .skip 2,0 |
584 .global ppm_new |
585 .global ppm_new |
588 ppm_new: |
589 0002 00 .skip 1,0 |
590 .global TMR1OvF |
591 .global TMR1OvF |
594 TMR1OvF: |
595 0003 00 .skip 1,0 |
596 .global IRstate |
597 .global IRstate |
600 IRstate: |
601 0004 00 .skip 1,0 |
602 .global IRdat |
603 .global IRdat |
606 IRdat: |
607 0005 00 .skip 1,0 |
608 .global IRbit |
609 .global IRbit |
612 IRbit: |
613 0006 00 .skip 1,0 |
614 .lcomm ppm.1753,2 |
615 .lcomm pos_ICR.1752,2 |
696 .Letext0: |
DEFINED SYMBOLS |
*ABS*:00000000 main.c |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:3 *ABS*:0000003f __SREG__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:4 *ABS*:0000003e __SP_H__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:5 *ABS*:0000003d __SP_L__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:6 *ABS*:00000000 __tmp_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:7 *ABS*:00000001 __zero_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:20 .text:00000000 __vector_8 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:594 .bss:00000003 TMR1OvF |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:48 .text:00000022 __vector_5 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:614 .bss:00000009 pos_ICR.1752 |
.bss:00000007 ppm.1753 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:582 .bss:00000000 ppm_signal |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:588 .bss:00000002 ppm_new |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:166 .text:000000fa StartIRModulation |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:192 .text:0000010e __vector_9 |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:600 .bss:00000004 IRstate |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:612 .bss:00000006 IRbit |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:606 .bss:00000005 IRdat |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:331 .text:000001ea SendIRSignal |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:364 .text:0000020a StartPPM |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:386 .text:00000218 GetPPM |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccRlLbo7.s:413 .text:0000022c main |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
StartUART |
/IR-TX-BL/trunk/V0.02/makefile |
---|
0,0 → 1,387 |
#-------------------------------------------------------------------- |
# MCU name |
MCU = atmega8 |
#------------------------------------------------------------------- |
HAUPT_VERSION = 0 |
NEBEN_VERSION = 02 |
#------------------------------------------------------------------- |
# Output format. (can be srec, ihex, binary) |
FORMAT = ihex |
# Target file name (without extension). |
TARGET = IR-Tx_V$(HAUPT_VERSION)_$(NEBEN_VERSION) |
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization. |
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) |
OPT = s |
########################################################################################################## |
# List C source files here. (C dependencies are automatically generated.) |
SRC = main.c uart.c |
########################################################################################################## |
# If there is more than one source file, append them above, or modify and |
# uncomment the following: |
#SRC += foo.c bar.c |
# You can also wrap lines by appending a backslash to the end of the line: |
#SRC += baz.c \ |
#xyzzy.c |
# List Assembler source files here. |
# Make them always end in a capital .S. Files ending in a lowercase .s |
# will not be considered source files but generated files (assembler |
# output from the compiler), and will be deleted upon "make clean"! |
# Even though the DOS/Win* filesystem matches both .s and .S the same, |
# it will preserve the spelling of the filenames, and gcc itself does |
# care about how the name is spelled on its command-line. |
ASRC = |
# List any extra directories to look for include files here. |
# Each directory must be seperated by a space. |
EXTRAINCDIRS = |
# Optional compiler flags. |
# -g: generate debugging information (for GDB, or for COFF conversion) |
# -O*: optimization level |
# -f...: tuning, see gcc manual and avr-libc documentation |
# -Wall...: warning level |
# -Wa,...: tell GCC to pass this to the assembler. |
# -ahlms: create assembler listing |
CFLAGS = -g -O$(OPT) \ |
-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums \ |
-Wall -Wstrict-prototypes \ |
-Wa,-adhlns=$(<:.c=.lst) \ |
$(patsubst %,-I%,$(EXTRAINCDIRS)) |
# Set a "language standard" compiler flag. |
# Unremark just one line below to set the language standard to use. |
# gnu99 = C99 + GNU extensions. See GCC manual for more information. |
#CFLAGS += -std=c89 |
#CFLAGS += -std=gnu89 |
#CFLAGS += -std=c99 |
CFLAGS += -std=gnu99 |
CFLAGS += -DVERSION_HAUPTVERSION=$(HAUPT_VERSION) -DVERSION_NEBENVERSION=$(NEBEN_VERSION) |
ifeq ($(AVR_CTRL_PLATINE), 1) |
CFLAGS += -DAVR_CTRL_PLATINE=$(AVR_CTRL_PLATINE) |
endif |
# Optional assembler flags. |
# -Wa,...: tell GCC to pass this to the assembler. |
# -ahlms: create listing |
# -gstabs: have the assembler create line number information; note that |
# for use in COFF files, additional information about filenames |
# and function names needs to be present in the assembler source |
# files -- see avr-libc docs [FIXME: not yet described there] |
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs |
# Optional linker flags. |
# -Wl,...: tell GCC to pass this to linker. |
# -Map: create map file |
# --cref: add cross reference to map file |
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref |
# Additional libraries |
# Minimalistic printf version |
#LDFLAGS += -Wl,-u,vfprintf -lprintf_min |
# Floating point printf version (requires -lm below) |
#LDFLAGS += -Wl,-u,vfprintf -lprintf_flt |
# -lm = math library |
LDFLAGS += -lm |
# Programming support using avrdude. Settings and variables. |
# Programming hardware: alf avr910 avrisp bascom bsd |
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500 |
# |
# Type: avrdude -c ? |
# to get a full listing. |
# |
AVRDUDE_PROGRAMMER = ponyser |
#AVRDUDE_PROGRAMMER = stk200 |
#AVRDUDE_PORT = com1 # programmer connected to serial device |
AVRDUDE_PORT = com1 |
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex |
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep |
AVRDUDE_FLAGS = -F -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) |
# Uncomment the following if you want avrdude's erase cycle counter. |
# Note that this counter needs to be initialized first using -Yn, |
# see avrdude manual. |
#AVRDUDE_ERASE += -y |
# Uncomment the following if you do /not/ wish a verification to be |
# performed after programming the device. |
#AVRDUDE_FLAGS += -V -E noreset |
# Increase verbosity level. Please use this when submitting bug |
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> |
# to submit bug reports. |
#AVRDUDE_FLAGS += -v -v |
# --------------------------------------------------------------------------- |
# Define directories, if needed. |
DIRAVR = c:/winavr |
DIRAVRBIN = $(DIRAVR)/bin |
DIRAVRUTILS = $(DIRAVR)/utils/bin |
DIRINC = . |
DIRLIB = $(DIRAVR)/avr/lib |
# Define programs and commands. |
SHELL = sh |
CC = avr-gcc |
OBJCOPY = avr-objcopy |
OBJDUMP = avr-objdump |
SIZE = avr-size |
# Programming support using avrdude. |
AVRDUDE = avrdude |
REMOVE = rm -f |
COPY = cp |
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex |
ELFSIZE = $(SIZE) -A $(TARGET).elf |
# Define Messages |
# English |
MSG_ERRORS_NONE = Errors: none |
MSG_BEGIN = -------- begin -------- |
MSG_END = -------- end -------- |
MSG_SIZE_BEFORE = Size before: |
MSG_SIZE_AFTER = Size after: |
MSG_COFF = Converting to AVR COFF: |
MSG_EXTENDED_COFF = Converting to AVR Extended COFF: |
MSG_FLASH = Creating load file for Flash: |
MSG_EEPROM = Creating load file for EEPROM: |
MSG_EXTENDED_LISTING = Creating Extended Listing: |
MSG_SYMBOL_TABLE = Creating Symbol Table: |
MSG_LINKING = Linking: |
MSG_COMPILING = Compiling: |
MSG_ASSEMBLING = Assembling: |
MSG_CLEANING = Cleaning project: |
# Define all object files. |
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o) |
# Define all listing files. |
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst) |
# Combine all necessary flags and optional flags. |
# Add target processor to flags. |
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) |
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) |
# Default target. |
all: begin gccversion sizebefore $(TARGET).elf $(TARGET).hex $(TARGET).eep \ |
$(TARGET).lss $(TARGET).sym sizeafter finished end |
# Eye candy. |
# AVR Studio 3.x does not check make's exit code but relies on |
# the following magic strings to be generated by the compile job. |
begin: |
@echo |
@echo $(MSG_BEGIN) |
finished: |
@echo $(MSG_ERRORS_NONE) |
end: |
@echo $(MSG_END) |
@echo |
# Display size of file. |
sizebefore: |
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi |
sizeafter: |
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi |
# Display compiler version information. |
gccversion : |
@$(CC) --version |
# Convert ELF to COFF for use in debugging / simulating in |
# AVR Studio or VMLAB. |
COFFCONVERT=$(OBJCOPY) --debugging \ |
--change-section-address .data-0x800000 \ |
--change-section-address .bss-0x800000 \ |
--change-section-address .noinit-0x800000 \ |
--change-section-address .eeprom-0x810000 |
coff: $(TARGET).elf |
@echo |
@echo $(MSG_COFF) $(TARGET).cof |
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof |
extcoff: $(TARGET).elf |
@echo |
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof |
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof |
# Program the device. |
program: $(TARGET).hex $(TARGET).eep |
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) |
# Create final output files (.hex, .eep) from ELF output file. |
%.hex: %.elf |
@echo |
@echo $(MSG_FLASH) $@ |
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ |
%.eep: %.elf |
@echo |
@echo $(MSG_EEPROM) $@ |
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ |
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@ |
# Create extended listing file from ELF output file. |
%.lss: %.elf |
@echo |
@echo $(MSG_EXTENDED_LISTING) $@ |
$(OBJDUMP) -h -S $< > $@ |
# Create a symbol table from ELF output file. |
%.sym: %.elf |
@echo |
@echo $(MSG_SYMBOL_TABLE) $@ |
avr-nm -n $< > $@ |
# Link: create ELF output file from object files. |
.SECONDARY : $(TARGET).elf |
.PRECIOUS : $(OBJ) |
%.elf: $(OBJ) |
@echo |
@echo $(MSG_LINKING) $@ |
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS) |
# Compile: create object files from C source files. |
%.o : %.c |
@echo |
@echo $(MSG_COMPILING) $< |
$(CC) -c $(ALL_CFLAGS) $< -o $@ |
# Compile: create assembler files from C source files. |
%.s : %.c |
$(CC) -S $(ALL_CFLAGS) $< -o $@ |
# Assemble: create object files from assembler source files. |
%.o : %.S |
@echo |
@echo $(MSG_ASSEMBLING) $< |
$(CC) -c $(ALL_ASFLAGS) $< -o $@ |
# Target: clean project. |
clean: begin clean_list finished end |
clean_list : |
@echo |
@echo $(MSG_CLEANING) |
# $(REMOVE) $(TARGET).hex |
# $(REMOVE) $(TARGET).eep |
# $(REMOVE) $(TARGET).obj |
$(REMOVE) $(TARGET).cof |
$(REMOVE) $(TARGET).elf |
$(REMOVE) $(TARGET).map |
$(REMOVE) $(TARGET).obj |
$(REMOVE) $(TARGET).a90 |
$(REMOVE) $(TARGET).sym |
$(REMOVE) $(TARGET).lnk |
$(REMOVE) $(TARGET).lss |
$(REMOVE) $(OBJ) |
$(REMOVE) $(LST) |
$(REMOVE) $(SRC:.c=.s) |
$(REMOVE) $(SRC:.c=.d) |
# Automatically generate C source code dependencies. |
# (Code originally taken from the GNU make user manual and modified |
# (See README.txt Credits).) |
# |
# Note that this will work with sh (bash) and sed that is shipped with WinAVR |
# (see the SHELL variable defined above). |
# This may not work with other shells or other seds. |
# |
%.d: %.c |
set -e; $(CC) -MM $(ALL_CFLAGS) $< \ |
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > $@; \ |
[ -s $@ ] || rm -f $@ |
# Remove the '-' if you want to see the dependency files generated. |
-include $(SRC:.c=.d) |
# Listing of phony targets. |
.PHONY : all begin finish end sizebefore sizeafter gccversion coff extcoff \ |
clean clean_list program |
/IR-TX-BL/trunk/V0.02/uart.c |
---|
0,0 → 1,38 |
//############################################################################ |
// - PPM2PentaxIR Uart for Debug only |
// - ATMEGA8 mit 8MHz |
// - Nur für den privaten Gebrauch |
// - Keine Garantie auf Fehlerfreiheit |
// - Kommerzielle Nutzung nur mit meiner Zustimmung |
// - walter Meyer @ www.freakware.de |
//############################################################################*/ |
#include "main.h" |
#include "uart.h" |
void StartUART(void) |
{ |
// UART Double Speed (U2X) |
UCSRA |= (1<<U2X); |
/* Enable receiver and transmitter, no RX Int, no TX Int */ |
UCSRB = (1<<RXEN)|(1<<TXEN); // (1<<RXCIE)|(1<<TXCIE) |
/* Set frame format: 8data, 1stop bit */ |
UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); |
//Teiler wird gesetzt |
UBRRL= (SYSCLK / (BAUD_RATE * 8L) -1 ); |
//öffnet einen Kanal für printf (STDOUT) |
fdevopen (uart_putchar, NULL); |
} |
int uart_putchar (char c) |
{ |
if (c == '\n') uart_putchar('\r'); |
loop_until_bit_is_set(UCSRA, UDRE); |
UDR = c; |
return (0); |
} |
/IR-TX-BL/trunk/V0.02/uart.d |
---|
0,0 → 1,0 |
uart.o uart.d : uart.c main.h uart.h |
/IR-TX-BL/trunk/V0.02/uart.h |
---|
0,0 → 1,11 |
#ifndef _UART_H |
#define _UART_H |
extern void StartUART (void); |
extern int uart_putchar (char c); |
#define BAUD_RATE 38400 //Baud Rate für die Serielle Schnittstelle |
#endif //_UART_H |
/IR-TX-BL/trunk/V0.02/uart.lst |
---|
0,0 → 1,85 |
1 .file "uart.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
17 .Ltext0: |
18 .global uart_putchar |
20 uart_putchar: |
21 .LFB11: |
22 .LM1: |
23 /* prologue: frame size=0 */ |
24 0000 1F93 push r17 |
25 /* prologue end (size=1) */ |
26 .LVL0: |
27 0002 182F mov r17,r24 |
28 .LM2: |
29 0004 8A30 cpi r24,lo8(10) |
30 0006 01F4 brne .L6 |
31 .LM3: |
32 0008 8DE0 ldi r24,lo8(13) |
33 .LVL1: |
34 000a 00D0 rcall uart_putchar |
35 .LVL2: |
36 .L6: |
37 .LM4: |
38 000c 5D9B sbis 43-0x20,5 |
39 000e 00C0 rjmp .L6 |
40 .LM5: |
41 0010 1CB9 out 44-0x20,r17 |
42 .LM6: |
43 0012 80E0 ldi r24,lo8(0) |
44 0014 90E0 ldi r25,hi8(0) |
45 /* epilogue: frame size=0 */ |
46 0016 1F91 pop r17 |
47 0018 0895 ret |
48 /* epilogue end (size=2) */ |
49 /* function uart_putchar size 13 (10) */ |
50 .LFE11: |
52 .global StartUART |
54 StartUART: |
55 .LFB10: |
56 .LM7: |
57 /* prologue: frame size=0 */ |
58 /* prologue end (size=0) */ |
59 .LM8: |
60 001a 599A sbi 43-0x20,1 |
61 .LM9: |
62 001c 88E1 ldi r24,lo8(24) |
63 001e 8AB9 out 42-0x20,r24 |
64 .LM10: |
65 0020 86E8 ldi r24,lo8(-122) |
66 0022 80BD out 64-0x20,r24 |
67 .LM11: |
68 0024 89E1 ldi r24,lo8(25) |
69 0026 89B9 out 41-0x20,r24 |
70 .LM12: |
71 0028 60E0 ldi r22,lo8(0) |
72 002a 70E0 ldi r23,hi8(0) |
73 002c 80E0 ldi r24,lo8(gs(uart_putchar)) |
74 002e 90E0 ldi r25,hi8(gs(uart_putchar)) |
75 0030 00D0 rcall fdevopen |
76 /* epilogue: frame size=0 */ |
77 0032 0895 ret |
78 /* epilogue end (size=1) */ |
79 /* function StartUART size 13 (12) */ |
80 .LFE10: |
114 .Letext0: |
DEFINED SYMBOLS |
*ABS*:00000000 uart.c |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:3 *ABS*:0000003f __SREG__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:4 *ABS*:0000003e __SP_H__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:5 *ABS*:0000003d __SP_L__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:6 *ABS*:00000000 __tmp_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:7 *ABS*:00000001 __zero_reg__ |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:20 .text:00000000 uart_putchar |
C:\DOKUME~1\Walter\LOKALE~1\Temp/ccJts5x9.s:54 .text:0000001a StartUART |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
fdevopen |