📄 asm.lst
字号:
176 #elif defined (__AVR_ATmega161__)
177 # include <avr/iom161.h>
178 #elif defined (__AVR_ATmega162__)
179 # include <avr/iom162.h>
180 #elif defined (__AVR_ATmega163__)
181 # include <avr/iom163.h>
182 #elif defined (__AVR_ATmega168__)
183 # include <avr/iom168.h>
184 #elif defined (__AVR_ATmega169__)
185 # include <avr/iom169.h>
186 #elif defined (__AVR_ATmega8__)
187 # include <avr/iom8.h>
1 /* Copyright (c) 2002, Marek Michalkiewicz
2 All rights reserved.
3
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in
11 the documentation and/or other materials provided with the
12 distribution.
13
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
18 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 POSSIBILITY OF SUCH DAMAGE. */
25
26 /* $Id: iom8.h,v 1.8 2003/02/17 09:57:28 marekm Exp $ */
27
28 /* avr/iom8.h - definitions for ATmega8 */
29
30 #ifndef _AVR_IOM8_H_
31 #define _AVR_IOM8_H_ 1
32
33 /* This file should only be included from <avr/io.h>, never directly. */
34
35 #ifndef _AVR_IO_H_
36 # error "Include <avr/io.h> instead of this file."
37 #endif
38
39 #ifndef _AVR_IOXXX_H_
40 # define _AVR_IOXXX_H_ "iom8.h"
41 #else
42 # error "Attempt to include more than one <avr/ioXXX.h> file."
43 #endif
44
45 /* I/O registers */
46
47 /* TWI stands for "Two Wire Interface" or "TWI Was I2C(tm)" */
48 #define TWBR _SFR_IO8(0x00)
49 #define TWSR _SFR_IO8(0x01)
50 #define TWAR _SFR_IO8(0x02)
51 #define TWDR _SFR_IO8(0x03)
52
53 /* ADC */
54 #define ADCW _SFR_IO16(0x04)
55 #ifndef __ASSEMBLER__
56 #define ADC _SFR_IO16(0x04)
57 #endif
58 #define ADCL _SFR_IO8(0x04)
59 #define ADCH _SFR_IO8(0x05)
60 #define ADCSR _SFR_IO8(0x06)
61 #define ADCSRA _SFR_IO8(0x06) /* Changed in 2486H-AVR-09/02 */
62 #define ADMUX _SFR_IO8(0x07)
63
64 /* analog comparator */
65 #define ACSR _SFR_IO8(0x08)
66
67 /* USART */
68 #define UBRRL _SFR_IO8(0x09)
69 #define UCSRB _SFR_IO8(0x0A)
70 #define UCSRA _SFR_IO8(0x0B)
71 #define UDR _SFR_IO8(0x0C)
72
73 /* SPI */
74 #define SPCR _SFR_IO8(0x0D)
75 #define SPSR _SFR_IO8(0x0E)
76 #define SPDR _SFR_IO8(0x0F)
77
78 /* Port D */
79 #define PIND _SFR_IO8(0x10)
80 #define DDRD _SFR_IO8(0x11)
81 #define PORTD _SFR_IO8(0x12)
82
83 /* Port C */
84 #define PINC _SFR_IO8(0x13)
85 #define DDRC _SFR_IO8(0x14)
86 #define PORTC _SFR_IO8(0x15)
87
88 /* Port B */
89 #define PINB _SFR_IO8(0x16)
90 #define DDRB _SFR_IO8(0x17)
91 #define PORTB _SFR_IO8(0x18)
92
93 /* 0x1C..0x1F EEPROM */
94
95 #define UCSRC _SFR_IO8(0x20)
96 #define UBRRH _SFR_IO8(0x20)
97
98 #define WDTCR _SFR_IO8(0x21)
99 #define ASSR _SFR_IO8(0x22)
100
101 /* Timer 2 */
102 #define OCR2 _SFR_IO8(0x23)
103 #define TCNT2 _SFR_IO8(0x24)
104 #define TCCR2 _SFR_IO8(0x25)
105
106 /* Timer 1 */
107 #define ICR1 _SFR_IO16(0x26)
108 #define ICR1L _SFR_IO8(0x26)
109 #define ICR1H _SFR_IO8(0x27)
110 #define OCR1B _SFR_IO16(0x28)
111 #define OCR1BL _SFR_IO8(0x28)
112 #define OCR1BH _SFR_IO8(0x29)
113 #define OCR1A _SFR_IO16(0x2A)
114 #define OCR1AL _SFR_IO8(0x2A)
115 #define OCR1AH _SFR_IO8(0x2B)
116 #define TCNT1 _SFR_IO16(0x2C)
117 #define TCNT1L _SFR_IO8(0x2C)
118 #define TCNT1H _SFR_IO8(0x2D)
119 #define TCCR1B _SFR_IO8(0x2E)
120 #define TCCR1A _SFR_IO8(0x2F)
121
122 #define SFIOR _SFR_IO8(0x30)
123
124 #define OSCCAL _SFR_IO8(0x31)
125
126 /* Timer 0 */
127 #define TCNT0 _SFR_IO8(0x32)
128 #define TCCR0 _SFR_IO8(0x33)
129
130 #define MCUCSR _SFR_IO8(0x34)
131 #define MCUCR _SFR_IO8(0x35)
132
133 #define TWCR _SFR_IO8(0x36)
134
135 #define SPMCR _SFR_IO8(0x37)
136
137 #define TIFR _SFR_IO8(0x38)
138 #define TIMSK _SFR_IO8(0x39)
139
140 #define GIFR _SFR_IO8(0x3A)
141 #define GIMSK _SFR_IO8(0x3B)
142 #define GICR _SFR_IO8(0x3B) /* Changed in 2486H-AVR-09/02 */
143
144 /* 0x3C reserved (OCR0?) */
145
146 /* 0x3D..0x3E SP */
147
148 /* 0x3F SREG */
149
150 /* Interrupt vectors */
151
152 #define SIG_INTERRUPT0 _VECTOR(1)
153 #define SIG_INTERRUPT1 _VECTOR(2)
154 #define SIG_OUTPUT_COMPARE2 _VECTOR(3)
155 #define SIG_OVERFLOW2 _VECTOR(4)
156 #define SIG_INPUT_CAPTURE1 _VECTOR(5)
157 #define SIG_OUTPUT_COMPARE1A _VECTOR(6)
158 #define SIG_OUTPUT_COMPARE1B _VECTOR(7)
159 #define SIG_OVERFLOW1 _VECTOR(8)
160 #define SIG_OVERFLOW0 _VECTOR(9)
161 #define SIG_SPI _VECTOR(10)
162 #define SIG_UART_RECV _VECTOR(11)
163 #define SIG_UART_DATA _VECTOR(12)
164 #define SIG_UART_TRANS _VECTOR(13)
165 #define SIG_ADC _VECTOR(14)
166 #define SIG_EEPROM_READY _VECTOR(15)
167 #define SIG_COMPARATOR _VECTOR(16)
168 #define SIG_2WIRE_SERIAL _VECTOR(17)
169 #define SIG_SPM_READY _VECTOR(18)
170
171 #define _VECTORS_SIZE 38
172
173 /* Bit numbers */
174
175 /* GIMSK / GICR */
176 #define INT1 7
177 #define INT0 6
178 #define IVSEL 1
179 #define IVCE 0
180
181 /* GIFR */
182 #define INTF1 7
183 #define INTF0 6
184
185 /* TIMSK */
186 #define OCIE2 7
187 #define TOIE2 6
188 #define TICIE1 5
188 #elif defined (__AVR_ATmega48__)
189 # include <avr/iom48.h>
190 #elif defined (__AVR_ATmega88__)
191 # include <avr/iom88.h>
192 #elif defined (__AVR_ATmega8515__)
193 # include <avr/iom8515.h>
194 #elif defined (__AVR_ATmega8535__)
195 # include <avr/iom8535.h>
196 #elif defined (__AVR_AT90S8535__)
197 # include <avr/io8535.h>
198 #elif defined (__AVR_AT90C8534__)
199 # include <avr/io8534.h>
200 #elif defined (__AVR_AT90S8515__)
201 # include <avr/io8515.h>
202 #elif defined (__AVR_AT90S4434__)
203 # include <avr/io4434.h>
204 #elif defined (__AVR_AT90S4433__)
205 # include <avr/io4433.h>
206 #elif defined (__AVR_AT90S4414__)
207 # include <avr/io4414.h>
208 #elif defined (__AVR_ATtiny22__)
209 # include <avr/iotn22.h>
210 #elif defined (__AVR_ATtiny26__)
211 # include <avr/iotn26.h>
212 #elif defined (__AVR_AT90S2343__)
213 # include <avr/io2343.h>
214 #elif defined (__AVR_AT90S2333__)
215 # include <avr/io2333.h>
216 #elif defined (__AVR_AT90S2323__)
217 # include <avr/io2323.h>
218 #elif defined (__AVR_AT90S2313__)
219 # include <avr/io2313.h>
220 #elif defined (__AVR_ATtiny2313__)
221 # include <avr/iotn2313.h>
222 #elif defined (__AVR_ATtiny13__)
223 # include <avr/iotn13.h>
224 /* avr1: the following only supported for assembler programs */
225 #elif defined (__AVR_ATtiny28__)
226 # include <avr/iotn28.h>
227 #elif defined (__AVR_AT90S1200__)
228 # include <avr/io1200.h>
229 #elif defined (__AVR_ATtiny15__)
230 # include <avr/iotn15.h>
231 #elif defined (__AVR_ATtiny12__)
232 # include <avr/iotn12.h>
233 #elif defined (__AVR_ATtiny11__)
234 # include <avr/iotn11.h>
235 #else
236 # if !defined(__COMPILING_AVR_LIBC__)
237 # warning "device type not defined"
238 # endif
239 #endif
240
241 #include <avr/portpins.h>
1 /* Copyright (c) 2003 Theodore A. Roth
2 All rights reserved.
3
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in
11 the documentation and/or other materials provided with the
12 distribution.
13
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -