⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spokepov.lss

📁 旋转16个LED灯控制程序
💻 LSS
📖 第 1 页 / 共 5 页
字号:

spokepov.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000007f6  00000000  00000000  00000094  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000018  00800060  000007f6  0000088a  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          00000030  00800078  00800078  000008a2  2**0
                  ALLOC
  3 .noinit       00000000  008000a8  008000a8  000008a2  2**0
                  CONTENTS
  4 .eeprom       00000000  00810000  00810000  000008a2  2**0
                  CONTENTS
  5 .stab         00000354  00000000  00000000  000008a4  2**2
                  CONTENTS, READONLY, DEBUGGING
  6 .stabstr      00000084  00000000  00000000  00000bf8  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_aranges 00000028  00000000  00000000  00000c7c  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_pubnames 00000225  00000000  00000000  00000ca4  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_info   00000745  00000000  00000000  00000ec9  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_abbrev 000001f6  00000000  00000000  0000160e  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_line   0000067d  00000000  00000000  00001804  2**0
                  CONTENTS, READONLY, DEBUGGING
 12 .debug_str    00000302  00000000  00000000  00001e81  2**0
                  CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

00000000 <__vectors>:
   0:	4f c0       	rjmp	.+158    	; 0xa0 <__init>
   2:	b7 c1       	rjmp	.+878    	; 0x372 <__vector_1>
   4:	d0 c1       	rjmp	.+928    	; 0x3a6 <__vector_2>
   6:	65 c0       	rjmp	.+202    	; 0xd2 <__bad_interrupt>
   8:	1f c1       	rjmp	.+574    	; 0x248 <__vector_4>
   a:	63 c0       	rjmp	.+198    	; 0xd2 <__bad_interrupt>
   c:	8a c0       	rjmp	.+276    	; 0x122 <__vector_6>
   e:	61 c0       	rjmp	.+194    	; 0xd2 <__bad_interrupt>
  10:	60 c0       	rjmp	.+192    	; 0xd2 <__bad_interrupt>
  12:	5f c0       	rjmp	.+190    	; 0xd2 <__bad_interrupt>
  14:	5e c0       	rjmp	.+188    	; 0xd2 <__bad_interrupt>
  16:	5d c0       	rjmp	.+186    	; 0xd2 <__bad_interrupt>
  18:	5c c0       	rjmp	.+184    	; 0xd2 <__bad_interrupt>
  1a:	5b c0       	rjmp	.+182    	; 0xd2 <__bad_interrupt>
  1c:	5a c0       	rjmp	.+180    	; 0xd2 <__bad_interrupt>
  1e:	59 c0       	rjmp	.+178    	; 0xd2 <__bad_interrupt>
  20:	58 c0       	rjmp	.+176    	; 0xd2 <__bad_interrupt>
  22:	57 c0       	rjmp	.+174    	; 0xd2 <__bad_interrupt>
  24:	56 c0       	rjmp	.+172    	; 0xd2 <__bad_interrupt>

00000026 <__ctors_end>:
  26:	00 00       	nop
  28:	01 00       	.word	0x0001	; ????
  2a:	00 03       	mulsu	r16, r16
  2c:	00 00       	nop
  2e:	05 00       	.word	0x0005	; ????
  30:	01 01       	movw	r0, r2
  32:	00 02       	muls	r16, r16
  34:	02 00       	.word	0x0002	; ????
  36:	04 03       	mulsu	r16, r20
  38:	00 08       	sbc	r0, r0
  3a:	06 01       	movw	r0, r12
  3c:	07 03       	mulsu	r16, r23
  3e:	03 04       	cpc	r0, r3
  40:	05 00       	.word	0x0005	; ????

