Main Page   Compound List   File List   Compound Members   File Members  

iotn28.h

Go to the documentation of this file.
00001 /*
00002    iotn28.h - internal register definitions for ATtiny28
00003 
00004    Contributors:
00005      Created by Marek Michalkiewicz <marekm@linux.org.pl>
00006 
00007    THIS SOFTWARE IS NOT COPYRIGHTED
00008 
00009    This source code is offered for use in the public domain.  You may
00010    use, modify or distribute it freely.
00011 
00012    This code is distributed in the hope that it will be useful, but
00013    WITHOUT ANY WARRANTY.  ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
00014    DISCLAIMED.  This includes but is not limited to warranties of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016 
00017    Based on preliminary Atmel datasheet Rev. 1062B-10/99.
00018  */
00019 
00020 #ifndef __IOTN28
00021 #define __IOTN28
00022 
00023 #ifndef __ASSEMBLER__
00024 #  warning "MCU not supported by the C compiler"
00025 #endif
00026 
00027 /* I/O space addresses */
00028 
00029 #define OSCCAL  0x00
00030 
00031 #define WDTCR   0x01
00032 
00033 #define MODCR   0x02
00034 
00035 #define TCNT0   0x03
00036 #define TCCR0   0x04
00037 
00038 #define IFR     0x05
00039 #define ICR     0x06
00040 
00041 #define MCUCS   0x07
00042 
00043 #define ACSR    0x08
00044 
00045 /* 0x09..0x0F reserved */
00046 
00047 #define PIND    0x10
00048 #define DDRD    0x11
00049 #define PORTD   0x12
00050 
00051 /* 0x13..0x15 reserved */
00052 
00053 #define PINB    0x16
00054 
00055 /* 0x17..0x18 reserved */
00056 
00057 #define PINA    0x19
00058 #define PACR    0x1A
00059 #define PORTA   0x1B
00060 
00061 /* 0x1C..0x3E reserved */
00062 
00063 #define SREG    0x3F
00064 
00065 /* Interrupt vectors (byte addresses) */
00066 
00067 #define RESET_vect              (0x00)
00068 #define INT0_vect               (0x02)
00069 #define INT1_vect               (0x04)
00070 #define PIN_vect                (0x06)
00071 #define TIMER0_OVF_vect         (0x08)
00072 #define ANA_COMP_vect           (0x0A)
00073 
00074 #define INT_VECT_SIZE (0x0C)
00075 
00076 /* Bit numbers */
00077 
00078 /* ICR */
00079 #define INT1    7
00080 #define INT0    6
00081 #define LLIE    5
00082 #define TOIE0   4
00083 #define ISC11   3
00084 #define ISC10   2
00085 #define ISC01   1
00086 #define ISC00
00087 
00088 /* IFR */
00089 #define INTF1   7
00090 #define INTF0   6
00091 #define TOV0    4
00092 
00093 /* MCUCS */
00094 #define PLUPB   7
00095 #define SE      5
00096 #define SM      4
00097 #define WDRF    3
00098 #define EXTRF   1
00099 #define PORF    0
00100 
00101 /* TCCR0 */
00102 #define FOV0    7
00103 #define OOM01   4
00104 #define OOM00   3
00105 #define CS02    2
00106 #define CS01    1
00107 #define CS00    0
00108 
00109 /* MODCR */
00110 #define ONTIM4  7
00111 #define ONTIM3  6
00112 #define ONTIM2  5
00113 #define ONTIM1  4
00114 #define ONTIM0  3
00115 #define MCONF2  2
00116 #define MCONF1  1
00117 #define MCONF0  0
00118 
00119 /* WDTCR */
00120 #define WDTOE   4
00121 #define WDE     3
00122 #define WDP2    2
00123 #define WDP1    1
00124 #define WDP0    0
00125 
00126 /* EECR */
00127 #define EERIE   3
00128 #define EEMWE   2
00129 #define EEWE    1
00130 #define EERE    0
00131 
00132 /*
00133    PA2 = IR
00134  */
00135 
00136 /* PORTA */
00137 #define PA3     3
00138 #define PA2     2
00139 #define PA1     1
00140 #define PA0     0
00141 
00142 /* PACR */
00143 #define DDA3    3
00144 #define PA2HC   2
00145 #define DDA1    1
00146 #define DDA0    0
00147 
00148 /* PINA */
00149 #define PINA3   3
00150 #define PINA1   1
00151 #define PINA0   0
00152 
00153 /*
00154    PB4 = INT1
00155    PB3 = INT0
00156    PB2 = T0
00157    PB1 = AIN1
00158    PB0 = AIN0
00159  */
00160 
00161 /* PINB */
00162 #define PINB7   7
00163 #define PINB6   6
00164 #define PINB5   5
00165 #define PINB4   4
00166 #define PINB3   3
00167 #define PINB2   2
00168 #define PINB1   1
00169 #define PINB0   0
00170 
00171 /* PORTD */
00172 #define PD7     7
00173 #define PD6     6
00174 #define PD5     5
00175 #define PD4     4
00176 #define PD3     3
00177 #define PD2     2
00178 #define PD1     1
00179 #define PD0     0
00180 
00181 /* DDRD */
00182 #define DDD7    7
00183 #define DDD6    6
00184 #define DDD5    5
00185 #define DDD4    4
00186 #define DDD3    3
00187 #define DDD2    2
00188 #define DDD1    1
00189 #define DDD0    0
00190 
00191 /* PIND */
00192 #define PIND7   7
00193 #define PIND6   6
00194 #define PIND5   5
00195 #define PIND4   4
00196 #define PIND3   3
00197 #define PIND2   2
00198 #define PIND1   1
00199 #define PIND0   0
00200 
00201 /* ACSR */
00202 #define ACD     7
00203 #define ACO     5
00204 #define ACI     4
00205 #define ACIE    3
00206 #define ACIS1   1
00207 #define ACIS0   0
00208 
00209 #define ZL r30
00210 #define ZH r31
00211 
00212 /* Last memory addresses */
00213 #define RAMEND          0x1F
00214 #define XRAMEND         0x0
00215 #define E2END           0x0
00216 #define FLASHEND        0x7FF
00217 
00218 #endif  /* __IOTN28 */

Generated at Fri Jul 19 14:55:41 2002 for avrgcc by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001