1
;***** THIS IS A MACHINE GENERATED FILE - DO NOT EDIT ********************
2
;***** Created: 2005-01-11 10:30 ******* Source: AT90S2323.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
7
;* File Name : "2323def.inc"
8
;* Title : Register/Bit Definitions for the AT90S2323
11
;* Support E-mail : avr@atmel.com
12
;* Target MCU : AT90S2323
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
21
;* The Register names are represented by their hexadecimal address.
23
;* The Register Bit names are represented by their bit number (0-7).
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
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
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
;*************************************************************************
46
; ***** SPECIFY DEVICE ***************************************************
48
#pragma AVRPART ADMIN PART_NAME AT90S2323
49
.equ SIGNATURE_000 = 0x1e
50
.equ SIGNATURE_001 = 0x91
51
.equ SIGNATURE_002 = 0x02
53
#pragma AVRPART CORE CORE_VERSION V1
56
; ***** I/O REGISTER DEFINITIONS *****************************************
58
; Definitions marked "MEMORY MAPPED"are extended I/O ports
59
; and cannot be used with IN/OUT instructions
79
; ***** BIT DEFINITIONS **************************************************
81
; ***** CPU **************************
82
; SREG - Status Register
83
.equ SREG_C = 0 ; Carry Flag
84
.equ SREG_Z = 1 ; Zero Flag
85
.equ SREG_N = 2 ; Negative Flag
86
.equ SREG_V = 3 ; Two's Complement Overflow Flag
87
.equ SREG_S = 4 ; Sign Bit
88
.equ SREG_H = 5 ; Half Carry Flag
89
.equ SREG_T = 6 ; Bit Copy Storage
90
.equ SREG_I = 7 ; Global Interrupt Enable
92
; SPL - Stack Pointer Low
93
.equ SP0 = 0 ; Stack pointer bit 0
94
.equ SP1 = 1 ; Stack pointer bit 1
95
.equ SP2 = 2 ; Stack pointer bit 2
96
.equ SP3 = 3 ; Stack pointer bit 3
98
.equ SP5 = 5 ; Stack pointer bit 5
99
.equ SP6 = 6 ; Stack pointer bit 6
100
.equ SP7 = 7 ; Stack pointer bit 7
102
; MCUCR - MCU Control Register
103
.equ ISC00 = 0 ; Interrupt Sense Control 0 bit 0
104
.equ ISC01 = 1 ; Interrupt Sense Control 0 bit 1
105
.equ SM = 4 ; Sleep Mode
106
.equ SE = 5 ; Sleep Enable
109
.equ PORF = 0 ; Power On Reset Flag
110
.equ EXTRF = 1 ; Externl Reset Flag
112
; GIMSK - General Interrupt Mask Register
113
.equ INT0 = 6 ; External Interrupt Request 0 Enable
115
; GIFR - General Interrupt Flag Register
116
.equ INTF0 = 6 ; External Interrupt Flag 0
119
; ***** EEPROM ***********************
120
; EEAR - EEPROM Read/Write Access
121
.equ EEAR0 = 0 ; EEPROM Read/Write Access bit 0
122
.equ EEAR1 = 1 ; EEPROM Read/Write Access bit 1
123
.equ EEAR2 = 2 ; EEPROM Read/Write Access bit 2
124
.equ EEAR3 = 3 ; EEPROM Read/Write Access bit 3
125
.equ EEAR4 = 4 ; EEPROM Read/Write Access bit 4
126
.equ EEAR5 = 5 ; EEPROM Read/Write Access bit 5
127
.equ EEAR6 = 6 ; EEPROM Read/Write Access bit 6
129
; EEDR - EEPROM Data Register
130
.equ EEDR0 = 0 ; EEPROM Data Register bit 0
131
.equ EEDR1 = 1 ; EEPROM Data Register bit 1
132
.equ EEDR2 = 2 ; EEPROM Data Register bit 2
133
.equ EEDR3 = 3 ; EEPROM Data Register bit 3
134
.equ EEDR4 = 4 ; EEPROM Data Register bit 4
135
.equ EEDR5 = 5 ; EEPROM Data Register bit 5
136
.equ EEDR6 = 6 ; EEPROM Data Register bit 6
137
.equ EEDR7 = 7 ; EEPROM Data Register bit 7
139
; EECR - EEPROM Control Register
140
.equ EERE = 0 ; EEPROM Read Enable
141
.equ EEWE = 1 ; EEPROM Write Enable
142
.equ EEMWE = 2 ; EEPROM Master Write Enable
145
; ***** WATCHDOG *********************
146
; WDTCR - Watchdog Timer Control Register
147
.equ WDP0 = 0 ; Watch Dog Timer Prescaler bit 0
148
.equ WDP1 = 1 ; Watch Dog Timer Prescaler bit 1
149
.equ WDP2 = 2 ; Watch Dog Timer Prescaler bit 2
150
.equ WDE = 3 ; Watch Dog Enable
152
.equ WDDE = WDTOE ; For compatibility
155
; ***** TIMER_COUNTER_0 **************
156
; TIMSK - Timer/Counter Interrupt Mask Register
157
.equ TOIE0 = 1 ; Timer/Counter0 Overflow Interrupt Enable
159
; TIFR - Timer/Counter Interrupt Flag register
160
.equ TOV0 = 1 ; Timer/Counter0 Overflow Flag
162
; TCCR0 - Timer/Counter0 Control Register
163
.equ CS00 = 0 ; Clock Select0 bit 0
164
.equ CS01 = 1 ; Clock Select0 bit 1
165
.equ CS02 = 2 ; Clock Select0 bit 2
167
; TCNT0 - Timer Counter 0
168
.equ TCNT00 = 0 ; Timer Counter 0 bit 0
169
.equ TCNT01 = 1 ; Timer Counter 0 bit 1
170
.equ TCNT02 = 2 ; Timer Counter 0 bit 2
171
.equ TCNT03 = 3 ; Timer Counter 0 bit 3
172
.equ TCNT04 = 4 ; Timer Counter 0 bit 4
173
.equ TCNT05 = 5 ; Timer Counter 0 bit 5
174
.equ TCNT06 = 6 ; Timer Counter 0 bit 6
175
.equ TCNT07 = 7 ; Timer Counter 0 bit 7
178
; ***** PORTB ************************
179
; PORTB - Data Register, Port B
181
.equ PB0 = 0 ; For compatibility
183
.equ PB1 = 1 ; For compatibility
185
.equ PB2 = 2 ; For compatibility
187
; DDRB - Data Direction Register, Port B
192
; PINB - Input Pins, Port B
199
; ***** LOCKSBITS ********************************************************
200
.equ LB1 = 0 ; Lockbit
201
.equ LB2 = 1 ; Lockbit
204
; ***** FUSES ************************************************************
209
; ***** CPU REGISTER DEFINITIONS *****************************************
219
; ***** DATA MEMORY DECLARATIONS *****************************************
220
.equ FLASHEND = 0x03ff ; Note: Word address
222
.equ SRAM_START = 0x0060
225
.equ XRAMEND = 0x0000
227
.equ EEPROMEND = 0x007f
229
#pragma AVRPART MEMORY PROG_FLASH 2048
230
#pragma AVRPART MEMORY EEPROM 128
231
#pragma AVRPART MEMORY INT_SRAM SIZE 128
232
#pragma AVRPART MEMORY INT_SRAM START_ADDR 0x60
238
; ***** INTERRUPT VECTORS ************************************************
239
.equ INT0addr = 0x0001 ; External Interrupt 0
240
.equ OVF0addr = 0x0002 ; Timer/Counter0 Overflow
242
.equ INT_VECTORS_SIZE = 3 ; size in words
244
#pragma AVRPART CORE INSTRUCTIONS_NOT_SUPPORTED break
246
#endif /* _2323DEF_INC_ */
248
; ***** END OF FILE ******************************************************