00000042 <dInfo>:
  42:	00 19 00 28 00 3b 00 19                             ...(.;..

0000004a <lines>:
  4a:	20 20 20 52 6f 74 61 74 69 6f 6e 73 7c 20 20 20        Rotations|   
  5a:	20 20 20 30 30 30 30 20 20 20 20 20 20 52 50 4d        0000      RPM
  6a:	7c 20 20 20 20 20 20 30 30 30 30 20 20 20 20 20     |      0000     
  7a:	20 a0 20 20 20 20 20 54 69 6d 65 7c 20 20 20 20      .     Time|    
  8a:	20 30 30 3a 30 30 3a 30 30 20 20 20 20 00            00:00:00    .

00000098 <lineOffsets>:
  98:	00 0d 17 21 31 3d 00 0d                             ...!1=..

000000a0 <__init>:
  a0:	11 24       	eor	r1, r1
  a2:	1f be       	out	0x3f, r1	; 63
  a4:	cf ed       	ldi	r28, 0xDF	; 223
  a6:	cd bf       	out	0x3d, r28	; 61

000000a8 <__do_copy_data>:
  a8:	10 e0       	ldi	r17, 0x00	; 0
  aa:	a0 e6       	ldi	r26, 0x60	; 96
  ac:	b0 e0       	ldi	r27, 0x00	; 0
  ae:	e6 ef       	ldi	r30, 0xF6	; 246
  b0:	f7 e0       	ldi	r31, 0x07	; 7
  b2:	03 c0       	rjmp	.+6      	; 0xba <.do_copy_data_start>

000000b4 <.do_copy_data_loop>:
  b4:	c8 95       	lpm
  b6:	31 96       	adiw	r30, 0x01	; 1
  b8:	0d 92       	st	X+, r0

000000ba <.do_copy_data_start>:
  ba:	a8 37       	cpi	r26, 0x78	; 120
  bc:	b1 07       	cpc	r27, r17
  be:	d1 f7       	brne	.-12     	; 0xb4 <.do_copy_data_loop>

000000c0 <__do_clear_bss>:
  c0:	10 e0       	ldi	r17, 0x00	; 0
  c2:	a8 e7       	ldi	r26, 0x78	; 120
  c4:	b0 e0       	ldi	r27, 0x00	; 0
  c6:	01 c0       	rjmp	.+2      	; 0xca <.do_clear_bss_start>

000000c8 <.do_clear_bss_loop>:
  c8:	1d 92       	st	X+, r1

000000ca <.do_clear_bss_start>:
  ca:	a8 3a       	cpi	r26, 0xA8	; 168
  cc:	b1 07       	cpc	r27, r17
  ce:	e1 f7       	brne	.-8      	; 0xc8 <.do_clear_bss_loop>
  d0:	9b c2       	rjmp	.+1334   	; 0x608 <main>

000000d2 <__bad_interrupt>:
  d2:	96 cf       	rjmp	.-212    	; 0x0 <__vectors>

000000d4 <clock_scroll>:
// Sends 4 bytes + sCount extra bits over the serial link
// to implement smooth scrolling.  Can be used with a 0
// parameter to just send out the regular 4 bytes.

void clock_scroll(uint8_t sCount) {
  d4:	cf 93       	push	r28
  d6:	c8 2f       	mov	r28, r24

  // First, send the basic 4 bytes, they go no matter what
  
  spi_transfer(fleds[0]);
  d8:	80 91 84 00 	lds	r24, 0x0084
  dc:	50 d3       	rcall	.+1696   	; 0x77e <spi_transfer>
  spi_transfer(fleds[1]);
  de:	80 91 85 00 	lds	r24, 0x0085
  e2:	4d d3       	rcall	.+1690   	; 0x77e <spi_transfer>
  spi_transfer(fleds[2]);
  e4:	80 91 86 00 	lds	r24, 0x0086
  e8:	4a d3       	rcall	.+1684   	; 0x77e <spi_transfer>
  spi_transfer(fleds[3]);
  ea:	80 91 87 00 	lds	r24, 0x0087
  ee:	47 d3       	rcall	.+1678   	; 0x77e <spi_transfer>
 
  // If there is anything to do..
  
  if (sCount != 0) {
  f0:	cc 23       	and	r28, r28
  f2:	79 f0       	breq	.+30     	; 0x112 <__stack+0x33>
  
    // If we have < 8 bits to transfer
    
    if (sCount < 8) {
  f4:	c8 30       	cpi	r28, 0x08	; 8
  f6:	20 f4       	brcc	.+8      	; 0x100 <__stack+0x21>
    
       // Then that is all that we need to do
       
       spi_transfer_n(fleds[4],sCount);
  f8:	6c 2f       	mov	r22, r28
  fa:	80 91 88 00 	lds	r24, 0x0088
  fe:	08 c0       	rjmp	.+16     	; 0x110 <__stack+0x31>
       
    } else {
    
      // First latch out the full first 8 bits
       
  	  spi_transfer(fleds[4]);
 100:	80 91 88 00 	lds	r24, 0x0088
 104:	3c d3       	rcall	.+1656   	; 0x77e <spi_transfer>
  	   
  	  // How many bits left to do?
  	   
  	  sCount = sCount - 8;
 106:	c8 50       	subi	r28, 0x08	; 8
  	   
  	  if (sCount != 0) {
 108:	21 f0       	breq	.+8      	; 0x112 <__stack+0x33>
  	   
        spi_transfer_n(fleds[5],sCount);
 10a:	6c 2f       	mov	r22, r28
 10c:	80 91 89 00 	lds	r24, 0x0089
 110:	28 d3       	rcall	.+1616   	; 0x762 <spi_transfer_n>
         
  	  }
  	   
  	}
  	
  }
   
  // finally, latch the bits into the LEDS
  
  LATCH_SELECT_PORT |= _BV(FRONT);
 112:	94 9a       	sbi	0x12, 4	; 18
	...
  NOP; NOP; NOP; NOP;
  LATCH_SELECT_PORT &= ~_BV(FRONT);
 11c:	94 98       	cbi	0x12, 4	; 18
 11e:	cf 91       	pop	r28
 120:	08 95       	ret

00000122 <__vector_6>:

}

// TIMER0 interrupt handler.  This runs about every 8ms
// AFAICT.  It increments the hall_debounce and sensor_timer
// values until they pin.

// QUESTION: what's with the setting and clearing of PORTB0?
// According to the wiring diagram, it isn't connected to
// anything.  Is this vestigial code from when you were using
// Pin Change Interrupts?  Or is it debugger code so you
// can monitor the pins and tell when something happens.

SIGNAL (SIG_TIMER0_OVF) {
 122:	1f 92       	push	r1
 124:	0f 92       	push	r0
 126:	0f b6       	in	r0, 0x3f	; 63
 128:	0f 92       	push	r0
 12a:	11 24       	eor	r1, r1
 12c:	2f 93       	push	r18
 12e:	8f 93       	push	r24
 130:	9f 93       	push	r25

  // *** PORTB |= 0x1;

  // Let hall_debounce just wrap around.  At worst it'll just
  // mess things up for one of the initial speedup rotations
  // of the blade...
  
  // if (hall_debounce != 0xFF)
  
  hall_debounce++;
 132:	80 91 81 00 	lds	r24, 0x0081
 136:	8f 5f       	subi	r24, 0xFF	; 255
 138:	80 93 81 00 	sts	0x0081, r24
  
  if (sensor_timer.bytes.high_byte != 0xFF)
 13c:	80 91 83 00 	lds	r24, 0x0083
 140:	8f 3f       	cpi	r24, 0xFF	; 255
 142:	49 f0       	breq	.+18     	; 0x156 <__vector_6+0x34>
    sensor_timer.word++;
 144:	80 91 82 00 	lds	r24, 0x0082
 148:	90 91 83 00 	lds	r25, 0x0083
 14c:	01 96       	adiw	r24, 0x01	; 1
 14e:	90 93 83 00 	sts	0x0083, r25
 152:	80 93 82 00 	sts	0x0082, r24

  #if NUM_LINES > 0

    // Increment the line timer - we only need to do this
    // if we are scrolling
  
    if (line_timer != 0xFF) {
 156:	80 91 66 00 	lds	r24, 0x0066
 15a:	8f 3f       	cpi	r24, 0xFF	; 255
 15c:	29 f0       	breq	.+10     	; 0x168 <__vector_6+0x46>
      line_timer++;
 15e:	80 91 66 00 	lds	r24, 0x0066
 162:	8f 5f       	subi	r24, 0xFF	; 255
 164:	80 93 66 00 	sts	0x0066, r24
    }
  
  #endif

  #ifdef DYNAMIC_TIME
  
    // Increment the dynamic time fractional seconds byte
    
    dynamicTimeCounter.word += DYNAMIC_TIME_CALIBRATION;
 168:	80 91 7f 00 	lds	r24, 0x007F
 16c:	90 91 80 00 	lds	r25, 0x0080
 170:	84 5f       	subi	r24, 0xF4	; 244
 172:	9e 4f       	sbci	r25, 0xFE	; 254
 174:	90 93 80 00 	sts	0x0080, r25
 178:	80 93 7f 00 	sts	0x007F, r24
    
    if (dynamicTimeCounter.bytes.high_byte > 0x7F) {
 17c:	80 91 80 00 	lds	r24, 0x0080
 180:	87 ff       	sbrs	r24, 7
 182:	4f c0       	rjmp	.+158    	; 0x222 <__vector_6+0x100>
    
      // wrap the counter
       
      dynamicTimeCounter.bytes.high_byte &= 0x7F;
 184:	80 91 80 00 	lds	r24, 0x0080
 188:	8f 77       	andi	r24, 0x7F	; 127
 18a:	80 93 80 00 	sts	0x0080, r24
       
      // Add 1 second to the time HH:MM:SS
      //                          76-43-10
      // Bytes in reverse order
      
      // Increment seconds
       
      dynamicTime[0]++;
 18e:	80 91 68 00 	lds	r24, 0x0068
 192:	8f 5f       	subi	r24, 0xFF	; 255
 194:	80 93 68 00 	sts	0x0068, r24
       
      // Check for units seconds overflow - has the digit become 10?
       
      if ( dynamicTime[0] == ':' ) {
 198:	80 91 68 00 	lds	r24, 0x0068
 19c:	8a 33       	cpi	r24, 0x3A	; 58
 19e:	09 f0       	breq	.+2      	; 0x1a2 <__vector_6+0x80>
 1a0:	40 c0       	rjmp	.+128    	; 0x222 <__vector_6+0x100>
       
        // If so, reset it and increment 10's digit
          
        dynamicTime[0] = '0';
 1a2:	20 e3       	ldi	r18, 0x30	; 48
 1a4:	20 93 68 00 	sts	0x0068, r18
        dynamicTime[1]++;
 1a8:	80 91 69 00 	lds	r24, 0x0069
 1ac:	8f 5f       	subi	r24, 0xFF	; 255
 1ae:	80 93 69 00 	sts	0x0069, r24
        
        // Repeat the process for the 10s seconds digit, has it become
        // 6?
          
        if ( dynamicTime[1] == '6' ) {
 1b2:	80 91 69 00 	lds	r24, 0x0069
 1b6:	86 33       	cpi	r24, 0x36	; 54
 1b8:	a1 f5       	brne	.+104    	; 0x222 <__vector_6+0x100>
          
           // reset it and increment minutes digit
             
           dynamicTime[1] = '0';
 1ba:	20 93 69 00 	sts	0x0069, r18
           dynamicTime[3]++;
 1be:	80 91 6b 00 	lds	r24, 0x006B
 1c2:	8f 5f       	subi	r24, 0xFF	; 255
 1c4:	80 93 6b 00 	sts	0x006B, r24
             
           // Repeat process for minutes
             
           if ( dynamicTime[3] == ':' ) {
 1c8:	80 91 6b 00 	lds	r24, 0x006B
 1cc:	8a 33       	cpi	r24, 0x3A	; 58
 1ce:	49 f5       	brne	.+82     	; 0x222 <__vector_6+0x100>
       
          	 // You should get the idea now...
          	 
          	 dynamicTime[3] = '0';
 1d0:	20 93 6b 00 	sts	0x006B, r18
          	 dynamicTime[4]++;
 1d4:	80 91 6c 00 	lds	r24, 0x006C
 1d8:	8f 5f       	subi	r24, 0xFF	; 255
 1da:	80 93 6c 00 	sts	0x006C, r24
                    
          	 if ( dynamicTime[4] == '6' ) {
 1de:	80 91 6c 00 	lds	r24, 0x006C
 1e2:	86 33       	cpi	r24, 0x36	; 54
 1e4:	f1 f4       	brne	.+60     	; 0x222 <__vector_6+0x100>
          
               dynamicTime[4] = '0';
 1e6:	20 93 6c 00 	sts	0x006C, r18
               dynamicTime[6]++;
 1ea:	80 91 6e 00 	lds	r24, 0x006E
 1ee:	8f 5f       	subi	r24, 0xFF	; 255
 1f0:	80 93 6e 00 	sts	0x006E, r24
             
               // and 10s of hours
               
               if ( dynamicTime[6] == ':' ) {
 1f4:	80 91 6e 00 	lds	r24, 0x006E
 1f8:	8a 33       	cpi	r24, 0x3A	; 58
 1fa:	39 f4       	brne	.+14     	; 0x20a <__vector_6+0xe8>
               
                 dynamicTime[6] = '0';
 1fc:	20 93 6e 00 	sts	0x006E, r18
                 dynamicTime[7]++;
 200:	80 91 6f 00 	lds	r24, 0x006F
 204:	8f 5f       	subi	r24, 0xFF	; 255
 206:	80 93 6f 00 	sts	0x006F, r24
                 
               }
               
               // handle special wrap
               
			   #ifdef DYNAMIC_TIME_12H
			   
			     if ( (dynamicTime[7] == '1') && (dynamicTime[6] == '3') ) {
 20a:	90 91 6f 00 	lds	r25, 0x006F
 20e:	91 33       	cpi	r25, 0x31	; 49
 210:	41 f4       	brne	.+16     	; 0x222 <__vector_6+0x100>
 212:	80 91 6e 00 	lds	r24, 0x006E
 216:	83 33       	cpi	r24, 0x33	; 51
 218:	21 f4       	brne	.+8      	; 0x222 <__vector_6+0x100>
			     
			        dynamicTime[7] = '0';
 21a:	20 93 6f 00 	sts	0x006F, r18
			        dynamicTime[6] = '1';

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -