Main Page   Compound List   File List   Compound Members   File Members  

io4433.h

Go to the documentation of this file.
00001 /*            - io4433.h -
00002 
00003    This file #defines the internal register addresses for AT90S4433.
00004 */
00005 
00006 #ifndef __IO4433
00007 #define __IO4433 1
00008 
00009 
00010 /* =========================*/
00011 /* Predefined SFR Addresses */
00012 /* =========================*/
00013 
00014 /* UART Baud Rate Register high */
00015 #define UBRRH        0x03 
00016 
00017 /* ADC Data register */
00018 #define ADCL       0x04 
00019 #define ADCH       0x05 
00020 
00021 /* ADC Control and Status Register */
00022 #define ADCSR      0x06 
00023 
00024 /* ADC MUX */
00025 #define ADMUX      0x07 
00026 
00027 /* Analog Comparator Control and Status Register */
00028 #define ACSR            0x08 
00029 
00030 /* UART Baud Rate Register */
00031 #define UBRR         0x09 
00032 #define UBRRL        0x09 
00033 
00034 /* UART Control/Status Registers */
00035 #define UCSRB   0x0A 
00036 #define UCSRA   0x0B 
00037 
00038 /* UART I/O Data Register */
00039 #define UDR        0x0C 
00040 
00041 /* SPI Control Register */
00042 #define SPCR        0x0D 
00043 
00044 /* SPI Status Register */
00045 #define SPSR        0x0E 
00046 
00047 /* SPI I/O Data Register */
00048 #define SPDR        0x0F 
00049 
00050 /* Input Pins, Port D */
00051 #define PIND        0x10 
00052 
00053 /* Data Direction Register, Port D */
00054 #define DDRD        0x11 
00055 
00056 /* Data Register, Port D */
00057 #define PORTD        0x12 
00058 
00059 /* Input Pins, Port C */
00060 #define PINC        0x13 
00061 
00062 /* Data Direction Register, Port C */
00063 #define DDRC        0x14 
00064 
00065 /* Data Register, Port C */
00066 #define PORTC        0x15 
00067 
00068 /* Input Pins, Port B */
00069 #define PINB        0x16 
00070 
00071 /* Data Direction Register, Port B */
00072 #define DDRB        0x17 
00073 
00074 /* Data Register, Port B */
00075 #define PORTB        0x18 
00076 
00077 /* EEPROM Control Register */
00078 #define EECR        0x1C 
00079 
00080 /* EEPROM Data Register */
00081 #define EEDR        0x1D 
00082 
00083 /* EEPROM Address Register */
00084 #define EEARL       0x1E 
00085 
00086 /* Watchdog Timer Control Register */
00087 #define WDTCR        0x21 
00088 
00089 /* T/C 1 Input Capture Register */
00090 #define ICR1L       0x26 
00091 #define ICR1H       0x27 
00092 
00093 /* Timer/Counter1 Output Compare Register A */
00094 #define OCR1L       0x2A 
00095 #define OCR1H       0x2B 
00096 
00097 /* Timer/Counter 1 */
00098 #define TCNT1L       0x2C 
00099 #define TCNT1H       0x2D 
00100 
00101 /* Timer/Counter 1 Control and Status Register */
00102 #define TCCR1B        0x2E 
00103 
00104 /* Timer/Counter 1 Control Register */
00105 #define TCCR1A        0x2F 
00106 
00107 /* Timer/Counter 0 */
00108 #define TCNT0        0x32 
00109 
00110 /* Timer/Counter 0 Control Register */
00111 #define TCCR0        0x33 
00112 
00113 /* MCU general Status Register */
00114 #define MCUSR        0x34 
00115 
00116 /* MCU general Control Register */
00117 #define MCUCR        0x35 
00118 
00119 /* Timer/Counter Interrupt Flag register */
00120 #define TIFR        0x38 
00121 
00122 /* Timer/Counter Interrupt MaSK register */
00123 #define TIMSK        0x39 
00124 
00125 /* General Interrupt Flag Register */
00126 #define GIFR         0x3A 
00127 
00128 /* General Interrupt MaSK register */
00129 #define GIMSK        0x3B 
00130  
00131 /* Stack Pointer */
00132 #define SPL          0x3D 
00133 #define SPH          0x3E 
00134 
00135 /* Status REGister */
00136 #define SREG        0x3F 
00137 
00138 
00139 /*                              */
00140 /* Interrupt Vector Definitions */
00141 /*                              */
00142 
00143 /* NB! vectors are specified as byte addresses */
00144 
00145 #define    RESET_vect           (0x00)
00146 #define    INT0_vect            (0x02)
00147 #define    INT1_vect            (0x04)
00148 #define    TIMER1_CAPT_vect     (0x06)
00149 #define    TIMER1_COMPA_vect    (0x08)
00150 #define    TIMER1_OVF_vect      (0x0A)
00151 #define    TIMER0_OVF_vect      (0x0C)
00152 #define    SPI_STC_vect         (0x0E)
00153 #define    UART_RX_vect         (0x10)
00154 #define    UART_UDRE_vect       (0x12)
00155 #define    UART_TX_vect         (0x14)
00156 #define    ADC_vect             (0x16)
00157 #define    EE_RDY_vect          (0x18)
00158 #define    ANA_COMP_vect        (0x1A)
00159 
00160 #define INT_VECT_SIZE (0x1C)
00161 
00162 /*
00163    The Register Bit names are represented by their bit number (0-7).
00164 */    
00165  
00166 /* MCU general Status Register */    
00167 #define    WDRF        3
00168 #define    BORF        2
00169 #define    EXTRF       1
00170 #define    PORF        0
00171  
00172 /* General Interrupt MaSK register */
00173 #define    INT1        7
00174 #define    INT0        6
00175  
00176 /* General Interrupt Flag Register */
00177 #define    INTF1       7
00178 #define    INTF0       6                   
00179  
00180 /* Timer/Counter Interrupt MaSK register */
00181 #define    TOIE1       7
00182 #define    OCIE1       6 
00183 #define    TICIE1      3
00184 #define    TOIE0       1
00185  
00186 /* Timer/Counter Interrupt Flag register */
00187 #define    TOV1         7
00188 #define    OCF1         6
00189 #define    ICF1         3
00190 #define    TOV0         1
00191  
00192 /* MCU general Control Register */ 
00193 #define    SE           5
00194 #define    SM           4
00195 #define    ISC11        3
00196 #define    ISC10        2
00197 #define    ISC01        1
00198 #define    ISC00        0
00199  
00200 /* Timer/Counter 0 Control Register */
00201 #define    CS02         2
00202 #define    CS01         1
00203 #define    CS00         0
00204  
00205 /* Timer/Counter 1 Control Register */
00206 #define    COM11        7
00207 #define    COM10        6
00208 #define    PWM11        1
00209 #define    PWM10        0
00210  
00211 /* Timer/Counter 1 Control and Status Register */
00212 #define    ICNC1        7
00213 #define    ICES1        6
00214 #define    CTC1         3
00215 #define    CS12         2
00216 #define    CS11         1
00217 #define    CS10         0
00218  
00219 /* Watchdog Timer Control Register */                         
00220 #define    WDTOE        4
00221 #define    WDE          3
00222 #define    WDP2         2
00223 #define    WDP1         1
00224 #define    WDP0         0    
00225  
00226 /* EEPROM Control Register */
00227 #define    EERIE        3
00228 #define    EEMWE        2
00229 #define    EEWE         1
00230 #define    EERE         0
00231  
00232 /* SPI Control Register */
00233 #define    SPIE       7  
00234 #define    SPE        6
00235 #define    DORD       5
00236 #define    MSTR       4
00237 #define    CPOL       3
00238 #define    CPHA       2
00239 #define    SPR1       1
00240 #define    SPR0       0
00241 
00242 /* SPI Status Register */
00243 #define    SPIF       7
00244 #define    WCOL       6
00245  
00246 /* UART Status Register */
00247 #define    RXC        7
00248 #define    TXC        6
00249 #define    UDRE       5
00250 #define    FE         4
00251 #define    OVR        3    /*This definition differs from the databook    */
00252                         /*definition to avoid problems with the OR instruction */
00253 #define    MPCM       0
00254  
00255 /* UART Control Register */
00256 #define    RXCIE      7
00257 #define    TXCIE      6
00258 #define    UDRIE      5
00259 #define    RXEN       4
00260 #define    TXEN       3
00261 #define    CHR9       2
00262 #define    RXB8       1
00263 #define    TXB8       0
00264  
00265 /* Analog Comparator Control and Status Register */
00266 #define    ACD        7
00267 #define    AINBG      6
00268 #define    ACO        5
00269 #define    ACI        4
00270 #define    ACIE       3
00271 #define    ACIC       2
00272 #define    ACIS1      1
00273 #define    ACIS0      0
00274 
00275 /* ADC MUX */
00276 #define    ACDBG      6
00277 #define    MUX2       2
00278 #define    MUX1       1
00279 #define    MUX0       0
00280 
00281 /* ADC Control and Status Register */
00282 #define    ADEN       7
00283 #define    ADSC       6
00284 #define    ADFR       5
00285 #define    ADIF       4
00286 #define    ADIE       3
00287 #define    ADPS2      2
00288 #define    ADPS1      1
00289 #define    ADPS0      0  
00290  
00291 /* Data Register, Port B */  
00292 #define    PB5      5
00293 #define    PB4      4
00294 #define    PB3      3
00295 #define    PB2      2
00296 #define    PB1      1
00297 #define    PB0      0
00298  
00299 /* Data Direction Register, Port B */
00300 #define    DDB5     5
00301 #define    DDB4     4
00302 #define    DDB3     3
00303 #define    DDB2     2
00304 #define    DDB1     1
00305 #define    DDB0     0
00306  
00307 /* Input Pins, Port B */
00308 #define    PINB5    5
00309 #define    PINB4    4
00310 #define    PINB3    3
00311 #define    PINB2    2
00312 #define    PINB1    1
00313 #define    PINB0    0
00314  
00315 /* Data Register, Port C */
00316 #define    PC5      5
00317 #define    PC4      4
00318 #define    PC3      3
00319 #define    PC2      2
00320 #define    PC1      1
00321 #define    PC0      0
00322  
00323 /* Data Direction Register, Port C */
00324 #define    DDC5     5
00325 #define    DDC4     4
00326 #define    DDC3     3
00327 #define    DDC2     2
00328 #define    DDC1     1
00329 #define    DDC0     0
00330  
00331 /* Input Pins, Port C */
00332 #define    PINC5    5
00333 #define    PINC4    4
00334 #define    PINC3    3
00335 #define    PINC2    2
00336 #define    PINC1    1
00337 #define    PINC0    0
00338  
00339 /* Data Register, Port D */
00340 #define    PD7      7
00341 #define    PD6      6
00342 #define    PD5      5
00343 #define    PD4      4
00344 #define    PD3      3
00345 #define    PD2      2
00346 #define    PD1      1
00347 #define    PD0      0
00348  
00349 /* Data Direction Register, Port D */
00350 #define    DDD7     7
00351 #define    DDD6     6
00352 #define    DDD5     5
00353 #define    DDD4     4
00354 #define    DDD3     3
00355 #define    DDD2     2
00356 #define    DDD1     1
00357 #define    DDD0     0
00358  
00359 /* Input Pins, Port D */
00360 #define    PIND7     7
00361 #define    PIND6     6
00362 #define    PIND5     5
00363 #define    PIND4     4
00364 #define    PIND3     3
00365 #define    PIND2     2
00366 #define    PIND1     1
00367 #define    PIND0     0
00368  
00369 /* Pointer definition   */
00370 #define    XL     r26
00371 #define    XH     r27
00372 #define    YL     r28
00373 #define    YH     r29
00374 #define    ZL     r30
00375 #define    ZH     r31
00376  
00377 /* Constants */
00378 #define    RAMEND   0xDF    /*Last On-Chip SRAM location*/
00379 #define    XRAMEND  0xDF
00380 #define    E2END    0xFF
00381 #define    FLASHEND 0x0FFF
00382  
00383 #endif

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