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

📄 main.lst

📁 Atmega16+SPCL051液晶驱动
💻 LST
📖 第 1 页 / 共 2 页
字号:
   1               		.file	"main.c"
   2               		.arch atmega16
   3               	__SREG__ = 0x3f
   4               	__SP_H__ = 0x3e
   5               	__SP_L__ = 0x3d
   6               	__tmp_reg__ = 0
   7               	__zero_reg__ = 1
   8               		.global __do_copy_data
   9               		.global __do_clear_bss
  11               		.text
  12               	.Ltext0:
  74               	.global	delay
  76               	delay:
   1:main.c        **** //*************************************
   2:main.c        **** //SPLC051v2.0液晶显示屏驱动
   3:main.c        **** //PORTB为数据口,接液晶模块的DB0-DB7
   4:main.c        **** //PORTA为控制端口,PA7	PA6	PA5	PA4	PA3	PA2	PA1	PA0
   5:main.c        **** //				   --	---	---	Res	CS1	A0	EP	RW
   6:main.c        **** //Hjxiang
   7:main.c        **** //2007-1-15
   8:main.c        **** //*************************************
   9:main.c        **** //头文件
  10:main.c        **** #include <avr/io.h>
  11:main.c        **** #include <avr/signal.h>
  12:main.c        **** #include <avr/delay.h>
  13:main.c        **** //自定义头文件
  14:main.c        **** #include "SPLC051.h"
  15:main.c        **** //宏定义
  16:main.c        **** //延时
  17:main.c        **** void delay(void)
  18:main.c        **** {
  78               	.LM1:
  79               	/* prologue: frame size=0 */
  80               	/* prologue end (size=0) */
  81 0000 E0E0      		ldi r30,lo8(0)
  82 0002 F0E0      		ldi r31,hi8(0)
  83 0004 21E3      		ldi r18,lo8(49)
  84 0006 30E0      		ldi r19,hi8(49)
  85               	.L13:
  86               	.LBB2:
  87               	.LBB3:
  88               	.LBB4:
  89               	.LBB5:
  90               	.LBB6:
  92               	.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 (

⌨️ 快捷键说明

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