📄 splc051.lst
字号:
676 04a4 0011 .word 4352
677 04a6 8020 .word 8320
678 04a8 8020 .word 8320
679 04aa 80A0 .word -24448
680 04ac 80FF .word -128
681 04ae 0080 .word -32768
682 04b0 8020 .word 8320
683 04b2 8020 .word 8320
684 04b4 803F .word 16256
685 04b6 0021 .word 8448
686 04b8 8020 .word 8320
687 04ba 8000 .word 128
688 04bc 8001 .word 384
689 04be 0000 .word 0
690 04c0 0000 .word 0
691 04c2 0033 .word 13056
692 04c4 8024 .word 9344
693 04c6 8024 .word 9344
694 04c8 8024 .word 9344
695 04ca 8024 .word 9344
696 04cc 8019 .word 6528
697 04ce 0000 .word 0
698 04d0 0000 .word 0
699 04d2 8000 .word 128
700 04d4 8000 .word 128
701 04d6 E01F .word 8160
702 04d8 8020 .word 8320
703 04da 8020 .word 8320
704 04dc 0000 .word 0
705 04de 0000 .word 0
706 04e0 8000 .word 128
707 04e2 801F .word 8064
708 04e4 0020 .word 8192
709 04e6 0020 .word 8192
710 04e8 0020 .word 8192
711 04ea 8010 .word 4224
712 04ec 803F .word 16256
713 04ee 0020 .word 8192
714 04f0 8000 .word 128
715 04f2 8001 .word 384
716 04f4 800E .word 3712
717 04f6 0030 .word 12288
718 04f8 0008 .word 2048
719 04fa 8006 .word 1664
720 04fc 8001 .word 384
721 04fe 8000 .word 128
722 0500 800F .word 3968
723 0502 8030 .word 12416
724 0504 000C .word 3072
725 0506 8003 .word 896
726 0508 000C .word 3072
727 050a 8030 .word 12416
728 050c 800F .word 3968
729 050e 8000 .word 128
730 0510 0000 .word 0
731 0512 8020 .word 8320
732 0514 8031 .word 12672
733 0516 002E .word 11776
734 0518 800E .word 3712
735 051a 8031 .word 12672
736 051c 8020 .word 8320
737 051e 0000 .word 0
738 0520 8080 .word -32640
739 0522 8081 .word -32384
740 0524 808E .word -29056
741 0526 0070 .word 28672
742 0528 0018 .word 6144
743 052a 8006 .word 1664
744 052c 8001 .word 384
745 052e 8000 .word 128
746 0530 0000 .word 0
747 0532 8021 .word 8576
748 0534 8030 .word 12416
749 0536 802C .word 11392
750 0538 8022 .word 8832
751 053a 8021 .word 8576
752 053c 8030 .word 12416
753 053e 0000 .word 0
754 .text
756 .global LED_test
758 LED_test:
1:SPLC051.c **** //***************************************************************************//
2:SPLC051.c **** //文件描述:SPLC501用户接口驱动程序,
3:SPLC051.c **** //
4:SPLC051.c **** //声明: 小丑 20050519 Sunnorth Mz Design
5:SPLC051.c **** //
6:SPLC051.c **** //
7:SPLC051.c **** //***************************************************************************//
8:SPLC051.c **** //头文件
9:SPLC051.c **** #include <avr/io.h>
10:SPLC051.c **** #include <avr/signal.h>
11:SPLC051.c **** #include <avr/delay.h>
12:SPLC051.c **** //自定义头文件
13:SPLC051.c **** #include "SPLC051.h"
14:SPLC051.c **** #include "main.h"
15:SPLC051.c **** //宏定义
16:SPLC051.c **** #define CS1 0
17:SPLC051.c **** #define RES 1
18:SPLC051.c **** #define A0 2
19:SPLC051.c **** #define RW 3
20:SPLC051.c **** #define EP 4
21:SPLC051.c **** #define LED0() PORTB|=(1<<PB1)
22:SPLC051.c **** #define LED1() PORTB&=~(1<<PB1)
23:SPLC051.c ****
24:SPLC051.c **** unsigned int CurPaintMode; //Show Mode Cover of XOR
25:SPLC051.c **** unsigned int CurPowerMode; //Show the Power Mode of LCD501
26:SPLC051.c **** unsigned int CurLCDSet; //Show the LCD Set灰度
27:SPLC051.c **** unsigned int CurScroll; //Show the scroll dotes
28:SPLC051.c **** unsigned int CurScrMode; //显示正相/反相(1/0)
29:SPLC051.c **** unsigned int CurASCIIFont; //当前ASCII码的字号(8X16/6X8)
30:SPLC051.c ****
31:SPLC051.c **** //**************
32:SPLC051.c **** void LED_test(void)
33:SPLC051.c **** {
760 .LM1:
761 /* prologue: frame size=0 */
762 /* prologue end (size=0) */
763 0000 4FEF ldi r20,lo8(-1)
764 0002 A0E0 ldi r26,lo8(0)
765 0004 B0E0 ldi r27,hi8(0)
766 .L2:
34:SPLC051.c **** while(1)
35:SPLC051.c **** {
36:SPLC051.c **** PORTB=0xff;
768 .LM2:
769 0006 48BB out 56-0x20,r20
37:SPLC051.c **** LED1();
771 .LM3:
772 0008 C198 cbi 56-0x20,1
773 000a 21E3 ldi r18,lo8(49)
774 000c 30E0 ldi r19,hi8(49)
775 .L15:
776 .LBB2:
777 .LBB3:
778 .LBB4:
779 .LBB5:
780 .LBB6:
782 .Ltext1:
1:f:/WinAVR/avr/include/util/delay.h **** /* Copyright (c) 2002, Marek Michalkiewicz
2:f:/WinAVR/avr/include/util/delay.h **** Copyright (c) 2004,2005 Joerg Wunsch
3:f:/WinAVR/avr/include/util/delay.h **** All rights reserved.
4:f:/WinAVR/avr/include/util/delay.h ****
5:f:/WinAVR/avr/include/util/delay.h **** Redistribution and use in source and binary forms, with or without
6:f:/WinAVR/avr/include/util/delay.h **** modification, are permitted provided that the following conditions are met:
7:f:/WinAVR/avr/include/util/delay.h ****
8:f:/WinAVR/avr/include/util/delay.h **** * Redistributions of source code must retain the above copyright
9:f:/WinAVR/avr/include/util/delay.h **** notice, this list of conditions and the following disclaimer.
10:f:/WinAVR/avr/include/util/delay.h ****
11:f:/WinAVR/avr/include/util/delay.h **** * Redistributions in binary form must reproduce the above copyright
12:f:/WinAVR/avr/include/util/delay.h **** notice, this list of conditions and the following disclaimer in
13:f:/WinAVR/avr/include/util/delay.h **** the documentation and/or other materials provided with the
14:f:/WinAVR/avr/include/util/delay.h **** distribution.
15:f:/WinAVR/avr/include/util/delay.h ****
16:f:/WinAVR/avr/include/util/delay.h **** * Neither the name of the copyright holders nor the names of
17:f:/WinAVR/avr/include/util/delay.h **** contributors may be used to endorse or promote products derived
18:f:/WinAVR/avr/include/util/delay.h **** from this software without specific prior written permission.
19:f:/WinAVR/avr/include/util/delay.h ****
20:f:/WinAVR/avr/include/util/delay.h **** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21:f:/WinAVR/avr/include/util/delay.h **** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22:f:/WinAVR/avr/include/util/delay.h **** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23:f:/WinAVR/avr/include/util/delay.h **** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24:f:/WinAVR/avr/include/util/delay.h **** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25:f:/WinAVR/avr/include/util/delay.h **** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26:f:/WinAVR/avr/include/util/delay.h **** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27:f:/WinAVR/avr/include/util/delay.h **** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28:f:/WinAVR/avr/include/util/delay.h **** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29:f:/WinAVR/avr/include/util/delay.h **** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30:f:/WinAVR/avr/include/util/delay.h **** POSSIBILITY OF SUCH DAMAGE. */
31:f:/WinAVR/avr/include/util/delay.h ****
32:f:/WinAVR/avr/include/util/delay.h **** /* $Id: delay.h,v 1.1.2.1 2005/12/12 23:19:49 joerg_wunsch Exp $ */
33:f:/WinAVR/avr/include/util/delay.h ****
34:f:/WinAVR/avr/include/util/delay.h **** #ifndef _UTIL_DELAY_H_
35:f:/WinAVR/avr/include/util/delay.h **** #define _UTIL_DELAY_H_ 1
36:f:/WinAVR/avr/include/util/delay.h ****
37:f:/WinAVR/avr/include/util/delay.h **** #include <inttypes.h>
38:f:/WinAVR/avr/include/util/delay.h ****
39:f:/WinAVR/avr/include/util/delay.h **** /** \defgroup util_delay <util/delay.h>: Busy-wait delay loops
40:f:/WinAVR/avr/include/util/delay.h **** \code
41:f:/WinAVR/avr/include/util/delay.h **** #define F_CPU 1000000UL // 1 MHz
42:f:/WinAVR/avr/include/util/delay.h **** //#define F_CPU 14.7456E6
43:f:/WinAVR/avr/include/util/delay.h **** #include <util/delay.h>
44:f:/WinAVR/avr/include/util/delay.h **** \endcode
45:f:/WinAVR/avr/include/util/delay.h ****
46:f:/WinAVR/avr/include/util/delay.h **** \note As an alternative method, it is possible to pass the
47:f:/WinAVR/avr/include/util/delay.h **** F_CPU macro down to the compiler from the Makefile.
48:f:/WinAVR/avr/include/util/delay.h **** Obviously, in that case, no \c \#define statement should be
49:f:/WinAVR/avr/include/util/delay.h **** used.
50:f:/WinAVR/avr/include/util/delay.h ****
51:f:/WinAVR/avr/include/util/delay.h **** The functions in this header file implement simple delay loops
52:f:/WinAVR/avr/include/util/delay.h **** that perform a busy-waiting. They are typically used to
53:f:/WinAVR/avr/include/util/delay.h **** facilitate short delays in the program execution. They are
54:f:/WinAVR/avr/include/util/delay.h **** implemented as count-down loops with a well-known CPU cycle
55:f:/WinAVR/avr/include/util/delay.h **** count per loop iteration. As such, no other processing can
56:f:/WinAVR/avr/include/util/delay.h **** occur simultaneously. It should be kept in mind that the
57:f:/WinAVR/avr/include/util/delay.h **** functions described here do not disable interrupts.
58:f:/WinAVR/avr/include/util/delay.h ****
59:f:/WinAVR/avr/include/util/delay.h **** In general, for long delays, the use of hardware timers is
60:f:/WinAVR/avr/include/util/delay.h **** much preferrable, as they free the CPU, and allow for
61:f:/WinAVR/avr/include/util/delay.h **** concurrent processing of other events while the timer is
62:f:/WinAVR/avr/include/util/delay.h **** running. However, in particular for very short delays, the
63:f:/WinAVR/avr/include/util/delay.h **** overhead of setting up a hardware timer is too much compared
64:f:/WinAVR/avr/include/util/delay.h **** to the overall delay time.
65:f:/WinAVR/avr/include/util/delay.h ****
66:f:/WinAVR/avr/include/util/delay.h **** Two inline functions are provided for the actual delay algorithms.
67:f:/WinAVR/avr/include/util/delay.h ****
68:f:/WinAVR/avr/include/util/delay.h **** Two wrapper functions allow the specification of microsecond, and
69:f:/WinAVR/avr/include/util/delay.h **** millisecond delays directly, using the application-supplied macro
70:f:/WinAVR/avr/include/util/delay.h **** F_CPU as the CPU clock frequency (in Hertz). These functions
71:f:/WinAVR/avr/include/util/delay.h **** operate on double typed arguments, however when optimization is
72:f:/WinAVR/avr/include/util/delay.h **** turned on, the entire floating-point calculation will be done at
73:f:/WinAVR/avr/include/util/delay.h **** compile-time.
74:f:/WinAVR/avr/include/util/delay.h ****
75:f:/WinAVR/avr/include/util/delay.h **** \note When using _delay_us() and _delay_ms(), the expressions
76:f:/WinAVR/avr/include/util/delay.h **** passed as arguments to these functions shall be compile-time
77:f:/WinAVR/avr/include/util/delay.h **** constants, otherwise the floating-point calculations to setup the
78:f:/WinAVR/avr/include/util/delay.h **** loops will be done at run-time, thereby drastically increasing
79:f:/WinAVR/avr/include/util/delay.h **** both the resulting code size, as well as the time required to
80:f:/WinAVR/avr/include/util/delay.h **** setup the loops.
81:f:/WinAVR/avr/include/util/delay.h **** */
82:f:/WinAVR/avr/include/util/delay.h ****
83:f:/WinAVR/avr/include/util/delay.h **** #if !defined(__DOXYGEN__)
84:f:/WinAVR/avr/include/util/delay.h **** static inline void _delay_loop_1(uint8_t __count) __attribute__((always_inline));
85:f:/WinAVR/avr/include/util/delay.h **** static inline void _delay_loop_2(uint16_t __count) __attribute__((always_inline));
86:f:/WinAVR/avr/include/util/delay.h **** static inline void _delay_us(double __us) __attribute__((always_inline));
87:f:/WinAVR/avr/include/util/delay.h **** static inline void _delay_ms(double __ms) __attribute__((always_inline));
88:f:/WinAVR/avr/include/util/delay.h **** #endif
89:f:/WinAVR/avr/include/util/delay.h ****
90:f:/WinAVR/avr/include/util/delay.h **** /** \ingroup util_delay
91:f:/WinAVR/avr/include/util/delay.h ****
92:f:/WinAVR/avr/include/util/delay.h **** Delay loop using an 8-bit counter \c __count, so up to 256
93:f:/WinAVR/avr/include/util/delay.h **** iterations are possible. (The value 256 would have to be passed
94:f:/WinAVR/avr/include/util/delay.h **** as 0.) The loop executes three CPU cycles per iteration, not
95:f:/WinAVR/avr/include/util/delay.h **** including the overhead the compiler needs to setup the counter
96:f:/WinAVR/avr/include/util/delay.h **** register.
97:f:/WinAVR/avr/include/util/delay.h ****
98:f:/WinAVR/avr/include/util/delay.h **** Thus, at a CPU speed of 1 MHz, delays of up to 768 microseconds
99:f:/WinAVR/avr/include/util/delay.h **** can be achieved.
100:f:/WinAVR/avr/include/util/delay.h **** */
101:f:/WinAVR/avr/include/util/delay.h **** void
102:f:/WinAVR/avr/include/util/delay.h **** _delay_loop_1(uint8_t __count)
103:f:/WinAVR/avr/include/util/delay.h **** {
104:f:/WinAVR/avr/include/util/delay.h **** __asm__ volatile (
105:f:/WinAVR/avr/include/util/delay.h **** "1: dec %0" "\n\t"
106:f:/WinAVR/avr/include/util/delay.h **** "brne 1b"
107:f:/WinAVR/avr/include/util/delay.h **** : "=r" (__count)
108:f:/WinAVR/avr/include/util/delay.h **** : "0" (__count)
109:f:/WinAVR/avr/include/util/delay.h **** );
110:f:/WinAVR/avr/include/util/delay.h **** }
111:f:/WinAVR/avr/include/util/delay.h ****
112:f:/WinAVR/avr/include/util/delay.h **** /** \ingroup util_delay
113:f:/WinAVR/avr/include/util/delay.h ****
114:f:/WinAVR/avr/include/util/delay.h **** Delay loop using a 16-bit counter \c __count, so up to 65536
115:f:/WinAVR/avr/include/util/delay.h **** iterations are possible. (The value 65536 would have to be
116:f:/WinAVR/avr/include/util/delay.h **** passed as 0.) The loop executes four CPU cycles per iteration,
117:f:/WinAVR/avr/include/util/delay.h **** not including the overhead the compiler requires to setup the
118:f:/WinAVR/avr/include/util/delay.h **** counter register pair.
119:f:/WinAVR/avr/include/util/delay.h ****
120:f:/WinAVR/avr/include/util/delay.h **** Thus, at a CPU speed of 1 MHz, delays of up to about 262.1
121:f:/WinAVR/avr/include/util/delay.h **** milliseconds can be achieved.
122:f:/WinAVR/avr/include/util/delay.h **** */
123:f:/WinAVR/avr/include/util/delay.h **** void
124:f:/WinAVR/avr/include/util/delay.h **** _delay_loop_2(uint16_t __count)
125:f:/WinAVR/avr/include/util/delay.h **** {
126:f:/WinAVR/avr/include/util/delay.h **** __asm__ volatile (
784 .LM4:
785 000e CD01 movw r24,r26
786 /* #APP */
787 0010 0197 1: sbiw r24,1
788 0012 F1F7 brne 1b
789 /* #NOAPP */
790 .LBE6:
791 .LBE5:
792 .LBE4:
793 .LBE3:
795 .Ltext2:
38:SPLC051.c **** for(int i=0;i<50;i++)
797 .LM5:
798 0014 2150 subi r18,lo8(-(-1))
799 0016 3040 sbci r19,hi8(-(-1))
800 0018 37FF sbrs r19,7
801 001a F9CF rjmp .L15
802 .LBE2:
39:SPLC051.c **** _delay_ms(250);
40:SPLC051.c **** LED0();
804 .LM6:
805 001c C19A sbi 56-0x20,1
41:SPLC051.c **** PORTB=0xff;
807 .LM7:
808 001e 48BB out 56-0x20,r20
809 0020 E0E0 ldi r30,lo8(0)
810 0022 F0E0 ldi r31,hi8(0)
811 0024 21E3 ldi r18,lo8(49)
812 0026 30E0 ldi r19,hi8(49)
813 .L27:
814 .LBB7:
815 .LBB8:
816 .LBB9:
817 .LBB10:
818 .LBB11:
820 .Ltext3:
822 .LM8:
823 0028 CF01 movw r24,r30
824 /* #APP */
825 002a 0197 1: sbiw r24,1
826 002c F1F7 brne 1b
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -