📄 app.lis
字号:
.module app.c
.area text(rom, con, rel)
0000 .dbfile E:\Steaven2000\AVR\AVR_Book\PROGRA~1\SOURCE~1\Code\LED大屏幕显示系统设计\app.c
0000 .dbfunc e Hardware_Init _Hardware_Init fV
.even
0000 _Hardware_Init::
0000 .dbline -1
0000 .dbline 20
0000 ; //***************************************************************
0000 ; // File Name : Gpio.c
0000 ; // Author : Steaven
0000 ; // Created : 2008-06-09
0000 ; // Modified :
0000 ; // Revision : V0.0
0000 ; //***************************************************************
0000 ;
0000 ; #include "iom16v.h"
0000 ; #include "DataType.h"
0000 ; #include "app.h"
0000 ;
0000 ; //***************************************************************
0000 ; // Function : Hardware_Init
0000 ; // Input : none
0000 ; // Output : none
0000 ; // Description : ATmega16 Hardware Initialization
0000 ; //***************************************************************
0000 ; void Hardware_Init(void)
0000 ; {
0000 .dbline 21
0000 ; Gpio_Init();
0000 02D0 xcall _Gpio_Init
0002 .dbline 22
0002 ; Timer0_Init();
0002 0CD0 xcall _Timer0_Init
0004 .dbline 23
0004 ; Timer1_Init();
0004 .dbline -2
0004 .dbline 24
0004 ; }
0004 L1:
0004 .dbline 0 ; func end
0004 18C0 xjmp _Timer1_Init
0006 .dbend
0006 .dbfunc e Gpio_Init _Gpio_Init fV
.even
0006 _Gpio_Init::
0006 .dbline -1
0006 .dbline 33
0006 ;
0006 ; //***************************************************************
0006 ; // Function : Gpio_Init
0006 ; // Input : none
0006 ; // Output : none
0006 ; // Description : ATmega16 GPIO Initialization
0006 ; //***************************************************************
0006 ; void Gpio_Init(void)
0006 ; {
0006 .dbline 34
0006 ; DDRA = 0xFF; //端口A设置为输出
0006 8FEF ldi R24,255
0008 8ABB out 0x1a,R24
000A .dbline 35
000A ; PORTA = 0xFF; //初始化输出0
000A 8BBB out 0x1b,R24
000C .dbline 36
000C ; DDRB = 0xFF; //端口B设置为输出
000C 87BB out 0x17,R24
000E .dbline 37
000E ; PORTB = 0x00; //初始化输出0
000E 2224 clr R2
0010 28BA out 0x18,R2
0012 .dbline 38
0012 ; DDRC = 0xFF; //端口C设置为输出
0012 84BB out 0x14,R24
0014 .dbline 39
0014 ; PORTC = 0x00; //初始化输出0
0014 25BA out 0x15,R2
0016 .dbline 40
0016 ; DDRD = 0xFF; //端口D设置为输出
0016 81BB out 0x11,R24
0018 .dbline 41
0018 ; PORTD = 0x00; //初始化输出0
0018 22BA out 0x12,R2
001A .dbline -2
001A .dbline 42
001A ; }
001A L2:
001A .dbline 0 ; func end
001A 0895 ret
001C .dbend
001C .dbfunc e Timer0_Init _Timer0_Init fV
.even
001C _Timer0_Init::
001C .dbline -1
001C .dbline 51
001C ;
001C ; //***************************************************************
001C ; // Function : Timer0_Init
001C ; // Input : none
001C ; // Output : none
001C ; // Description : ATmega16 Timer0 Initialization,10ms Interval
001C ; //***************************************************************
001C ; void Timer0_Init(void)
001C ; {
001C .dbline 52
001C ; TCCR0 = 0x0D; //1024 division,8M/1024,CTC Mode
001C 8DE0 ldi R24,13
001E 83BF out 0x33,R24
0020 .dbline 53
0020 ; TCNT0 = 0x00; //Clear Counter
0020 2224 clr R2
0022 22BE out 0x32,R2
0024 .dbline 54
0024 ; OCR0 = 8; //8 * 1024/8M = 1ms
0024 88E0 ldi R24,8
0026 8CBF out 0x3c,R24
0028 .dbline 55
0028 ; TIMSK |= 0x02; //Enable OCIE0
0028 89B7 in R24,0x39
002A 8260 ori R24,2
002C 89BF out 0x39,R24
002E .dbline 56
002E ; TIFR |= 0x02; //Clear OCIF0
002E 88B7 in R24,0x38
0030 8260 ori R24,2
0032 88BF out 0x38,R24
0034 .dbline -2
0034 .dbline 57
0034 ; }
0034 L3:
0034 .dbline 0 ; func end
0034 0895 ret
0036 .dbend
0036 .dbfunc e Timer1_Init _Timer1_Init fV
.even
0036 _Timer1_Init::
0036 .dbline -1
0036 .dbline 66
0036 ;
0036 ; //***************************************************************
0036 ; // Function : Timer1_Init
0036 ; // Input : none
0036 ; // Output : none
0036 ; // Description : ATmega16 Timer1 Initialization,1s Interval
0036 ; //***************************************************************
0036 ; void Timer1_Init(void)
0036 ; {
0036 .dbline 67
0036 ; TCCR1A = 0x00; //WGM1[3:0]=0100,OCR1A
0036 2224 clr R2
0038 2FBC out 0x2f,R2
003A .dbline 68
003A ; TCCR1B = 0x0D; //1024 division,8M/1024,CTC Mode
003A 8DE0 ldi R24,13
003C 8EBD out 0x2e,R24
003E .dbline 69
003E ; TCNT1 = 0x00; //Clear Counter
003E 3324 clr R3
0040 3DBC out 0x2d,R3
0042 2CBC out 0x2c,R2
0044 .dbline 70
0044 ; OCR1A = 7813; //7813 * 1024/8M = 1s
0044 85E8 ldi R24,7813
0046 9EE1 ldi R25,30
0048 9BBD out 0x2b,R25
004A 8ABD out 0x2a,R24
004C .dbline 71
004C ; TIMSK |= 0x10; //Enable OCIE1A
004C 89B7 in R24,0x39
004E 8061 ori R24,16
0050 89BF out 0x39,R24
0052 .dbline 72
0052 ; TIFR |= 0x10; //Clear OCIF1A
0052 88B7 in R24,0x38
0054 8061 ori R24,16
0056 88BF out 0x38,R24
0058 .dbline -2
0058 .dbline 73
0058 ; }
0058 L4:
0058 .dbline 0 ; func end
0058 0895 ret
005A .dbend
005A .dbfunc e Interrupt_Init _Interrupt_Init fV
.even
005A _Interrupt_Init::
005A .dbline -1
005A .dbline 82
005A ;
005A ; //***************************************************************
005A ; // Function : Interrupt_Init
005A ; // Input : none
005A ; // Output : none
005A ; // Description : ATmega16 Interrupt Initialization
005A ; //***************************************************************
005A ; void Interrupt_Init(void)
005A ; {
005A .dbline 83
005A ; SREG |= 0x80; //Enable Global Interrupt
005A 7894 bset 7
005C .dbline -2
005C .dbline 84
005C ; }
005C L5:
005C .dbline 0 ; func end
005C 0895 ret
005E .dbend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -