termometr.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000224 00000000 00000000 00000074 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 0000000c 00800060 00000224 00000298 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .debug_aranges 00000040 00000000 00000000 000002a4 2**0
CONTENTS, READONLY, DEBUGGING
3 .debug_pubnames 00000106 00000000 00000000 000002e4 2**0
CONTENTS, READONLY, DEBUGGING
4 .debug_info 00000415 00000000 00000000 000003ea 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_abbrev 00000198 00000000 00000000 000007ff 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_line 00000510 00000000 00000000 00000997 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_frame 00000100 00000000 00000000 00000ea8 2**2
CONTENTS, READONLY, DEBUGGING
8 .debug_str 0000019f 00000000 00000000 00000fa8 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_loc 00000126 00000000 00000000 00001147 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_ranges 00000048 00000000 00000000 0000126d 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 0c 94 2a 00 jmp 0x54 ; 0x54 <__ctors_end>
4: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
8: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
c: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
10: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
14: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
18: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
1c: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
20: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
24: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
28: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
2c: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
30: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
34: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
38: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
3c: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
40: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
44: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
48: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
4c: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
50: 0c 94 3f 00 jmp 0x7e ; 0x7e <__bad_interrupt>
00000054 <__ctors_end>:
54: 11 24 eor r1, r1
56: 1f be out 0x3f, r1 ; 63
58: cf e5 ldi r28, 0x5F ; 95
5a: d8 e0 ldi r29, 0x08 ; 8
5c: de bf out 0x3e, r29 ; 62
5e: cd bf out 0x3d, r28 ; 61
00000060 <__do_copy_data>:
60: 10 e0 ldi r17, 0x00 ; 0
62: a0 e6 ldi r26, 0x60 ; 96
64: b0 e0 ldi r27, 0x00 ; 0
66: e4 e2 ldi r30, 0x24 ; 36
68: f2 e0 ldi r31, 0x02 ; 2
6a: 02 c0 rjmp .+4 ; 0x70 <.do_copy_data_start>
0000006c <.do_copy_data_loop>:
6c: 05 90 lpm r0, Z+
6e: 0d 92 st X+, r0
00000070 <.do_copy_data_start>:
70: ac 36 cpi r26, 0x6C ; 108
72: b1 07 cpc r27, r17
74: d9 f7 brne .-10 ; 0x6c <.do_copy_data_loop>
76: 0e 94 41 00 call 0x82 ; 0x82 <main>
7a: 0c 94 10 01 jmp 0x220 ; 0x220 <_exit>
0000007e <__bad_interrupt>:
7e: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
00000082 <main>:
#include "HD44780.h"
int main(void){
LCD_Initalize();
82: 0e 94 d5 00 call 0x1aa ; 0x1aa <LCD_Initalize>
LCD_Home();
86: 0e 94 cd 00 call 0x19a ; 0x19a <LCD_Home>
LCD_Clear();
8a: 0e 94 c5 00 call 0x18a ; 0x18a <LCD_Clear>
LCD_WriteText("jakis tekst");
8e: 80 e6 ldi r24, 0x60 ; 96
90: 90 e0 ldi r25, 0x00 ; 0
92: 0e 94 ae 00 call 0x15c ; 0x15c <LCD_WriteText>
}
96: 80 e0 ldi r24, 0x00 ; 0
98: 90 e0 ldi r25, 0x00 ; 0
9a: 08 95 ret
0000009c <_LCD_OutNibble>:
//
//-------------------------------------------------------------------------------------------------
void _LCD_OutNibble(unsigned char nibbleToWrite)
{
if(nibbleToWrite & 0x01)
9c: 80 ff sbrs r24, 0
9e: 02 c0 rjmp .+4 ; 0xa4 <_LCD_OutNibble+0x8>
LCD_DB4_PORT |= LCD_DB4;
a0: 94 9a sbi 0x12, 4 ; 18
a2: 01 c0 rjmp .+2 ; 0xa6 <_LCD_OutNibble+0xa>
else
LCD_DB4_PORT &= ~LCD_DB4;
a4: 94 98 cbi 0x12, 4 ; 18
if(nibbleToWrite & 0x02)
a6: 81 ff sbrs r24, 1
a8: 02 c0 rjmp .+4 ; 0xae <_LCD_OutNibble+0x12>
LCD_DB5_PORT |= LCD_DB5;
aa: 95 9a sbi 0x12, 5 ; 18
ac: 01 c0 rjmp .+2 ; 0xb0 <_LCD_OutNibble+0x14>
else
LCD_DB5_PORT &= ~LCD_DB5;
ae: 95 98 cbi 0x12, 5 ; 18
if(nibbleToWrite & 0x04)
b0: 82 ff sbrs r24, 2
b2: 02 c0 rjmp .+4 ; 0xb8 <_LCD_OutNibble+0x1c>
LCD_DB6_PORT |= LCD_DB6;
b4: 96 9a sbi 0x12, 6 ; 18
b6: 01 c0 rjmp .+2 ; 0xba <_LCD_OutNibble+0x1e>
else
LCD_DB6_PORT &= ~LCD_DB6;
b8: 96 98 cbi 0x12, 6 ; 18
if(nibbleToWrite & 0x08)
ba: 83 ff sbrs r24, 3
bc: 02 c0 rjmp .+4 ; 0xc2 <_LCD_OutNibble+0x26>
LCD_DB7_PORT |= LCD_DB7;
be: 97 9a sbi 0x12, 7 ; 18
c0: 08 95 ret
else
LCD_DB7_PORT &= ~LCD_DB7;
c2: 97 98 cbi 0x12, 7 ; 18
c4: 08 95 ret
000000c6 <_LCD_InNibble>:
//-------------------------------------------------------------------------------------------------
unsigned char _LCD_InNibble(void)
{
unsigned char tmp = 0;
if(LCD_DB4_PIN & LCD_DB4)
c6: 80 b3 in r24, 0x10 ; 16
c8: 90 e0 ldi r25, 0x00 ; 0
ca: 24 e0 ldi r18, 0x04 ; 4
cc: 96 95 lsr r25
ce: 87 95 ror r24
d0: 2a 95 dec r18
d2: e1 f7 brne .-8 ; 0xcc <_LCD_InNibble+0x6>
d4: 81 70 andi r24, 0x01 ; 1
tmp |= (1 << 0);
if(LCD_DB5_PIN & LCD_DB5)
d6: 85 99 sbic 0x10, 5 ; 16
tmp |= (1 << 1);
d8: 82 60 ori r24, 0x02 ; 2
if(LCD_DB6_PIN & LCD_DB6)
da: 86 99 sbic 0x10, 6 ; 16
tmp |= (1 << 2);
dc: 84 60 ori r24, 0x04 ; 4
if(LCD_DB7_PIN & LCD_DB7)
de: 87 99 sbic 0x10, 7 ; 16
tmp |= (1 << 3);
e0: 88 60 ori r24, 0x08 ; 8
return tmp;
}
e2: 08 95 ret
000000e4 <_LCD_Read>:
// Funkcja odczytu bajtu z wyświetacza (bez rozróżnienia instrukcja/dane).
//
//-------------------------------------------------------------------------------------------------
unsigned char _LCD_Read(void)
{
e4: 1f 93 push r17
unsigned char tmp = 0;
LCD_DB4_DIR &= ~LCD_DB4;
e6: 8c 98 cbi 0x11, 4 ; 17
LCD_DB5_DIR &= ~LCD_DB5;
e8: 8d 98 cbi 0x11, 5 ; 17
LCD_DB6_DIR &= ~LCD_DB6;
ea: 8e 98 cbi 0x11, 6 ; 17
LCD_DB7_DIR &= ~LCD_DB7;
ec: 8f 98 cbi 0x11, 7 ; 17
LCD_RW_PORT |= LCD_RW;
ee: 91 9a sbi 0x12, 1 ; 18
LCD_E_PORT |= LCD_E;
f0: 93 9a sbi 0x12, 3 ; 18
tmp |= (_LCD_InNibble() << 4);
f2: 0e 94 63 00 call 0xc6 ; 0xc6 <_LCD_InNibble>
f6: 18 2f mov r17, r24
f8: 12 95 swap r17
fa: 10 7f andi r17, 0xF0 ; 240
LCD_E_PORT &= ~LCD_E;
fc: 93 98 cbi 0x12, 3 ; 18
LCD_E_PORT |= LCD_E;
fe: 93 9a sbi 0x12, 3 ; 18
tmp |= _LCD_InNibble();
100: 0e 94 63 00 call 0xc6 ; 0xc6 <_LCD_InNibble>
LCD_E_PORT &= ~LCD_E;
104: 93 98 cbi 0x12, 3 ; 18
return tmp;
}
106: 81 2b or r24, r17
108: 1f 91 pop r17
10a: 08 95 ret
0000010c <LCD_ReadStatus>:
// Funkcja odczytu bajtu statusowego
//
//-------------------------------------------------------------------------------------------------
unsigned char LCD_ReadStatus(void)
{
LCD_RS_PORT &= ~LCD_RS;
10c: 92 98 cbi 0x12, 2 ; 18
return _LCD_Read();
10e: 0e 94 72 00 call 0xe4 ; 0xe4 <_LCD_Read>
}
112: 08 95 ret
00000114 <_LCD_Write>:
//
// Funkcja zapisu bajtu do wyświetacza (bez rozróżnienia instrukcja/dane).
//
//-------------------------------------------------------------------------------------------------
void _LCD_Write(unsigned char dataToWrite)
{
114: 1f 93 push r17
116: 18 2f mov r17, r24
LCD_DB4_DIR |= LCD_DB4;
118: 8c 9a sbi 0x11, 4 ; 17
LCD_DB5_DIR |= LCD_DB5;
11a: 8d 9a sbi 0x11, 5 ; 17
LCD_DB6_DIR |= LCD_DB6;
11c: 8e 9a sbi 0x11, 6 ; 17
LCD_DB7_DIR |= LCD_DB7;
11e: 8f 9a sbi 0x11, 7 ; 17
LCD_RW_PORT &= ~LCD_RW;
120: 91 98 cbi 0x12, 1 ; 18
LCD_E_PORT |= LCD_E;
122: 93 9a sbi 0x12, 3 ; 18
_LCD_OutNibble(dataToWrite >> 4);
124: 82 95 swap r24
126: 8f 70 andi r24, 0x0F ; 15
128: 0e 94 4e 00 call 0x9c ; 0x9c <_LCD_OutNibble>
LCD_E_PORT &= ~LCD_E;
12c: 93 98 cbi 0x12, 3 ; 18
LCD_E_PORT |= LCD_E;
12e: 93 9a sbi 0x12, 3 ; 18
_LCD_OutNibble(dataToWrite);
130: 81 2f mov r24, r17
132: 0e 94 4e 00 call 0x9c ; 0x9c <_LCD_OutNibble>
LCD_E_PORT &= ~LCD_E;
136: 93 98 cbi 0x12, 3 ; 18
while(LCD_ReadStatus()&0x80);
138: 0e 94 86 00 call 0x10c ; 0x10c <LCD_ReadStatus>
13c: 87 fd sbrc r24, 7
13e: fc cf rjmp .-8 ; 0x138 <_LCD_Write+0x24>
}
140: 1f 91 pop r17
142: 08 95 ret
00000144 <LCD_WriteCommand>:
// Funkcja zapisu rozkazu do wyświetlacza
//
//-------------------------------------------------------------------------------------------------
void LCD_WriteCommand(unsigned char commandToWrite)
{
LCD_RS_PORT &= ~LCD_RS;
144: 92 98 cbi 0x12, 2 ; 18
_LCD_Write(commandToWrite);
146: 0e 94 8a 00 call 0x114 ; 0x114 <_LCD_Write>
}
14a: 08 95 ret
0000014c <LCD_WriteData>:
// Funkcja zapisu danych do pamięci wyświetlacza
//
//-------------------------------------------------------------------------------------------------
void LCD_WriteData(unsigned char dataToWrite)
{
LCD_RS_PORT |= LCD_RS;
14c: 92 9a sbi 0x12, 2 ; 18
_LCD_Write(dataToWrite);
14e: 0e 94 8a 00 call 0x114 ; 0x114 <_LCD_Write>
}
152: 08 95 ret
00000154 <LCD_ReadData>:
// Funkcja odczytu danych z pamięci wyświetlacza
//
//-------------------------------------------------------------------------------------------------
unsigned char LCD_ReadData(void)
{
LCD_RS_PORT |= LCD_RS;
154: 92 9a sbi 0x12, 2 ; 18
return _LCD_Read();
156: 0e 94 72 00 call 0xe4 ; 0xe4 <_LCD_Read>
}
15a: 08 95 ret
0000015c <LCD_WriteText>:
//
// Funkcja wyświetlenia napisu na wyswietlaczu.
//
//-------------------------------------------------------------------------------------------------
void LCD_WriteText(char * text)
{
15c: cf 93 push r28
15e: df 93 push r29
160: ec 01 movw r28, r24
162: 03 c0 rjmp .+6 ; 0x16a <LCD_WriteText+0xe>
while(*text)
LCD_WriteData(*text++);
164: 21 96 adiw r28, 0x01 ; 1
166: 0e 94 a6 00 call 0x14c ; 0x14c <LCD_WriteData>
// Funkcja wyświetlenia napisu na wyswietlaczu.
//
//-------------------------------------------------------------------------------------------------
void LCD_WriteText(char * text)
{
while(*text)
16a: 88 81 ld r24, Y
16c: 88 23 and r24, r24
16e: d1 f7 brne .-12 ; 0x164 <LCD_WriteText+0x8>
LCD_WriteData(*text++);
}
170: df 91 pop r29
172: cf 91 pop r28
174: 08 95 ret
00000176 <LCD_GoTo>:
// Funkcja ustawienia współrzędnych ekranowych
//
//-------------------------------------------------------------------------------------------------
void LCD_GoTo(unsigned char x, unsigned char y)
{
LCD_WriteCommand(HD44780_DDRAM_SET | (x + (0x40 * y)));
176: 62 95 swap r22
178: 66 0f add r22, r22
17a: 66 0f add r22, r22
17c: 60 7c andi r22, 0xC0 ; 192
17e: 68 0f add r22, r24
180: 86 2f mov r24, r22
182: 80 68 ori r24, 0x80 ; 128
184: 0e 94 a2 00 call 0x144 ; 0x144 <LCD_WriteCommand>
}
188: 08 95 ret
0000018a <LCD_Clear>:
// Funkcja czyszczenia ekranu wyświetlacza.
//
//-------------------------------------------------------------------------------------------------
void LCD_Clear(void)
{
LCD_WriteCommand(HD44780_CLEAR);
18a: 81 e0 ldi r24, 0x01 ; 1
18c: 0e 94 a2 00 call 0x144 ; 0x144 <LCD_WriteCommand>
milliseconds can be achieved.
*/
void
_delay_loop_2(uint16_t __count)
{
__asm__ volatile (
190: 84 ef ldi r24, 0xF4 ; 244
192: 91 e0 ldi r25, 0x01 ; 1
194: 01 97 sbiw r24, 0x01 ; 1
196: f1 f7 brne .-4 ; 0x194 <LCD_Clear+0xa>
_delay_ms(2);
}
198: 08 95 ret
0000019a <LCD_Home>:
// Funkcja przywrócenia początkowych współrzędnych wyświetlacza.
//
//-------------------------------------------------------------------------------------------------
void LCD_Home(void)
{
LCD_WriteCommand(HD44780_HOME);
19a: 82 e0 ldi r24, 0x02 ; 2
19c: 0e 94 a2 00 call 0x144 ; 0x144 <LCD_WriteCommand>
1a0: 84 ef ldi r24, 0xF4 ; 244
1a2: 91 e0 ldi r25, 0x01 ; 1
1a4: 01 97 sbiw r24, 0x01 ; 1
1a6: f1 f7 brne .-4 ; 0x1a4 <LCD_Home+0xa>
_delay_ms(2);
}
1a8: 08 95 ret
000001aa <LCD_Initalize>:
//
// Procedura inicjalizacji kontrolera HD44780.
//
//-------------------------------------------------------------------------------------------------
void LCD_Initalize(void)
{
1aa: 1f 93 push r17
1ac: cf 93 push r28
1ae: df 93 push r29
unsigned char i;
LCD_DB4_DIR |= LCD_DB4; // Konfiguracja kierunku pracy wyprowadzeń
1b0: 8c 9a sbi 0x11, 4 ; 17
LCD_DB5_DIR |= LCD_DB5; //
1b2: 8d 9a sbi 0x11, 5 ; 17
LCD_DB6_DIR |= LCD_DB6; //
1b4: 8e 9a sbi 0x11, 6 ; 17
LCD_DB7_DIR |= LCD_DB7; //
1b6: 8f 9a sbi 0x11, 7 ; 17
LCD_E_DIR |= LCD_E; //
1b8: 8b 9a sbi 0x11, 3 ; 17
LCD_RS_DIR |= LCD_RS; //
1ba: 8a 9a sbi 0x11, 2 ; 17
LCD_RW_DIR |= LCD_RW; //
1bc: 89 9a sbi 0x11, 1 ; 17
1be: 86 ea ldi r24, 0xA6 ; 166
1c0: 9e e0 ldi r25, 0x0E ; 14
1c2: 01 97 sbiw r24, 0x01 ; 1
1c4: f1 f7 brne .-4 ; 0x1c2 <LCD_Initalize+0x18>
_delay_ms(15); // oczekiwanie na ustalibizowanie się napiecia zasilajacego
LCD_RS_PORT &= ~LCD_RS; // wyzerowanie linii RS
1c6: 92 98 cbi 0x12, 2 ; 18
LCD_E_PORT &= ~LCD_E; // wyzerowanie linii E
1c8: 93 98 cbi 0x12, 3 ; 18
LCD_RW_PORT &= ~LCD_RW;
1ca: 91 98 cbi 0x12, 1 ; 18
1cc: 10 e0 ldi r17, 0x00 ; 0
1ce: c2 ee ldi r28, 0xE2 ; 226
1d0: d4 e0 ldi r29, 0x04 ; 4
for(i = 0; i < 3; i++) // trzykrotne powtórzenie bloku instrukcji
{
LCD_E_PORT |= LCD_E; // E = 1
1d2: 93 9a sbi 0x12, 3 ; 18
_LCD_OutNibble(0x03); // tryb 8-bitowy
1d4: 83 e0 ldi r24, 0x03 ; 3
1d6: 0e 94 4e 00 call 0x9c ; 0x9c <_LCD_OutNibble>
LCD_E_PORT &= ~LCD_E; // E = 0
1da: 93 98 cbi 0x12, 3 ; 18
1dc: ce 01 movw r24, r28
1de: 01 97 sbiw r24, 0x01 ; 1
1e0: f1 f7 brne .-4 ; 0x1de <LCD_Initalize+0x34>
LCD_RW_DIR |= LCD_RW; //
_delay_ms(15); // oczekiwanie na ustalibizowanie się napiecia zasilajacego
LCD_RS_PORT &= ~LCD_RS; // wyzerowanie linii RS
LCD_E_PORT &= ~LCD_E; // wyzerowanie linii E
LCD_RW_PORT &= ~LCD_RW;
for(i = 0; i < 3; i++) // trzykrotne powtórzenie bloku instrukcji
1e2: 1f 5f subi r17, 0xFF ; 255
1e4: 13 30 cpi r17, 0x03 ; 3
1e6: a9 f7 brne .-22 ; 0x1d2 <LCD_Initalize+0x28>
_LCD_OutNibble(0x03); // tryb 8-bitowy
LCD_E_PORT &= ~LCD_E; // E = 0
_delay_ms(5); // czekaj 5ms
}
LCD_E_PORT |= LCD_E; // E = 1
1e8: 93 9a sbi 0x12, 3 ; 18
_LCD_OutNibble(0x02); // tryb 4-bitowy
1ea: 82 e0 ldi r24, 0x02 ; 2
1ec: 0e 94 4e 00 call 0x9c ; 0x9c <_LCD_OutNibble>
LCD_E_PORT &= ~LCD_E; // E = 0
1f0: 93 98 cbi 0x12, 3 ; 18
1f2: 8a ef ldi r24, 0xFA ; 250
1f4: 90 e0 ldi r25, 0x00 ; 0
1f6: 01 97 sbiw r24, 0x01 ; 1
1f8: f1 f7 brne .-4 ; 0x1f6 <LCD_Initalize+0x4c>
_delay_ms(1); // czekaj 1ms
LCD_WriteCommand(HD44780_FUNCTION_SET | HD44780_FONT5x7 | HD44780_TWO_LINE | HD44780_4_BIT); // interfejs 4-bity, 2-linie, znak 5x7
1fa: 88 e2 ldi r24, 0x28 ; 40
1fc: 0e 94 a2 00 call 0x144 ; 0x144 <LCD_WriteCommand>
LCD_WriteCommand(HD44780_DISPLAY_ONOFF | HD44780_DISPLAY_OFF); // wyłączenie wyswietlacza
200: 88 e0 ldi r24, 0x08 ; 8
202: 0e 94 a2 00 call 0x144 ; 0x144 <LCD_WriteCommand>
LCD_WriteCommand(HD44780_CLEAR); // czyszczenie zawartosći pamieci DDRAM
206: 81 e0 ldi r24, 0x01 ; 1
208: 0e 94 a2 00 call 0x144 ; 0x144 <LCD_WriteCommand>
LCD_WriteCommand(HD44780_ENTRY_MODE | HD44780_EM_SHIFT_CURSOR | HD44780_EM_INCREMENT);// inkrementaja adresu i przesuwanie kursora
20c: 86 e0 ldi r24, 0x06 ; 6
20e: 0e 94 a2 00 call 0x144 ; 0x144 <LCD_WriteCommand>
LCD_WriteCommand(HD44780_DISPLAY_ONOFF | HD44780_DISPLAY_ON | HD44780_CURSOR_OFF | HD44780_CURSOR_NOBLINK); // włącz LCD, bez kursora i mrugania
212: 8c e0 ldi r24, 0x0C ; 12
214: 0e 94 a2 00 call 0x144 ; 0x144 <LCD_WriteCommand>
}
218: df 91 pop r29
21a: cf 91 pop r28
21c: 1f 91 pop r17
21e: 08 95 ret
00000220 <_exit>:
220: f8 94 cli
00000222 <__stop_program>:
222: ff cf rjmp .-2 ; 0x222 <__stop_program>