Main Page   Compound List   File List   Compound Members   File Members  

io2323.h

Go to the documentation of this file.
00001 /*            - io2323.h -
00002 
00003    This file #defines the internal register addresses for AT90S2323.
00004 */
00005 
00006 #ifndef __IO2323
00007 #define __IO2323 1
00008 
00009 
00010 /*==========================*/
00011 /* Predefined SFR Addresses */
00012 /*==========================*/
00013 
00014 /* Input Pins, Port B */
00015 #define PINB     0x16
00016 
00017 /* Data Direction Register, Port B */
00018 #define DDRB     0x17
00019 
00020 /* Data Register, Port B */
00021 #define PORTB     0x18
00022 
00023 /* EEPROM Control Register */
00024 #define EECR     0x1C
00025 
00026 /* EEPROM Data Register */
00027 #define EEDR     0x1D
00028 
00029 /* EEPROM Address Register Low */
00030 #define EEARL    0x1E
00031 
00032 /* Watchdog Timer Control Register */
00033 #define WDTCR     0x21
00034 
00035 /* Timer/Counter 0 */
00036 #define TCNT0     0x32
00037 
00038 /* Timer/Counter 0 Control Register */
00039 #define TCCR0     0x33
00040 
00041 /* MCU Status Register */
00042 #define MCUSR     0x34
00043 
00044 /* MCU general Control Register */
00045 #define MCUCR     0x35
00046 
00047 /* Timer/Counter Interrupt Flag register */
00048 #define TIFR     0x38
00049 
00050 /* Timer/Counter Interrupt MaSK register */
00051 #define TIMSK     0x39
00052 
00053 /* General Interrupt Flag register */
00054 #define GIFR     0x3A
00055 
00056 /* General Interrupt MaSK register */
00057 #define GIMSK     0x3B
00058 
00059 /* Stack Pointer */
00060 #define SPL     0x3D
00061 
00062 /* Status REGister */
00063 #define SREG    0x3F
00064 
00065 
00066 /*==============================*/
00067 /* Interrupt Vector Definitions */
00068 /*==============================*/
00069 
00070 /* NB! vectors are specified as byte addresses */
00071 
00072 #define    RESET_vect           (0x00)
00073 #define    INT0_vect            (0x02)
00074 #define    TIMER0_OVF_vect     (0x04)
00075 
00076 #define INT_VECT_SIZE (0x06)
00077 
00078 /*
00079    The Register Bit names are represented by their bit number (0-7).
00080  */
00081 
00082 /* General Interrupt MaSK register */
00083 #define    INT0    6
00084 #define    INTF0   6
00085 
00086 /* General Interrupt Flag Register */
00087 #define    TOIE0   1
00088 #define    TOV0    1
00089 
00090 /* MCU general Control Register */
00091 #define    SE      5
00092 #define    SM      4
00093 #define    ISC01   1
00094 #define    ISC00   0
00095 
00096 /* Timer/Counter 0 Control Register */
00097 #define    CS02    2
00098 #define    CS01    1
00099 #define    CS00    0
00100 
00101 /* Watchdog Timer Control Register */
00102 #define    WDTOE   4
00103 #define    WDE     3
00104 #define    WDP2    2
00105 #define    WDP1    1
00106 #define    WDP0    0
00107 
00108 /* EEPROM Control Register */
00109 #define    EEMWE   2
00110 #define    EEWE    1
00111 #define    EERE    0
00112 
00113 /*
00114    PB2 = SCK/T0
00115    PB1 = MISO/INT0
00116    PB0 = MOSI
00117  */
00118 
00119 /* Data Register, Port B */
00120 #define    PB2     2
00121 #define    PB1     1
00122 #define    PB0     0
00123 
00124 /* Data Direction Register, Port B */
00125 #define    DDB2    2
00126 #define    DDB1    1
00127 #define    DDB0    0
00128 
00129 /* Input Pins, Port B */
00130 #define    PINB2   2
00131 #define    PINB1   1
00132 #define    PINB0   0
00133 
00134 /* Pointer definition   */
00135 #define    XL     r26
00136 #define    XH     r27
00137 #define    YL     r28
00138 #define    YH     r29
00139 #define    ZL     r30
00140 #define    ZH     r31
00141 
00142 /* Constants */
00143 #define    RAMEND    0xDF
00144 #define    XRAMEND   0xDF
00145 #define    E2END     0x7F
00146 #define    FLASHEND  0x07FF
00147 
00148 #endif
00149 

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