LCDMatrix.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn 0 .data 00000000 00800100 00800100 000001d0 2**0 CONTENTS, ALLOC, LOAD, DATA 1 .text 0000017c 00000000 00000000 00000054 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .comment 00000030 00000000 00000000 000001d0 2**0 CONTENTS, READONLY 3 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00000200 2**2 CONTENTS, READONLY 4 .debug_aranges 00000050 00000000 00000000 0000023c 2**0 CONTENTS, READONLY, DEBUGGING 5 .debug_info 00000b36 00000000 00000000 0000028c 2**0 CONTENTS, READONLY, DEBUGGING 6 .debug_abbrev 00000885 00000000 00000000 00000dc2 2**0 CONTENTS, READONLY, DEBUGGING 7 .debug_line 00000451 00000000 00000000 00001647 2**0 CONTENTS, READONLY, DEBUGGING 8 .debug_frame 00000090 00000000 00000000 00001a98 2**2 CONTENTS, READONLY, DEBUGGING 9 .debug_str 0000044e 00000000 00000000 00001b28 2**0 CONTENTS, READONLY, DEBUGGING 10 .debug_loc 0000010e 00000000 00000000 00001f76 2**0 CONTENTS, READONLY, DEBUGGING 11 .debug_ranges 00000040 00000000 00000000 00002084 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 00000000 <__vectors>: 0: 45 c0 rjmp .+138 ; 0x8c <__ctors_end> 2: 00 00 nop 4: 4b c0 rjmp .+150 ; 0x9c <__bad_interrupt> 6: 00 00 nop 8: 49 c0 rjmp .+146 ; 0x9c <__bad_interrupt> a: 00 00 nop c: 47 c0 rjmp .+142 ; 0x9c <__bad_interrupt> e: 00 00 nop 10: 45 c0 rjmp .+138 ; 0x9c <__bad_interrupt> 12: 00 00 nop 14: 43 c0 rjmp .+134 ; 0x9c <__bad_interrupt> 16: 00 00 nop 18: 41 c0 rjmp .+130 ; 0x9c <__bad_interrupt> 1a: 00 00 nop 1c: 3f c0 rjmp .+126 ; 0x9c <__bad_interrupt> 1e: 00 00 nop 20: 3d c0 rjmp .+122 ; 0x9c <__bad_interrupt> 22: 00 00 nop 24: 3b c0 rjmp .+118 ; 0x9c <__bad_interrupt> 26: 00 00 nop 28: 39 c0 rjmp .+114 ; 0x9c <__bad_interrupt> 2a: 00 00 nop 2c: 37 c0 rjmp .+110 ; 0x9c <__bad_interrupt> 2e: 00 00 nop 30: 35 c0 rjmp .+106 ; 0x9c <__bad_interrupt> 32: 00 00 nop 34: 33 c0 rjmp .+102 ; 0x9c <__bad_interrupt> 36: 00 00 nop 38: 31 c0 rjmp .+98 ; 0x9c <__bad_interrupt> 3a: 00 00 nop 3c: 2f c0 rjmp .+94 ; 0x9c <__bad_interrupt> 3e: 00 00 nop 40: 2d c0 rjmp .+90 ; 0x9c <__bad_interrupt> 42: 00 00 nop 44: 2b c0 rjmp .+86 ; 0x9c <__bad_interrupt> 46: 00 00 nop 48: 29 c0 rjmp .+82 ; 0x9c <__bad_interrupt> 4a: 00 00 nop 4c: 27 c0 rjmp .+78 ; 0x9c <__bad_interrupt> 4e: 00 00 nop 50: 25 c0 rjmp .+74 ; 0x9c <__bad_interrupt> 52: 00 00 nop 54: 23 c0 rjmp .+70 ; 0x9c <__bad_interrupt> 56: 00 00 nop 58: 21 c0 rjmp .+66 ; 0x9c <__bad_interrupt> 5a: 00 00 nop 5c: 1f c0 rjmp .+62 ; 0x9c <__bad_interrupt> 5e: 00 00 nop 60: 1d c0 rjmp .+58 ; 0x9c <__bad_interrupt> 62: 00 00 nop 64: 1b c0 rjmp .+54 ; 0x9c <__bad_interrupt> 66: 00 00 nop 68: 19 c0 rjmp .+50 ; 0x9c <__bad_interrupt> 6a: 00 00 nop 6c: 17 c0 rjmp .+46 ; 0x9c <__bad_interrupt> 6e: 00 00 nop 70: 15 c0 rjmp .+42 ; 0x9c <__bad_interrupt> 72: 00 00 nop 74: 13 c0 rjmp .+38 ; 0x9c <__bad_interrupt> 76: 00 00 nop 78: 11 c0 rjmp .+34 ; 0x9c <__bad_interrupt> 7a: 00 00 nop 7c: 0f c0 rjmp .+30 ; 0x9c <__bad_interrupt> 7e: 00 00 nop 80: 0d c0 rjmp .+26 ; 0x9c <__bad_interrupt> 82: 00 00 nop 84: 0b c0 rjmp .+22 ; 0x9c <__bad_interrupt> 86: 00 00 nop 88: 09 c0 rjmp .+18 ; 0x9c <__bad_interrupt> ... 0000008c <__ctors_end>: 8c: 11 24 eor r1, r1 8e: 1f be out 0x3f, r1 ; 63 90: cf ef ldi r28, 0xFF ; 255 92: d0 e1 ldi r29, 0x10 ; 16 94: de bf out 0x3e, r29 ; 62 96: cd bf out 0x3d, r28 ; 61 98: 41 d0 rcall .+130 ; 0x11c
9a: 6e c0 rjmp .+220 ; 0x178 <_exit> 0000009c <__bad_interrupt>: 9c: b1 cf rjmp .-158 ; 0x0 <__vectors> 0000009e : outputs: notes: TWI clock is set to 100 kHz Version : DMK, Initial code *******************************************************************/ { TWSR = 0; 9e: 10 92 71 00 sts 0x0071, r1 ; 0x800071 <__TEXT_REGION_LENGTH__+0x7e0071> TWBR = 32; // TWI clock set to 100kHz, prescaler = 0 a2: 80 e2 ldi r24, 0x20 ; 32 a4: 80 93 70 00 sts 0x0070, r24 ; 0x800070 <__TEXT_REGION_LENGTH__+0x7e0070> a8: 08 95 ret 000000aa : outputs: notes: Version : DMK, Initial code *******************************************************************/ { TWCR = (0x80 | 0x20 | 0x04); aa: 84 ea ldi r24, 0xA4 ; 164 ac: 80 93 74 00 sts 0x0074, r24 ; 0x800074 <__TEXT_REGION_LENGTH__+0x7e0074> while( 0x00 == (TWCR & 0x80) ); b0: 80 91 74 00 lds r24, 0x0074 ; 0x800074 <__TEXT_REGION_LENGTH__+0x7e0074> b4: 88 23 and r24, r24 b6: e4 f7 brge .-8 ; 0xb0 } b8: 08 95 ret 000000ba : outputs: notes: Version : DMK, Initial code *******************************************************************/ { TWCR = (0x80 | 0x10 | 0x04); ba: 84 e9 ldi r24, 0x94 ; 148 bc: 80 93 74 00 sts 0x0074, r24 ; 0x800074 <__TEXT_REGION_LENGTH__+0x7e0074> c0: 08 95 ret 000000c2 : outputs: notes: Version : DMK, Initial code *******************************************************************/ { TWDR = data; c2: 80 93 73 00 sts 0x0073, r24 ; 0x800073 <__TEXT_REGION_LENGTH__+0x7e0073> TWCR = (0x80 | 0x04); c6: 84 e8 ldi r24, 0x84 ; 132 c8: 80 93 74 00 sts 0x0074, r24 ; 0x800074 <__TEXT_REGION_LENGTH__+0x7e0074> while( 0 == (TWCR & 0x80) ); cc: 80 91 74 00 lds r24, 0x0074 ; 0x800074 <__TEXT_REGION_LENGTH__+0x7e0074> d0: 88 23 and r24, r24 d2: e4 f7 brge .-8 ; 0xcc } d4: 08 95 ret 000000d6 : clock value is set. This is used by _delay_ms inside util/delay.h Version : DMK, Initial code *******************************************************************/ { for (int i=0; i #else //round up by default __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); #endif __builtin_avr_delay_cycles(__ticks_dc); dc: e3 ec ldi r30, 0xC3 ; 195 de: f9 e0 ldi r31, 0x09 ; 9 e0: 31 97 sbiw r30, 0x01 ; 1 e2: f1 f7 brne .-4 ; 0xe0 e4: 00 c0 rjmp .+0 ; 0xe6 e6: 00 00 nop e8: 2f 5f subi r18, 0xFF ; 255 ea: 3f 4f sbci r19, 0xFF ; 255 ec: 28 17 cp r18, r24 ee: 39 07 cpc r19, r25 f0: ac f3 brlt .-22 ; 0xdc { _delay_ms( 1 ); // library function (max 30 ms at 8MHz) } } f2: 08 95 ret 000000f4 : void matrix_clear() { f4: cf 93 push r28 f6: df 93 push r29 twi_start(); f8: d8 df rcall .-80 ; 0xaa twi_tx(0xE0); fa: 80 ee ldi r24, 0xE0 ; 224 fc: e2 df rcall .-60 ; 0xc2 twi_tx(0x00); fe: 80 e0 ldi r24, 0x00 ; 0 100: e0 df rcall .-64 ; 0xc2 102: c0 e0 ldi r28, 0x00 ; 0 for (int i = 0; i < 16; i++) 104: d0 e0 ldi r29, 0x00 ; 0 106: 03 c0 rjmp .+6 ; 0x10e { twi_tx(0x00); 108: 80 e0 ldi r24, 0x00 ; 0 10a: db df rcall .-74 ; 0xc2 10c: 21 96 adiw r28, 0x01 ; 1 void matrix_clear() { twi_start(); twi_tx(0xE0); twi_tx(0x00); for (int i = 0; i < 16; i++) 10e: c0 31 cpi r28, 0x10 ; 16 110: d1 05 cpc r29, r1 112: d4 f3 brlt .-12 ; 0x108 { twi_tx(0x00); } twi_stop(); 114: d2 df rcall .-92 ; 0xba 116: df 91 pop r29 } 118: cf 91 pop r28 11a: 08 95 ret 0000011c
: 11c: c0 df rcall .-128 ; 0x9e { twi_init(); // Init TWI interface // Init HT16K22. Page 32 datasheet twi_start(); 11e: c5 df rcall .-118 ; 0xaa twi_tx(0xE0); // Display I2C addres + R/W bit 120: 80 ee ldi r24, 0xE0 ; 224 122: cf df rcall .-98 ; 0xc2 twi_tx(0x21); // Internal osc on (page 10 HT16K33) 124: 81 e2 ldi r24, 0x21 ; 33 126: cd df rcall .-102 ; 0xc2 twi_stop(); 128: c8 df rcall .-112 ; 0xba twi_start(); 12a: bf df rcall .-130 ; 0xaa twi_tx(0xE0); // Display I2C address + R/W bit 12c: 80 ee ldi r24, 0xE0 ; 224 12e: c9 df rcall .-110 ; 0xc2 twi_tx(0xA0); // HT16K33 pins all output 130: 80 ea ldi r24, 0xA0 ; 160 twi_stop(); 132: c7 df rcall .-114 ; 0xc2 twi_start(); 134: c2 df rcall .-124 ; 0xba twi_tx(0xE0); // Display I2C address + R/W bit 136: b9 df rcall .-142 ; 0xaa twi_tx(0xE3); // Display Dimming 4/16 duty cycle 138: 80 ee ldi r24, 0xE0 ; 224 13a: c3 df rcall .-122 ; 0xc2 twi_stop(); 13c: 83 ee ldi r24, 0xE3 ; 227 twi_start(); 13e: c1 df rcall .-126 ; 0xc2 twi_tx(0xE0); // Display I2C address + R/W bit 140: bc df rcall .-136 ; 0xba 142: b3 df rcall .-154 ; 0xaa twi_tx(0x81); // Display OFF - Blink On 144: 80 ee ldi r24, 0xE0 ; 224 146: bd df rcall .-134 ; 0xc2 twi_stop(); 148: 81 e8 ldi r24, 0x81 ; 129 14a: bb df rcall .-138 ; 0xc2 matrix_clear(); 14c: b6 df rcall .-148 ; 0xba 14e: d2 df rcall .-92 ; 0xf4 while (1) { for (int i = 0; i < 16; i += 2) 150: c0 e0 ldi r28, 0x00 ; 0 152: d0 e0 ldi r29, 0x00 ; 0 { twi_start(); 154: 0c c0 rjmp .+24 ; 0x16e 156: a9 df rcall .-174 ; 0xaa twi_tx(0xE0); 158: 80 ee ldi r24, 0xE0 ; 224 15a: b3 df rcall .-154 ; 0xc2 15c: 8c 2f mov r24, r28 twi_tx((char)i); 15e: b1 df rcall .-158 ; 0xc2 160: 8f ef ldi r24, 0xFF ; 255 162: af df rcall .-162 ; 0xc2 twi_tx(0xFF); 164: aa df rcall .-172 ; 0xba 166: 88 ec ldi r24, 0xC8 ; 200 168: 90 e0 ldi r25, 0x00 ; 0 twi_stop(); 16a: b5 df rcall .-150 ; 0xd6 16c: 22 96 adiw r28, 0x02 ; 2 wait(200); 16e: c0 31 cpi r28, 0x10 ; 16 170: d1 05 cpc r29, r1 172: 8c f3 brlt .-30 ; 0x156 174: bf df rcall .-130 ; 0xf4 twi_stop(); matrix_clear(); while (1) { for (int i = 0; i < 16; i += 2) 176: ec cf rjmp .-40 ; 0x150 00000178 <_exit>: 178: f8 94 cli 0000017a <__stop_program>: 17a: ff cf rjmp .-2 ; 0x17a <__stop_program>