;***************************************************************************
|
;***************************************************************************
|
;* 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
|
;* 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
|
;*
|
;*
|
;* Number :AVR000
|
;* Number :AVR000
|
;* File Name :"2323def.inc"
|
;* File Name :"2323def.inc"
|
;* Title :Register/Bit Definitions for the AT90S2323
|
;* Title :Register/Bit Definitions for the AT90S2323
|
;* Date :99.01.28
|
;* Date :99.01.28
|
;* Version :1.30
|
;* Version :1.30
|
;* Support telephone :+47 72 88 87 20 (ATMEL Norway)
|
;* Support telephone :+47 72 88 87 20 (ATMEL Norway)
|
;* Support fax :+47 72 88 87 18 (ATMEL Norway)
|
;* Support fax :+47 72 88 87 18 (ATMEL Norway)
|
;* Support E-Mail :avr@atmel.com
|
;* Support E-Mail :avr@atmel.com
|
;* Target MCU :AT90S2323
|
;* Target MCU :AT90S2323
|
;*
|
;*
|
;* DESCRIPTION
|
;* DESCRIPTION
|
;* When including this file in the assembly program file, all I/O register
|
;* When including this file in the assembly program file, all I/O register
|
;* names and I/O register bit names appearing in the data book can be used.
|
;* names and I/O register bit names appearing in the data book can be used.
|
;*
|
;*
|
;* The Register names are represented by their hexadecimal addresses.
|
;* The Register names are represented by their hexadecimal addresses.
|
;*
|
;*
|
;* The Register Bit names are represented by their bit number (0-7).
|
;* The Register Bit names are represented by their bit number (0-7).
|
;*
|
;*
|
;* Please observe the difference in using the bit names with instructions
|
;* Please observe the difference in using the bit names with instructions
|
;* such as "sbr"/"cbr" (set/clear bit in register) and "sbrs"/"sbrc"
|
;* such as "sbr"/"cbr" (set/clear bit in register) and "sbrs"/"sbrc"
|
;* (skip if bit in register set/cleared). The following example illustrates
|
;* (skip if bit in register set/cleared). The following example illustrates
|
;* this:
|
;* this:
|
;*
|
;*
|
;* in r16,PORTB ;read PORTB latch
|
;* in r16,PORTB ;read PORTB latch
|
;* sbr r16,(1<
|
;* sbr r16,(1<
|
;* out PORTB,r16 ;output to PORTB
|
;* out PORTB,r16 ;output to PORTB
|
;*
|
;*
|
;* in r16,TIFR ;read the Timer Interrupt Flag Register
|
;* in r16,TIFR ;read the Timer Interrupt Flag Register
|
;* sbrc r16,TOV0 ;test the overflow flag (use bit#)
|
;* sbrc r16,TOV0 ;test the overflow flag (use bit#)
|
;* rjmp TOV0_is_set ;jump if set
|
;* rjmp TOV0_is_set ;jump if set
|
;* ... ;otherwise do something else
|
;* ... ;otherwise do something else
|
;***************************************************************************
|
;***************************************************************************
|
|
|
;***** Specify Device
|
;***** Specify Device
|
.device AT90S2323
|
.device AT90S2323
|
|
|
;***** I/O Register Definitions
|
;***** I/O Register Definitions
|
.equ SREG =$3f
|
.equ SREG =$3f
|
.equ SPL =$3d
|
.equ SPL =$3d
|
.equ GIMSK =$3b
|
.equ GIMSK =$3b
|
.equ GIFR =$3a
|
.equ GIFR =$3a
|
.equ TIMSK =$39
|
.equ TIMSK =$39
|
.equ TIFR =$38
|
.equ TIFR =$38
|
.equ MCUCR =$35
|
.equ MCUCR =$35
|
.equ MCUSR =$34
|
.equ MCUSR =$34
|
.equ TCCR0 =$33
|
.equ TCCR0 =$33
|
.equ TCNT0 =$32
|
.equ TCNT0 =$32
|
.equ WDTCR =$21
|
.equ WDTCR =$21
|
.equ EEAR =$1e
|
.equ EEAR =$1e
|
.equ EEARL =$1e
|
.equ EEARL =$1e
|
.equ EEDR =$1d
|
.equ EEDR =$1d
|
.equ EECR =$1c
|
.equ EECR =$1c
|
.equ PORTB =$18
|
.equ PORTB =$18
|
.equ DDRB =$17
|
.equ DDRB =$17
|
.equ PINB =$16
|
.equ PINB =$16
|
|
|
;***** Bit Definitions
|
;***** Bit Definitions
|
|
|
.equ EXTRF =1
|
.equ EXTRF =1
|
.equ PORF =0
|
.equ PORF =0
|
|
|
.equ INT0 =6
|
.equ INT0 =6
|
.equ INTF0 =6
|
.equ INTF0 =6
|
|
|
.equ TOIE0 =1
|
.equ TOIE0 =1
|
.equ TOV0 =1
|
.equ TOV0 =1
|
|
|
.equ SE =5
|
.equ SE =5
|
.equ SM =4
|
.equ SM =4
|
.equ ISC01 =1
|
.equ ISC01 =1
|
.equ ISC00 =0
|
.equ ISC00 =0
|
|
|
.equ CS02 =2
|
.equ CS02 =2
|
.equ CS01 =1
|
.equ CS01 =1
|
.equ CS00 =0
|
.equ CS00 =0
|
|
|
.equ WDTOE =4
|
.equ WDTOE =4
|
.equ WDE =3
|
.equ WDE =3
|
.equ WDP2 =2
|
.equ WDP2 =2
|
.equ WDP1 =1
|
.equ WDP1 =1
|
.equ WDP0 =0
|
.equ WDP0 =0
|
|
|
.equ EEMWE =2
|
.equ EEMWE =2
|
.equ EEWE =1
|
.equ EEWE =1
|
.equ EERE =0
|
.equ EERE =0
|
|
|
.equ PB4 =4
|
.equ PB4 =4
|
.equ PB3 =3
|
.equ PB3 =3
|
.equ PB2 =2
|
.equ PB2 =2
|
.equ PB1 =1
|
.equ PB1 =1
|
.equ PB0 =0
|
.equ PB0 =0
|
|
|
.equ DDB4 =4
|
.equ DDB4 =4
|
.equ DDB3 =3
|
.equ DDB3 =3
|
.equ DDB2 =2
|
.equ DDB2 =2
|
.equ DDB1 =1
|
.equ DDB1 =1
|
.equ DDB0 =0
|
.equ DDB0 =0
|
|
|
.equ PINB4 =4
|
.equ PINB4 =4
|
.equ PINB3 =3
|
.equ PINB3 =3
|
.equ PINB2 =2
|
.equ PINB2 =2
|
.equ PINB1 =1
|
.equ PINB1 =1
|
.equ PINB0 =0
|
.equ PINB0 =0
|
|
|
.def XL =r26
|
.def XL =r26
|
.def XH =r27
|
.def XH =r27
|
.def YL =r28
|
.def YL =r28
|
.def YH =r29
|
.def YH =r29
|
.def ZL =r30
|
.def ZL =r30
|
.def ZH =r31
|
.def ZH =r31
|
|
|
.equ RAMEND =$DF ;Last On-Chip SRAM Location
|
.equ RAMEND =$DF ;Last On-Chip SRAM Location
|
.equ XRAMEND =$DF
|
.equ XRAMEND =$DF
|
.equ E2END =$7F
|
.equ E2END =$7F
|
.equ FLASHEND=$3FF
|
.equ FLASHEND=$3FF
|
|
|
|
|
.equ INT0addr=$001 ;External Interrupt0 Vector Address
|
.equ INT0addr=$001 ;External Interrupt0 Vector Address
|
.equ OVF0addr=$002 ;Overflow0 Interrupt Vector Address
|
.equ OVF0addr=$002 ;Overflow0 Interrupt Vector Address
|
|
|
|
|