[53d1ddc] | 1 | ;***** THIS IS A MACHINE GENERATED FILE - DO NOT EDIT ********************
|
---|
| 2 | ;***** Created: 2005-01-11 10:30 ******* Source: AT90S2313.xml ***********
|
---|
| 3 | ;*************************************************************************
|
---|
| 4 | ;* A P P L I C A T I O N N O T E F O R T H E A V R F A M I L Y
|
---|
| 5 | ;*
|
---|
| 6 | ;* Number : AVR000
|
---|
| 7 | ;* File Name : "2313def.inc"
|
---|
| 8 | ;* Title : Register/Bit Definitions for the AT90S2313
|
---|
| 9 | ;* Date : 2005-01-11
|
---|
| 10 | ;* Version : 2.14
|
---|
| 11 | ;* Support E-mail : avr@atmel.com
|
---|
| 12 | ;* Target MCU : AT90S2313
|
---|
| 13 | ;*
|
---|
| 14 | ;* DESCRIPTION
|
---|
| 15 | ;* When including this file in the assembly program file, all I/O register
|
---|
| 16 | ;* names and I/O register bit names appearing in the data book can be used.
|
---|
| 17 | ;* In addition, the six registers forming the three data pointers X, Y and
|
---|
| 18 | ;* Z have been assigned names XL - ZH. Highest RAM address for Internal
|
---|
| 19 | ;* SRAM is also defined
|
---|
| 20 | ;*
|
---|
| 21 | ;* The Register names are represented by their hexadecimal address.
|
---|
| 22 | ;*
|
---|
| 23 | ;* The Register Bit names are represented by their bit number (0-7).
|
---|
| 24 | ;*
|
---|
| 25 | ;* Please observe the difference in using the bit names with instructions
|
---|
| 26 | ;* such as "sbr"/"cbr" (set/clear bit in register) and "sbrs"/"sbrc"
|
---|
| 27 | ;* (skip if bit in register set/cleared). The following example illustrates
|
---|
| 28 | ;* this:
|
---|
| 29 | ;*
|
---|
| 30 | ;* in r16,PORTB ;read PORTB latch
|
---|
| 31 | ;* sbr r16,(1<<PB6)+(1<<PB5) ;set PB6 and PB5 (use masks, not bit#)
|
---|
| 32 | ;* out PORTB,r16 ;output to PORTB
|
---|
| 33 | ;*
|
---|
| 34 | ;* in r16,TIFR ;read the Timer Interrupt Flag Register
|
---|
| 35 | ;* sbrc r16,TOV0 ;test the overflow flag (use bit#)
|
---|
| 36 | ;* rjmp TOV0_is_set ;jump if set
|
---|
| 37 | ;* ... ;otherwise do something else
|
---|
| 38 | ;*************************************************************************
|
---|
| 39 |
|
---|
| 40 | #ifndef _2313DEF_INC_
|
---|
| 41 | #define _2313DEF_INC_
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | #pragma partinc 0
|
---|
| 45 |
|
---|
| 46 | ; ***** SPECIFY DEVICE ***************************************************
|
---|
| 47 | .device AT90S2313
|
---|
| 48 | #pragma AVRPART ADMIN PART_NAME AT90S2313
|
---|
| 49 | .equ SIGNATURE_000 = 0x1e
|
---|
| 50 | .equ SIGNATURE_001 = 0x91
|
---|
| 51 | .equ SIGNATURE_002 = 0x01
|
---|
| 52 |
|
---|
| 53 | #pragma AVRPART CORE CORE_VERSION V1
|
---|
| 54 |
|
---|
| 55 |
|
---|
| 56 | ; ***** I/O REGISTER DEFINITIONS *****************************************
|
---|
| 57 | ; NOTE:
|
---|
| 58 | ; Definitions marked "MEMORY MAPPED"are extended I/O ports
|
---|
| 59 | ; and cannot be used with IN/OUT instructions
|
---|
| 60 | .equ SREG = 0x3f
|
---|
| 61 | .equ SPL = 0x3d
|
---|
| 62 | .equ GIMSK = 0x3b
|
---|
| 63 | .equ GIFR = 0x3a
|
---|
| 64 | .equ TIMSK = 0x39
|
---|
| 65 | .equ TIFR = 0x38
|
---|
| 66 | .equ MCUCR = 0x35
|
---|
| 67 | .equ TCCR0 = 0x33
|
---|
| 68 | .equ TCNT0 = 0x32
|
---|
| 69 | .equ TCCR1A = 0x2f
|
---|
| 70 | .equ TCCR1B = 0x2e
|
---|
| 71 | .equ TCNT1H = 0x2d
|
---|
| 72 | .equ TCNT1L = 0x2c
|
---|
| 73 | .equ OCR1AH = 0x2b
|
---|
| 74 | .equ OCR1AL = 0x2a
|
---|
| 75 | .equ ICR1H = 0x25
|
---|
| 76 | .equ ICR1L = 0x24
|
---|
| 77 | .equ WDTCR = 0x21
|
---|
| 78 | .equ EEAR = 0x1e
|
---|
| 79 | .equ EEDR = 0x1d
|
---|
| 80 | .equ EECR = 0x1c
|
---|
| 81 | .equ PORTB = 0x18
|
---|
| 82 | .equ DDRB = 0x17
|
---|
| 83 | .equ PINB = 0x16
|
---|
| 84 | .equ PORTD = 0x12
|
---|
| 85 | .equ DDRD = 0x11
|
---|
| 86 | .equ PIND = 0x10
|
---|
| 87 | .equ UDR = 0x0c
|
---|
| 88 | .equ USR = 0x0b
|
---|
| 89 | .equ UCR = 0x0a
|
---|
| 90 | .equ UBRR = 0x09
|
---|
| 91 | .equ ACSR = 0x08
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 | ; ***** BIT DEFINITIONS **************************************************
|
---|
| 95 |
|
---|
| 96 | ; ***** PORTB ************************
|
---|
| 97 | ; PORTB - Port B Data Register
|
---|
| 98 | .equ PORTB0 = 0 ; Port B Data Register bit 0
|
---|
| 99 | .equ PB0 = 0 ; For compatibility
|
---|
| 100 | .equ PORTB1 = 1 ; Port B Data Register bit 1
|
---|
| 101 | .equ PB1 = 1 ; For compatibility
|
---|
| 102 | .equ PORTB2 = 2 ; Port B Data Register bit 2
|
---|
| 103 | .equ PB2 = 2 ; For compatibility
|
---|
| 104 | .equ PORTB3 = 3 ; Port B Data Register bit 3
|
---|
| 105 | .equ PB3 = 3 ; For compatibility
|
---|
| 106 | .equ PORTB4 = 4 ; Port B Data Register bit 4
|
---|
| 107 | .equ PB4 = 4 ; For compatibility
|
---|
| 108 | .equ PORTB5 = 5 ; Port B Data Register bit 5
|
---|
| 109 | .equ PB5 = 5 ; For compatibility
|
---|
| 110 | .equ PORTB6 = 6 ; Port B Data Register bit 6
|
---|
| 111 | .equ PB6 = 6 ; For compatibility
|
---|
| 112 | .equ PORTB7 = 7 ; Port B Data Register bit 7
|
---|
| 113 | .equ PB7 = 7 ; For compatibility
|
---|
| 114 |
|
---|
| 115 | ; DDRB - Port B Data Direction Register
|
---|
| 116 | .equ DDB0 = 0 ; Port B Data Direction Register bit 0
|
---|
| 117 | .equ DDB1 = 1 ; Port B Data Direction Register bit 1
|
---|
| 118 | .equ DDB2 = 2 ; Port B Data Direction Register bit 2
|
---|
| 119 | .equ DDB3 = 3 ; Port B Data Direction Register bit 3
|
---|
| 120 | .equ DDB4 = 4 ; Port B Data Direction Register bit 4
|
---|
| 121 | .equ DDB5 = 5 ; Port B Data Direction Register bit 5
|
---|
| 122 | .equ DDB6 = 6 ; Port B Data Direction Register bit 6
|
---|
| 123 | .equ DDB7 = 7 ; Port B Data Direction Register bit 7
|
---|
| 124 |
|
---|
| 125 | ; PINB - Port B Input Pins
|
---|
| 126 | .equ PINB0 = 0 ; Port B Input Pins bit 0
|
---|
| 127 | .equ PINB1 = 1 ; Port B Input Pins bit 1
|
---|
| 128 | .equ PINB2 = 2 ; Port B Input Pins bit 2
|
---|
| 129 | .equ PINB3 = 3 ; Port B Input Pins bit 3
|
---|
| 130 | .equ PINB4 = 4 ; Port B Input Pins bit 4
|
---|
| 131 | .equ PINB5 = 5 ; Port B Input Pins bit 5
|
---|
| 132 | .equ PINB6 = 6 ; Port B Input Pins bit 6
|
---|
| 133 | .equ PINB7 = 7 ; Port B Input Pins bit 7
|
---|
| 134 |
|
---|
| 135 |
|
---|
| 136 | ; ***** TIMER_COUNTER_0 **************
|
---|
| 137 | ; TIMSK - Timer/Counter Interrupt Mask Register
|
---|
| 138 | .equ TOIE0 = 1 ; Timer/Counter0 Overflow Interrupt Enable
|
---|
| 139 |
|
---|
| 140 | ; TIFR - Timer/Counter Interrupt Flag register
|
---|
| 141 | .equ TOV0 = 1 ; Timer/Counter0 Overflow Flag
|
---|
| 142 |
|
---|
| 143 | ; TCCR0 - Timer/Counter0 Control Register
|
---|
| 144 | .equ CS00 = 0 ; Clock Select0 bit 0
|
---|
| 145 | .equ CS01 = 1 ; Clock Select0 bit 1
|
---|
| 146 | .equ CS02 = 2 ; Clock Select0 bit 2
|
---|
| 147 |
|
---|
| 148 | ; TCNT0 - Timer Counter 0
|
---|
| 149 | .equ TCNT00 = 0 ; Timer Counter 0 bit 0
|
---|
| 150 | .equ TCNT01 = 1 ; Timer Counter 0 bit 1
|
---|
| 151 | .equ TCNT02 = 2 ; Timer Counter 0 bit 2
|
---|
| 152 | .equ TCNT03 = 3 ; Timer Counter 0 bit 3
|
---|
| 153 | .equ TCNT04 = 4 ; Timer Counter 0 bit 4
|
---|
| 154 | .equ TCNT05 = 5 ; Timer Counter 0 bit 5
|
---|
| 155 | .equ TCNT06 = 6 ; Timer Counter 0 bit 6
|
---|
| 156 | .equ TCNT07 = 7 ; Timer Counter 0 bit 7
|
---|
| 157 |
|
---|
| 158 |
|
---|
| 159 | ; ***** TIMER_COUNTER_1 **************
|
---|
| 160 | ; TIMSK - Timer/Counter Interrupt Mask Register
|
---|
| 161 | .equ TICIE1 = 3 ; Timer/Counter1 Input Capture Interrupt Enable
|
---|
| 162 | .equ OCIE1A = 6 ; Timer/Counter1 Output CompareA Match Interrupt Enable
|
---|
| 163 | .equ TOIE1 = 7 ; Timer/Counter1 Overflow Interrupt Enable
|
---|
| 164 |
|
---|
| 165 | ; TIFR - Timer/Counter Interrupt Flag register
|
---|
| 166 | .equ ICF1 = 3 ; Input Capture Flag 1
|
---|
| 167 | .equ OCF1A = 6 ; Output Compare Flag 1A
|
---|
| 168 | .equ TOV1 = 7 ; Timer/Counter1 Overflow Flag
|
---|
| 169 |
|
---|
| 170 | ; TCCR1A - Timer/Counter1 Control Register A
|
---|
| 171 | .equ PWM10 = 0 ; Pulse Width Modulator Select Bit 0
|
---|
| 172 | .equ PWM11 = 1 ; Pulse Width Modulator Select Bit 1
|
---|
| 173 | .equ COM1A0 = 6 ; Comparet Ouput Mode 1A, bit 0
|
---|
| 174 | .equ COM1A1 = 7 ; Compare Output Mode 1A, bit 1
|
---|
| 175 |
|
---|
| 176 | ; TCCR1B - Timer/Counter1 Control Register B
|
---|
| 177 | .equ CS10 = 0 ; Clock Select bit 0
|
---|
| 178 | .equ CS11 = 1 ; Clock Select 1 bit 1
|
---|
| 179 | .equ CS12 = 2 ; Clock Select1 bit 2
|
---|
| 180 | .equ CTC1 = 3 ; Clear Timer/Counter1 on Compare Match
|
---|
| 181 | .equ ICES1 = 6 ; Input Capture 1 Edge Select
|
---|
| 182 | .equ ICNC1 = 7 ; Input Capture 1 Noise Canceler
|
---|
| 183 |
|
---|
| 184 |
|
---|
| 185 | ; ***** WATCHDOG *********************
|
---|
| 186 | ; WDTCR - Watchdog Timer Control Register
|
---|
| 187 | .equ WDP0 = 0 ; Watch Dog Timer Prescaler bit 0
|
---|
| 188 | .equ WDP1 = 1 ; Watch Dog Timer Prescaler bit 1
|
---|
| 189 | .equ WDP2 = 2 ; Watch Dog Timer Prescaler bit 2
|
---|
| 190 | .equ WDE = 3 ; Watch Dog Enable
|
---|
| 191 | .equ WDTOE = 4 ; RW
|
---|
| 192 | .equ WDDE = WDTOE ; For compatibility
|
---|
| 193 |
|
---|
| 194 |
|
---|
| 195 | ; ***** EXTERNAL_INTERRUPT ***********
|
---|
| 196 | ; GIMSK - General Interrupt Mask Register
|
---|
| 197 | .equ INT0 = 6 ; External Interrupt Request 0 Enable
|
---|
| 198 | .equ INT1 = 7 ; External Interrupt Request 1 Enable
|
---|
| 199 |
|
---|
| 200 | ; GIFR - General Interrupt Flag register
|
---|
| 201 | .equ INTF0 = 6 ; External Interrupt Flag 0
|
---|
| 202 | .equ INTF1 = 7 ; External Interrupt Flag 1
|
---|
| 203 |
|
---|
| 204 |
|
---|
| 205 | ; ***** UART *************************
|
---|
| 206 | ; UDR - UART I/O Data Register
|
---|
| 207 | .equ UDR0 = 0 ; UART I/O Data Register bit 0
|
---|
| 208 | .equ UDR1 = 1 ; UART I/O Data Register bit 1
|
---|
| 209 | .equ UDR2 = 2 ; UART I/O Data Register bit 2
|
---|
| 210 | .equ UDR3 = 3 ; UART I/O Data Register bit 3
|
---|
| 211 | .equ UDR4 = 4 ; UART I/O Data Register bit 4
|
---|
| 212 | .equ UDR5 = 5 ; UART I/O Data Register bit 5
|
---|
| 213 | .equ UDR6 = 6 ; UART I/O Data Register bit 6
|
---|
| 214 | .equ UDR7 = 7 ; UART I/O Data Register bit 7
|
---|
| 215 |
|
---|
| 216 | ; USR - UART Status Register
|
---|
| 217 | .equ DOR = 3 ; Data overRun
|
---|
| 218 | .equ FE = 4 ; Framing Error
|
---|
| 219 | .equ UDRE = 5 ; UART Data Register Empty
|
---|
| 220 | .equ TXC = 6 ; UART Transmit Complete
|
---|
| 221 | .equ RXC = 7 ; UART Receive Complete
|
---|
| 222 |
|
---|
| 223 | ; UCR - UART Control Register
|
---|
| 224 | .equ TXB8 = 0 ; Transmit Data Bit 8
|
---|
| 225 | .equ RXB8 = 1 ; Receive Data Bit 8
|
---|
| 226 | .equ CHR9 = 2 ; 9-bit Characters
|
---|
| 227 | .equ TXEN = 3 ; Transmitter Enable
|
---|
| 228 | .equ RXEN = 4 ; Receiver Enable
|
---|
| 229 | .equ UDRIE = 5 ; UART Data Register Empty Interrupt Enable
|
---|
| 230 | .equ TXCIE = 6 ; TX Complete Interrupt Enable
|
---|
| 231 | .equ RXCIE = 7 ; RX Complete Interrupt Enable
|
---|
| 232 |
|
---|
| 233 | ; UBRR - UART BAUD Rate Register
|
---|
| 234 | .equ UBRR0 = 0 ; UART Baud Rate Register bit 0
|
---|
| 235 | .equ UBRR1 = 1 ; UART Baud Rate Register bit 1
|
---|
| 236 | .equ UBRR2 = 2 ; UART Baud Rate Register bit 2
|
---|
| 237 | .equ UBRR3 = 3 ; UART Baud Rate Register bit 3
|
---|
| 238 | .equ UBRR4 = 4 ; UART Baud Rate Register bit 4
|
---|
| 239 | .equ UBRR5 = 5 ; UART Baud Rate Register bit 5
|
---|
| 240 | .equ UBRR6 = 6 ; UART Baud Rate Register bit 6
|
---|
| 241 | .equ UBRR7 = 7 ; UART Baud Rate Register bit 7
|
---|
| 242 |
|
---|
| 243 |
|
---|
| 244 | ; ***** ANALOG_COMPARATOR ************
|
---|
| 245 | ; ACSR - Analog Comparator Control And Status Register
|
---|
| 246 | .equ ACIS0 = 0 ; Analog Comparator Interrupt Mode Select bit 0
|
---|
| 247 | .equ ACIS1 = 1 ; Analog Comparator Interrupt Mode Select bit 1
|
---|
| 248 | .equ ACIC = 2 ; Analog Comparator Input Capture Enable
|
---|
| 249 | .equ ACIE = 3 ; Analog Comparator Interrupt Enable
|
---|
| 250 | .equ ACI = 4 ; Analog Comparator Interrupt Flag
|
---|
| 251 | .equ ACO = 5 ; Analog Comparator Output
|
---|
| 252 | .equ ACD = 7 ; Analog Comparator Disable
|
---|
| 253 |
|
---|
| 254 |
|
---|
| 255 | ; ***** CPU **************************
|
---|
| 256 | ; SREG - Status Register
|
---|
| 257 | .equ SREG_C = 0 ; Carry Flag
|
---|
| 258 | .equ SREG_Z = 1 ; Zero Flag
|
---|
| 259 | .equ SREG_N = 2 ; Negative Flag
|
---|
| 260 | .equ SREG_V = 3 ; Two's Complement Overflow Flag
|
---|
| 261 | .equ SREG_S = 4 ; Sign Bit
|
---|
| 262 | .equ SREG_H = 5 ; Half Carry Flag
|
---|
| 263 | .equ SREG_T = 6 ; Bit Copy Storage
|
---|
| 264 | .equ SREG_I = 7 ; Global Interrupt Enable
|
---|
| 265 |
|
---|
| 266 | ; SPL - Stack Pointer Low
|
---|
| 267 | .equ SP0 = 0 ; Stack pointer bit 0
|
---|
| 268 | .equ SP1 = 1 ; Stack pointer bit 1
|
---|
| 269 | .equ SP2 = 2 ; Stack pointer bit 2
|
---|
| 270 | .equ SP3 = 3 ; Stack pointer bit 3
|
---|
| 271 | .equ SP4 = 4
|
---|
| 272 | .equ SP5 = 5 ; Stack pointer bit 5
|
---|
| 273 | .equ SP6 = 6 ; Stack pointer bit 6
|
---|
| 274 | .equ SP7 = 7 ; Stack pointer bit 7
|
---|
| 275 |
|
---|
| 276 | ; MCUCR - MCU Control Register
|
---|
| 277 | .equ ISC00 = 0 ; Interrupt Sense Control 0 bit 0
|
---|
| 278 | .equ ISC01 = 1 ; Interrupt Sense Control 0 bit 1
|
---|
| 279 | .equ ISC10 = 2 ; Interrupt Sense Control 1 bit 0
|
---|
| 280 | .equ ISC11 = 3 ; Interrupt Sense Control 1 bit 1
|
---|
| 281 | .equ SM = 4 ; Sleep Mode
|
---|
| 282 | .equ SE = 5 ; Sleep Enable
|
---|
| 283 |
|
---|
| 284 |
|
---|
| 285 | ; ***** PORTD ************************
|
---|
| 286 | ; PORTD - Data Register, Port D
|
---|
| 287 | .equ PORTD0 = 0 ;
|
---|
| 288 | .equ PD0 = 0 ; For compatibility
|
---|
| 289 | .equ PORTD1 = 1 ;
|
---|
| 290 | .equ PD1 = 1 ; For compatibility
|
---|
| 291 | .equ PORTD2 = 2 ;
|
---|
| 292 | .equ PD2 = 2 ; For compatibility
|
---|
| 293 | .equ PORTD3 = 3 ;
|
---|
| 294 | .equ PD3 = 3 ; For compatibility
|
---|
| 295 | .equ PORTD4 = 4 ;
|
---|
| 296 | .equ PD4 = 4 ; For compatibility
|
---|
| 297 | .equ PORTD5 = 5 ;
|
---|
| 298 | .equ PD5 = 5 ; For compatibility
|
---|
| 299 | .equ PORTD6 = 6 ;
|
---|
| 300 | .equ PD6 = 6 ; For compatibility
|
---|
| 301 |
|
---|
| 302 | ; DDRD
|
---|
| 303 | .equ DDD0 = 0 ;
|
---|
| 304 | .equ DDD1 = 1 ;
|
---|
| 305 | .equ DDD2 = 2 ;
|
---|
| 306 | .equ DDD3 = 3 ;
|
---|
| 307 | .equ DDD4 = 4 ;
|
---|
| 308 | .equ DDD5 = 5 ;
|
---|
| 309 | .equ DDD6 = 6 ;
|
---|
| 310 |
|
---|
| 311 | ; PIND - Input Pins, Port D
|
---|
| 312 | .equ PIND0 = 0 ;
|
---|
| 313 | .equ PIND1 = 1 ;
|
---|
| 314 | .equ PIND2 = 2 ;
|
---|
| 315 | .equ PIND3 = 3 ;
|
---|
| 316 | .equ PIND4 = 4 ;
|
---|
| 317 | .equ PIND5 = 5 ;
|
---|
| 318 | .equ PIND6 = 6 ;
|
---|
| 319 |
|
---|
| 320 |
|
---|
| 321 | ; ***** EEPROM ***********************
|
---|
| 322 | ; EEAR - EEPROM Read/Write Access
|
---|
| 323 | .equ EEARL = EEAR ; For compatibility
|
---|
| 324 | .equ EEAR0 = 0 ; EEPROM Read/Write Access bit 0
|
---|
| 325 | .equ EEAR1 = 1 ; EEPROM Read/Write Access bit 1
|
---|
| 326 | .equ EEAR2 = 2 ; EEPROM Read/Write Access bit 2
|
---|
| 327 | .equ EEAR3 = 3 ; EEPROM Read/Write Access bit 3
|
---|
| 328 | .equ EEAR4 = 4 ; EEPROM Read/Write Access bit 4
|
---|
| 329 | .equ EEAR5 = 5 ; EEPROM Read/Write Access bit 5
|
---|
| 330 | .equ EEAR6 = 6 ; EEPROM Read/Write Access bit 6
|
---|
| 331 |
|
---|
| 332 | ; EEDR - EEPROM Data Register
|
---|
| 333 | .equ EEDR0 = 0 ; EEPROM Data Register bit 0
|
---|
| 334 | .equ EEDR1 = 1 ; EEPROM Data Register bit 1
|
---|
| 335 | .equ EEDR2 = 2 ; EEPROM Data Register bit 2
|
---|
| 336 | .equ EEDR3 = 3 ; EEPROM Data Register bit 3
|
---|
| 337 | .equ EEDR4 = 4 ; EEPROM Data Register bit 4
|
---|
| 338 | .equ EEDR5 = 5 ; EEPROM Data Register bit 5
|
---|
| 339 | .equ EEDR6 = 6 ; EEPROM Data Register bit 6
|
---|
| 340 | .equ EEDR7 = 7 ; EEPROM Data Register bit 7
|
---|
| 341 |
|
---|
| 342 | ; EECR - EEPROM Control Register
|
---|
| 343 | .equ EERE = 0 ; EEPROM Read Enable
|
---|
| 344 | .equ EEWE = 1 ; EEPROM Write Enable
|
---|
| 345 | .equ EEMWE = 2 ; EEPROM Master Write Enable
|
---|
| 346 |
|
---|
| 347 |
|
---|
| 348 |
|
---|
| 349 | ; ***** LOCKSBITS ********************************************************
|
---|
| 350 | .equ LB1 = 0 ; Lockbit
|
---|
| 351 | .equ LB2 = 1 ; Lockbit
|
---|
| 352 |
|
---|
| 353 |
|
---|
| 354 | ; ***** FUSES ************************************************************
|
---|
| 355 | ; LOW fuse bits
|
---|
| 356 |
|
---|
| 357 |
|
---|
| 358 |
|
---|
| 359 | ; ***** CPU REGISTER DEFINITIONS *****************************************
|
---|
| 360 | .def XH = r27
|
---|
| 361 | .def XL = r26
|
---|
| 362 | .def YH = r29
|
---|
| 363 | .def YL = r28
|
---|
| 364 | .def ZH = r31
|
---|
| 365 | .def ZL = r30
|
---|
| 366 |
|
---|
| 367 |
|
---|
| 368 |
|
---|
| 369 | ; ***** DATA MEMORY DECLARATIONS *****************************************
|
---|
| 370 | .equ FLASHEND = 0x03ff ; Note: Word address
|
---|
| 371 | .equ IOEND = 0x003f
|
---|
| 372 | .equ SRAM_START = 0x0060
|
---|
| 373 | .equ SRAM_SIZE = 128
|
---|
| 374 | .equ RAMEND = 0x00df
|
---|
| 375 | .equ XRAMEND = 0x0000
|
---|
| 376 | .equ E2END = 0x007f
|
---|
| 377 | .equ EEPROMEND = 0x007f
|
---|
| 378 | .equ EEADRBITS = 7
|
---|
| 379 | #pragma AVRPART MEMORY PROG_FLASH 2048
|
---|
| 380 | #pragma AVRPART MEMORY EEPROM 128
|
---|
| 381 | #pragma AVRPART MEMORY INT_SRAM SIZE 128
|
---|
| 382 | #pragma AVRPART MEMORY INT_SRAM START_ADDR 0x60
|
---|
| 383 |
|
---|
| 384 |
|
---|
| 385 |
|
---|
| 386 |
|
---|
| 387 |
|
---|
| 388 | ; ***** INTERRUPT VECTORS ************************************************
|
---|
| 389 | .equ INT0addr = 0x0001 ; External Interrupt Request 0
|
---|
| 390 | .equ INT1addr = 0x0002 ; External Interrupt Request 1
|
---|
| 391 | .equ ICP1addr = 0x0003 ; Timer/Counter1 Capture Event
|
---|
| 392 | .equ OC1addr = 0x0004 ; Timer/Counter1 Compare Match
|
---|
| 393 | .equ OVF1addr = 0x0005 ; Timer/Counter1 Overflow
|
---|
| 394 | .equ OVF0addr = 0x0006 ; Timer/Counter0 Overflow
|
---|
| 395 | .equ URXCaddr = 0x0007 ; UART, Rx Complete
|
---|
| 396 | .equ UDREaddr = 0x0008 ; UART Data Register Empty
|
---|
| 397 | .equ UTXCaddr = 0x0009 ; UART, Tx Complete
|
---|
| 398 | .equ ACIaddr = 0x000a ; Analog Comparator
|
---|
| 399 |
|
---|
| 400 | .equ INT_VECTORS_SIZE = 11 ; size in words
|
---|
| 401 |
|
---|
| 402 | #pragma AVRPART CORE INSTRUCTIONS_NOT_SUPPORTED break
|
---|
| 403 |
|
---|
| 404 | #endif /* _2313DEF_INC_ */
|
---|
| 405 |
|
---|
| 406 | ; ***** END OF FILE ******************************************************
|
---|