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

📄 spokepov.lss

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

spokepov.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000003fe  00000000  00000000  00000094  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000000  00800060  000003fe  00000492  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          0000000f  00800060  00800060  00000492  2**0
                  ALLOC
  3 .noinit       00000000  0080006f  0080006f  00000492  2**0
                  CONTENTS
  4 .eeprom       00000000  00810000  00810000  00000492  2**0
                  CONTENTS
  5 .stab         00000354  00000000  00000000  00000494  2**2
                  CONTENTS, READONLY, DEBUGGING
  6 .stabstr      00000084  00000000  00000000  000007e8  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_aranges 00000028  00000000  00000000  0000086c  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_pubnames 0000016f  00000000  00000000  00000894  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_info   0000047c  00000000  00000000  00000a03  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_abbrev 00000206  00000000  00000000  00000e7f  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_line   0000041f  00000000  00000000  00001085  2**0
                  CONTENTS, READONLY, DEBUGGING
 12 .debug_str    00000253  00000000  00000000  000014a4  2**0
                  CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

00000000 <__vectors>:
   0:	18 c0       	rjmp	.+48     	; 0x32 <__init>
   2:	ca c0       	rjmp	.+404    	; 0x198 <__vector_1>
   4:	ee c0       	rjmp	.+476    	; 0x1e2 <__vector_2>
   6:	2e c0       	rjmp	.+92     	; 0x64 <__bad_interrupt>
   8:	7a c0       	rjmp	.+244    	; 0xfe <__vector_4>
   a:	2c c0       	rjmp	.+88     	; 0x64 <__bad_interrupt>
   c:	53 c0       	rjmp	.+166    	; 0xb4 <__vector_6>
   e:	2a c0       	rjmp	.+84     	; 0x64 <__bad_interrupt>
  10:	29 c0       	rjmp	.+82     	; 0x64 <__bad_interrupt>
  12:	28 c0       	rjmp	.+80     	; 0x64 <__bad_interrupt>
  14:	27 c0       	rjmp	.+78     	; 0x64 <__bad_interrupt>
  16:	26 c0       	rjmp	.+76     	; 0x64 <__bad_interrupt>
  18:	25 c0       	rjmp	.+74     	; 0x64 <__bad_interrupt>
  1a:	24 c0       	rjmp	.+72     	; 0x64 <__bad_interrupt>
  1c:	23 c0       	rjmp	.+70     	; 0x64 <__bad_interrupt>
  1e:	22 c0       	rjmp	.+68     	; 0x64 <__bad_interrupt>
  20:	21 c0       	rjmp	.+66     	; 0x64 <__bad_interrupt>
  22:	20 c0       	rjmp	.+64     	; 0x64 <__bad_interrupt>
  24:	1f c0       	rjmp	.+62     	; 0x64 <__bad_interrupt>

00000026 <__ctors_end>:
  26:	10 10       	cpse	r1, r0
  28:	10 10       	cpse	r1, r0
  2a:	10 10       	cpse	r1, r0

0000002c <elementList>:
  2c:	00 01 02 03 02 01                                   ......

00000032 <__init>:
  32:	11 24       	eor	r1, r1
  34:	1f be       	out	0x3f, r1	; 63
  36:	cf ed       	ldi	r28, 0xDF	; 223
  38:	cd bf       	out	0x3d, r28	; 61

0000003a <__do_copy_data>:
  3a:	10 e0       	ldi	r17, 0x00	; 0
  3c:	a0 e6       	ldi	r26, 0x60	; 96
  3e:	b0 e0       	ldi	r27, 0x00	; 0
  40:	ee ef       	ldi	r30, 0xFE	; 254
  42:	f3 e0       	ldi	r31, 0x03	; 3
  44:	03 c0       	rjmp	.+6      	; 0x4c <.do_copy_data_start>

00000046 <.do_copy_data_loop>:
  46:	c8 95       	lpm
  48:	31 96       	adiw	r30, 0x01	; 1
  4a:	0d 92       	st	X+, r0

0000004c <.do_copy_data_start>:
  4c:	a0 36       	cpi	r26, 0x60	; 96
  4e:	b1 07       	cpc	r27, r17
  50:	d1 f7       	brne	.-12     	; 0x46 <.do_copy_data_loop>

00000052 <__do_clear_bss>:
  52:	10 e0       	ldi	r17, 0x00	; 0
  54:	a0 e6       	ldi	r26, 0x60	; 96
  56:	b0 e0       	ldi	r27, 0x00	; 0
  58:	01 c0       	rjmp	.+2      	; 0x5c <.do_clear_bss_start>

0000005a <.do_clear_bss_loop>:
  5a:	1d 92       	st	X+, r1

0000005c <.do_clear_bss_start>:
  5c:	af 36       	cpi	r26, 0x6F	; 111
  5e:	b1 07       	cpc	r27, r17
  60:	e1 f7       	brne	.-8      	; 0x5a <.do_clear_bss_loop>
  62:	70 c1       	rjmp	.+736    	; 0x344 <main>

