source: arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/hardware/tools/avr/avr/include/avr/io1200.h @ 4837

Last change on this file since 4837 was 4837, checked in by daduve, 2 years ago

Adding new version

File size: 5.6 KB
Line 
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
10   * Redistributions in binary form must reproduce the above copyright
11     notice, this list of conditions and the following disclaimer in
12     the documentation and/or other materials provided with the
13     distribution.
14
15   * Neither the name of the copyright holders nor the names of
16     contributors may be used to endorse or promote products derived
17     from this software without specific prior written permission.
18
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  POSSIBILITY OF SUCH DAMAGE. */
30
31/* $Id: io1200.h 2225 2011-03-02 16:27:26Z arcanum $ */
32
33/* avr/io1200.h - definitions for AT90S1200 */
34
35#ifndef _AVR_IO1200_H_
36#define _AVR_IO1200_H_ 1
37
38/* This file should only be included from <avr/io.h>, never directly. */
39
40#ifndef _AVR_IO_H_
41#  error "Include <avr/io.h> instead of this file."
42#endif
43
44#ifndef _AVR_IOXXX_H_
45#  define _AVR_IOXXX_H_ "io1200.h"
46#else
47#  error "Attempt to include more than one <avr/ioXXX.h> file."
48#endif
49
50#ifndef __ASSEMBLER__
51#  warning "MCU not supported by the C compiler"
52#endif
53
54/* I/O registers */
55
56/* 0x00..0x07 reserved */
57
58/* Analog Comparator Control and Status Register */
59#define ACSR    _SFR_IO8(0x08)
60
61/* 0x09..0x0F reserved */
62
63#define PIND    _SFR_IO8(0x10)
64#define DDRD    _SFR_IO8(0x11)
65#define PORTD   _SFR_IO8(0x12)
66
67/* 0x13..0x15 reserved */
68
69#define PINB    _SFR_IO8(0x16)
70#define DDRB    _SFR_IO8(0x17)
71#define PORTB   _SFR_IO8(0x18)
72
73/* 0x19..0x1B reserved */
74
75/* EEPROM Control Register */
76#define EECR    _SFR_IO8(0x1C)
77
78/* EEPROM Data Register */
79#define EEDR    _SFR_IO8(0x1D)
80
81/* EEPROM Address Register */
82#define EEAR    _SFR_IO8(0x1E)
83#define EEARL   _SFR_IO8(0x1E)
84
85/* 0x1F..0x20 reserved */
86
87/* Watchdog Timer Control Register */
88#define WDTCR   _SFR_IO8(0x21)
89
90/* 0x22..0x31 reserved */
91
92#define TCNT0   _SFR_IO8(0x32)
93#define TCCR0   _SFR_IO8(0x33)
94
95/* 0x34 reserved */
96
97#define MCUCR   _SFR_IO8(0x35)
98
99/* 0x36..0x37 reserved */
100
101/* Timer/Counter Interrupt Flag Register */
102#define TIFR    _SFR_IO8(0x38)
103
104/* Timer/Counter Interrupt MaSK Register */
105#define TIMSK   _SFR_IO8(0x39)
106
107/* 0x3A reserved */
108
109#define GIMSK   _SFR_IO8(0x3B)
110
111/* 0x3C..0x3E reserved */
112
113/* 0x3F SREG */
114
115/* Interrupt vectors */
116
117/* External Interrupt 0 */
118#define INT0_vect_num           1
119#define INT0_vect                       _VECTOR(1)
120#define SIG_INTERRUPT0                  _VECTOR(1)
121
122/* Timer/Counter0 Overflow */
123#define TIMER0_OVF_vect_num             2
124#define TIMER0_OVF_vect                 _VECTOR(2)
125#define SIG_OVERFLOW0                   _VECTOR(2)
126
127/* Analog Comparator */
128#define ANA_COMP_vect_num               3
129#define ANA_COMP_vect                   _VECTOR(3)
130#define SIG_COMPARATOR                  _VECTOR(3)
131
132#define _VECTORS_SIZE 8
133
134/* Bit numbers */
135
136/* GIMSK */
137#define INT0    6
138
139/* TIMSK */
140#define TOIE0   1
141
142/* TIFR */
143#define TOV0    1
144
145/* MCUCR */
146#define SE      5
147#define SM      4
148#define ISC01   1
149#define ISC00   0
150
151/* TCCR0 */
152#define CS02    2
153#define CS01    1
154#define CS00    0
155
156/* WDTCR */
157#define WDE     3
158#define WDP2    2
159#define WDP1    1
160#define WDP0    0
161
162/* EECR */
163#undef EEMWE
164
165/*
166   PB7 = SCK
167   PB6 = MISO
168   PB5 = MOSI
169   PB1 = AIN1
170   PB0 = AIN0
171 */
172
173/* PORTB */
174#define PB7     7
175#define PB6     6
176#define PB5     5
177#define PB4     4
178#define PB3     3
179#define PB2     2
180#define PB1     1
181#define PB0     0
182
183/* DDRB */
184#define DDB7    7
185#define DDB6    6
186#define DDB5    5
187#define DDB4    4
188#define DDB3    3
189#define DDB2    2
190#define DDB1    1
191#define DDB0    0
192
193/* PINB */
194#define PINB7   7
195#define PINB6   6
196#define PINB5   5
197#define PINB4   4
198#define PINB3   3
199#define PINB2   2
200#define PINB1   1
201#define PINB0   0
202
203/* PORTD */
204#define PD6     6
205#define PD5     5
206#define PD4     4
207#define PD3     3
208#define PD2     2
209#define PD1     1
210#define PD0     0
211
212/* DDRD */
213#define DDD6    6
214#define DDD5    5
215#define DDD4    4
216#define DDD3    3
217#define DDD2    2
218#define DDD1    1
219#define DDD0    0
220
221/* PIND */
222#define PIND6   6
223#define PIND5   5
224#define PIND4   4
225#define PIND3   3
226#define PIND2   2
227#define PIND1   1
228#define PIND0   0
229
230/* ACSR */
231#define ACD     7
232#define ACO     5
233#define ACI     4
234#define ACIE    3
235#define ACIS1   1
236#define ACIS0   0
237
238/* EEPROM Control Register */
239#define EERIE   3
240#define EEMWE   2
241#define EEWE    1
242#define EERE    0
243
244#undef ZH
245
246#define RAMSTART    0x60
247/* Last memory addresses */
248#define RAMEND          0x1F
249#define XRAMEND         0x0
250#define E2END           0x3F
251#define E2PAGESIZE  0
252#define FLASHEND        0x3FF
253
254
255/* Fuses */
256#define FUSE_MEMORY_SIZE 1
257
258/* Low Fuse Byte */
259#define FUSE_RCEN  (unsigned char)~_BV(0)
260#define FUSE_SPIEN (unsigned char)~_BV(5)
261#define LFUSE_DEFAULT (0xFF)
262
263
264/* Lock Bits */
265#define __LOCK_BITS_EXIST
266
267
268/* Signature */
269#define SIGNATURE_0 0x1E
270#define SIGNATURE_1 0x90
271#define SIGNATURE_2 0x01
272
273
274#endif  /* _AVR_IO1200_H_ */
Note: See TracBrowser for help on using the repository browser.