00000064 <__bad_interrupt>:
  64:	cd cf       	rjmp	.-102    	; 0x0 <__vectors>

00000066 <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) {
  66:	cf 93       	push	r28
  68:	c8 2f       	mov	r28, r24

  // First, send the basic 4 bytes, they go no matter what
  
  spi_transfer(fleds[0]);
  6a:	80 91 69 00 	lds	r24, 0x0069
  6e:	97 d1       	rcall	.+814    	; 0x39e <spi_transfer>
  spi_transfer(fleds[1]);
  70:	80 91 6a 00 	lds	r24, 0x006A
  74:	94 d1       	rcall	.+808    	; 0x39e <spi_transfer>
  spi_transfer(fleds[2]);
  76:	80 91 6b 00 	lds	r24, 0x006B
  7a:	91 d1       	rcall	.+802    	; 0x39e <spi_transfer>
  spi_transfer(fleds[3]);
  7c:	80 91 6c 00 	lds	r24, 0x006C
  80:	8e d1       	rcall	.+796    	; 0x39e <spi_transfer>
 
  // If there is anything to do..
  
  if (sCount != 0) {
  82:	cc 23       	and	r28, r28
  84:	79 f0       	breq	.+30     	; 0xa4 <clock_scroll+0x3e>
  
    // If we have < 8 bits to transfer
    
    if (sCount < 8) {
  86:	c8 30       	cpi	r28, 0x08	; 8
  88:	20 f4       	brcc	.+8      	; 0x92 <clock_scroll+0x2c>
    
       // Then that is all that we need to do
       
       spi_transfer_n(fleds[4],sCount);
  8a:	6c 2f       	mov	r22, r28
  8c:	80 91 6d 00 	lds	r24, 0x006D
  90:	08 c0       	rjmp	.+16     	; 0xa2 <clock_scroll+0x3c>
       
    } else {
    
      // First latch out the full first 8 bits
       
  	  spi_transfer(fleds[4]);
  92:	80 91 6d 00 	lds	r24, 0x006D
  96:	83 d1       	rcall	.+774    	; 0x39e <spi_transfer>
  	   
  	  // How many bits left to do?
  	   
  	  sCount = sCount - 8;
  98:	c8 50       	subi	r28, 0x08	; 8
  	   
  	  if (sCount != 0) {
  9a:	21 f0       	breq	.+8      	; 0xa4 <clock_scroll+0x3e>
  	   
        spi_transfer_n(fleds[5],sCount);
  9c:	6c 2f       	mov	r22, r28
  9e:	80 91 6e 00 	lds	r24, 0x006E
  a2:	6f d1       	rcall	.+734    	; 0x382 <spi_transfer_n>
         
  	  }
  	   
  	}
  	
  }
   
  // finally, latch the bits into the LEDS
  
  LATCH_SELECT_PORT |= _BV(FRONT);
  a4:	94 9a       	sbi	0x12, 4	; 18
	...
  NOP; NOP; NOP; NOP;
  LATCH_SELECT_PORT &= ~_BV(FRONT);
  ae:	94 98       	cbi	0x12, 4	; 18
  b0:	cf 91       	pop	r28
  b2:	08 95       	ret

000000b4 <__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) {
  b4:	1f 92       	push	r1
  b6:	0f 92       	push	r0
  b8:	0f b6       	in	r0, 0x3f	; 63
  ba:	0f 92       	push	r0
  bc:	11 24       	eor	r1, r1
  be:	8f 93       	push	r24
  c0:	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++;
  c2:	80 91 64 00 	lds	r24, 0x0064
  c6:	8f 5f       	subi	r24, 0xFF	; 255
  c8:	80 93 64 00 	sts	0x0064, r24
  
  if (sensor_timer.bytes.high_byte != 0xFF)
  cc:	80 91 66 00 	lds	r24, 0x0066
  d0:	8f 3f       	cpi	r24, 0xFF	; 255
  d2:	49 f0       	breq	.+18     	; 0xe6 <__stack+0x7>
    sensor_timer.word++;
  d4:	80 91 65 00 	lds	r24, 0x0065
  d8:	90 91 66 00 	lds	r25, 0x0066
  dc:	01 96       	adiw	r24, 0x01	; 1
  de:	90 93 66 00 	sts	0x0066, r25
  e2:	80 93 65 00 	sts	0x0065, r24

  // Increment the line timer.
  
  line_timer++;				// increment the low byte
  e6:	80 91 60 00 	lds	r24, 0x0060
  ea:	8f 5f       	subi	r24, 0xFF	; 255
  ec:	80 93 60 00 	sts	0x0060, r24
  f0:	9f 91       	pop	r25
  f2:	8f 91       	pop	r24
  f4:	0f 90       	pop	r0
  f6:	0f be       	out	0x3f, r0	; 63
  f8:	0f 90       	pop	r0
  fa:	1f 90       	pop	r1
  fc:	18 95       	reti

000000fe <__vector_4>:
            
}

// This routine gets called every time the pixel timer runs down;
// in other words, once per "scan line", 256 times per revolution
// of the SpokePOV.  Its purpose is to update the LEDs.  All it
// has to do at this point is copy from the EEPROM

SIGNAL (SIG_TIMER1_COMPA) {
  fe:	1f 92       	push	r1
 100:	0f 92       	push	r0
 102:	0f b6       	in	r0, 0x3f	; 63
 104:	0f 92       	push	r0
 106:	11 24       	eor	r1, r1
 108:	2f 93       	push	r18
 10a:	3f 93       	push	r19
 10c:	4f 93       	push	r20
 10e:	5f 93       	push	r21
 110:	6f 93       	push	r22
 112:	7f 93       	push	r23
 114:	8f 93       	push	r24
 116:	9f 93       	push	r25
 118:	af 93       	push	r26
 11a:	bf 93       	push	r27
 11c:	ef 93       	push	r30
 11e:	ff 93       	push	r31

  // If it has been less than STANDBY_TIMEOUT seconds since the last time we
  // got a Hall Effect sensor update, then proceed as normal and
  // update the LEDs.
  
  // QUESTION: what is F_CPU?  ANSWER: FREQUENCY OF CPU (clocks/second)
  
  if (sensor_timer.bytes.high_byte < ( (F_CPU/NUM_PIXELS)/256 * STANDBY_TIMEOUT) / 256) {    
 120:	80 91 66 00 	lds	r24, 0x0066
 124:	82 30       	cpi	r24, 0x02	; 2
 126:	38 f5       	brcc	.+78     	; 0x176 <__vector_4+0x78>
    
    // Unfortunately, we can't do the cute "read from the EEPROM right
    // into the LEDs trick" that limor can do in SpokePOV.  We have to
    // read the data into the ATMEL and then write it out.
    
    // In this early version, we could, but later versions will have
    // some tricks, so keep it simple
    
    
    spieeprom_read(eepromPtr.word,fleds,4);	// read in the 4 bytes
 128:	44 e0       	ldi	r20, 0x04	; 4
 12a:	69 e6       	ldi	r22, 0x69	; 105
 12c:	70 e0       	ldi	r23, 0x00	; 0
 12e:	80 91 6d 00 	lds	r24, 0x006D
 132:	90 91 6e 00 	lds	r25, 0x006E
 136:	3d d1       	rcall	.+634    	; 0x3b2 <spieeprom_read>
    eepromPtr.word += 4;						// increment the pointer
 138:	80 91 6d 00 	lds	r24, 0x006D
 13c:	90 91 6e 00 	lds	r25, 0x006E
 140:	04 96       	adiw	r24, 0x04	; 4
 142:	90 93 6e 00 	sts	0x006E, r25
 146:	80 93 6d 00 	sts	0x006D, r24
    
    // If we have somehow wrapped around, and are displaying more than
    // 256 radial pixels without a reset, then turn off the display
    
    if ( eepromPtr.word > eepromLimit.word ) {
 14a:	20 91 6d 00 	lds	r18, 0x006D
 14e:	30 91 6e 00 	lds	r19, 0x006E
 152:	80 91 67 00 	lds	r24, 0x0067
 156:	90 91 68 00 	lds	r25, 0x0068
 15a:	82 17       	cp	r24, r18
 15c:	93 07       	cpc	r25, r19
 15e:	48 f4       	brcc	.+18     	; 0x172 <__vector_4+0x74>
      fleds[0] = fleds[1] = fleds[2] = fleds[3] = 0xFF;
 160:	8f ef       	ldi	r24, 0xFF	; 255
 162:	80 93 6c 00 	sts	0x006C, r24
 166:	80 93 6b 00 	sts	0x006B, r24
 16a:	80 93 6a 00 	sts	0x006A, r24
 16e:	80 93 69 00 	sts	0x0069, r24
    }
   
    clock_scroll(0);							// send the 4 bytes
 172:	80 e0       	ldi	r24, 0x00	; 0
 174:	78 df       	rcall	.-272    	; 0x66 <clock_scroll>
 176:	ff 91       	pop	r31
 178:	ef 91       	pop	r30
 17a:	bf 91       	pop	r27
 17c:	af 91       	pop	r26
 17e:	9f 91       	pop	r25
 180:	8f 91       	pop	r24
 182:	7f 91       	pop	r23
 184:	6f 91       	pop	r22
 186:	5f 91       	pop	r21
 188:	4f 91       	pop	r20
 18a:	3f 91       	pop	r19
 18c:	2f 91       	pop	r18
 18e:	0f 90       	pop	r0
 190:	0f be       	out	0x3f, r0	; 63
 192:	0f 90       	pop	r0
 194:	1f 90       	pop	r1
 196:	18 95       	reti

00000198 <__vector_1>:

  }

}

// Interrupt 0 executes when the button is pressed.

// QUESTION: unlike the pixel output interrupt, this one
// doesn't sei().  Why?

SIGNAL (SIG_INT0) {
 198:	1f 92       	push	r1
 19a:	0f 92       	push	r0

⌨️ 快捷键说明

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