📄 m6450def.inc
字号:
.equ TCNT0_3 = 3 ;
.equ TCNT0_4 = 4 ;
.equ TCNT0_5 = 5 ;
.equ TCNT0_6 = 6 ;
.equ TCNT0_7 = 7 ;
; OCR0A - Timer/Counter0 Output Compare Register
.equ OCR0A0 = 0 ;
.equ OCR0A1 = 1 ;
.equ OCR0A2 = 2 ;
.equ OCR0A3 = 3 ;
.equ OCR0A4 = 4 ;
.equ OCR0A5 = 5 ;
.equ OCR0A6 = 6 ;
.equ OCR0A7 = 7 ;
; TIMSK0 - Timer/Counter0 Interrupt Mask Register
.equ TOIE0 = 0 ; Timer/Counter0 Overflow Interrupt Enable
.equ OCIE0A = 1 ; Timer/Counter0 Output Compare Match Interrupt Enable
; TIFR0 - Timer/Counter0 Interrupt Flag register
.equ TOV0 = 0 ; Timer/Counter0 Overflow Flag
.equ OCF0A = 1 ; Timer/Counter0 Output Compare Flag 0
; GTCCR - General Timer/Control Register
.equ PSR310 = 0 ; Prescaler Reset Timer/Counter1 and Timer/Counter0
.equ PSR10 = PSR310 ; For compatibility
.equ PSR0 = PSR310 ; For compatibility
.equ PSR1 = PSR310 ; For compatibility
.equ PSR3 = PSR310 ; For compatibility
.equ TSM = 7 ; Timer/Counter Synchronization Mode
; ***** TIMER_COUNTER_2 **************
; TIMSK2 - Timer/Counter2 Interrupt Mask register
.equ TOIE2 = 0 ; Timer/Counter2 Overflow Interrupt Enable
.equ OCIE2A = 1 ; Timer/Counter2 Output Compare Match Interrupt Enable
; TIFR2 - Timer/Counter2 Interrupt Flag Register
.equ TOV2 = 0 ; Timer/Counter2 Overflow Flag
.equ OCF2A = 1 ; Timer/Counter2 Output Compare Flag 2
; TCCR2A - Timer/Counter2 Control Register
.equ CS20 = 0 ; Clock Select bit 0
.equ CS21 = 1 ; Clock Select bit 1
.equ CS22 = 2 ; Clock Select bit 2
.equ WGM21 = 3 ; Waveform Generation Mode
.equ COM2A0 = 4 ; Compare Output Mode bit 0
.equ COM2A1 = 5 ; Compare Output Mode bit 1
.equ WGM20 = 6 ; Waveform Generation Mode
.equ FOC2A = 7 ; Force Output Compare A
; TCNT2 - Timer/Counter2
.equ TCNT2_0 = 0 ; Timer/Counter 2 bit 0
.equ TCNT2_1 = 1 ; Timer/Counter 2 bit 1
.equ TCNT2_2 = 2 ; Timer/Counter 2 bit 2
.equ TCNT2_3 = 3 ; Timer/Counter 2 bit 3
.equ TCNT2_4 = 4 ; Timer/Counter 2 bit 4
.equ TCNT2_5 = 5 ; Timer/Counter 2 bit 5
.equ TCNT2_6 = 6 ; Timer/Counter 2 bit 6
.equ TCNT2_7 = 7 ; Timer/Counter 2 bit 7
; OCR2A - Timer/Counter2 Output Compare Register
.equ OCR2A0 = 0 ; Timer/Counter2 Output Compare Register Bit 0
.equ OCR2A1 = 1 ; Timer/Counter2 Output Compare Register Bit 1
.equ OCR2A2 = 2 ; Timer/Counter2 Output Compare Register Bit 2
.equ OCR2A3 = 3 ; Timer/Counter2 Output Compare Register Bit 3
.equ OCR2A4 = 4 ; Timer/Counter2 Output Compare Register Bit 4
.equ OCR2A5 = 5 ; Timer/Counter2 Output Compare Register Bit 5
.equ OCR2A6 = 6 ; Timer/Counter2 Output Compare Register Bit 6
.equ OCR2A7 = 7 ; Timer/Counter2 Output Compare Register Bit 7
; GTCCR - General Timer/Counter Control Register
.equ PSR2 = 1 ; Prescaler Reset Timer/Counter2
; ASSR - Asynchronous Status Register
.equ TCR2UB = 0 ; TCR2UB: Timer/Counter Control Register2 Update Busy
.equ OCR2UB = 1 ; Output Compare Register2 Update Busy
.equ TCN2UB = 2 ; TCN2UB: Timer/Counter2 Update Busy
.equ AS2 = 3 ; AS2: Asynchronous Timer/Counter2
.equ EXCLK = 4 ; Enable External Clock Interrupt
; ***** TIMER_COUNTER_1 **************
; TIMSK1 - Timer/Counter1 Interrupt Mask Register
.equ TOIE1 = 0 ; Timer/Counter1 Overflow Interrupt Enable
.equ OCIE1A = 1 ; Timer/Counter1 Output Compare A Match Interrupt Enable
.equ OCIE1B = 2 ; Timer/Counter1 Output Compare B Match Interrupt Enable
.equ ICIE1 = 5 ; Timer/Counter1 Input Capture Interrupt Enable
; TIFR1 - Timer/Counter1 Interrupt Flag register
.equ TOV1 = 0 ; Timer/Counter1 Overflow Flag
.equ OCF1A = 1 ; Output Compare Flag 1A
.equ OCF1B = 2 ; Output Compare Flag 1B
.equ ICF1 = 5 ; Input Capture Flag 1
; TCCR1A - Timer/Counter1 Control Register A
.equ WGM10 = 0 ; Waveform Generation Mode
.equ WGM11 = 1 ; Waveform Generation Mode
.equ COM1B0 = 4 ; Compare Output Mode 1B, bit 0
.equ COM1B1 = 5 ; Compare Output Mode 1B, bit 1
.equ COM1A0 = 6 ; Compare Output Mode 1A, bit 0
.equ COM1A1 = 7 ; Compare Output Mode 1A, bit 1
; TCCR1B - Timer/Counter1 Control Register B
.equ CS10 = 0 ; Prescaler source of Timer/Counter 1
.equ CS11 = 1 ; Prescaler source of Timer/Counter 1
.equ CS12 = 2 ; Prescaler source of Timer/Counter 1
.equ WGM12 = 3 ; Waveform Generation Mode
.equ WGM13 = 4 ; Waveform Generation Mode
.equ ICES1 = 6 ; Input Capture 1 Edge Select
.equ ICNC1 = 7 ; Input Capture 1 Noise Canceler
; TCCR1C - Timer/Counter 1 Control Register C
.equ FOC1B = 6 ; Force Output Compare 1B
.equ FOC1A = 7 ; Force Output Compare 1A
; ***** WATCHDOG *********************
; WDTCR - Watchdog Timer Control Register
.equ WDTCSR = WDTCR ; For compatibility
.equ WDP0 = 0 ; Watch Dog Timer Prescaler bit 0
.equ WDP1 = 1 ; Watch Dog Timer Prescaler bit 1
.equ WDP2 = 2 ; Watch Dog Timer Prescaler bit 2
.equ WDE = 3 ; Watch Dog Enable
.equ WDCE = 4 ; Watchdog Change Enable
.equ WDTOE = WDCE ; For compatibility
; ***** BOOT_LOAD ********************
; SPMCSR - Store Program Memory Control Register
.equ SPMCR = SPMCSR ; For compatibility
.equ SPMEN = 0 ; Store Program Memory Enable
.equ PGERS = 1 ; Page Erase
.equ PGWRT = 2 ; Page Write
.equ BLBSET = 3 ; Boot Lock Bit Set
.equ RWWSRE = 4 ; Read While Write section read enable
.equ ASRE = RWWSRE ; For compatibility
.equ RWWSB = 6 ; Read While Write Section Busy
.equ ASB = RWWSB ; For compatibility
.equ SPMIE = 7 ; SPM Interrupt Enable
; ***** PORTH ************************
; PORTH - PORT H Data Register
.equ PORTH0 = 0 ; PORT H Data Register bit 0
.equ PH0 = 0 ; For compatibility
.equ PORTH1 = 1 ; PORT H Data Register bit 1
.equ PH1 = 1 ; For compatibility
.equ PORTH2 = 2 ; PORT H Data Register bit 2
.equ PH2 = 2 ; For compatibility
.equ PORTH3 = 3 ; PORT H Data Register bit 3
.equ PH3 = 3 ; For compatibility
.equ PORTH4 = 4 ; PORT H Data Register bit 4
.equ PH4 = 4 ; For compatibility
.equ PORTH5 = 5 ; PORT H Data Register bit 5
.equ PH5 = 5 ; For compatibility
.equ PORTH6 = 6 ; PORT H Data Register bit 6
.equ PH6 = 6 ; For compatibility
.equ PORTH7 = 7 ; PORT H Data Register bit 7
.equ PH7 = 7 ; For compatibility
; DDRH - PORT H Data Direction Register
.equ DDH0 = 0 ; PORT H Data Direction Register bit 0
.equ DDH1 = 1 ; PORT H Data Direction Register bit 1
.equ DDH2 = 2 ; PORT H Data Direction Register bit 2
.equ DDH3 = 3 ; PORT H Data Direction Register bit 3
.equ DDH4 = 4 ; PORT H Data Direction Register bit 4
.equ DDH5 = 5 ; PORT H Data Direction Register bit 5
.equ DDH6 = 6 ; PORT H Data Direction Register bit 6
.equ DDH7 = 7 ; PORT H Data Direction Register bit 7
; PINH - PORT H Input Pins
.equ PINH0 = 0 ; PORT H Input Pins bit 0
.equ PINH1 = 1 ; PORT H Input Pins bit 1
.equ PINH2 = 2 ; PORT H Input Pins bit 2
.equ PINH3 = 3 ; PORT H Input Pins bit 3
.equ PINH4 = 4 ; PORT H Input Pins bit 4
.equ PINH5 = 5 ; PORT H Input Pins bit 5
.equ PINH6 = 6 ; PORT H Input Pins bit 6
.equ PINH7 = 7 ; PORT H Input Pins bit 7
; ***** PORTJ ************************
; PORTJ - PORT J Data Register
.equ PORTJ0 = 0 ; PORT J Data Register bit 0
.equ PJ0 = 0 ; For compatibility
.equ PORTJ1 = 1 ; PORT J Data Register bit 1
.equ PJ1 = 1 ; For compatibility
.equ PORTJ2 = 2 ; PORT J Data Register bit 2
.equ PJ2 = 2 ; For compatibility
.equ PORTJ3 = 3 ; PORT J Data Register bit 3
.equ PJ3 = 3 ; For compatibility
.equ PORTJ4 = 4 ; PORT J Data Register bit 4
.equ PJ4 = 4 ; For compatibility
.equ PORTJ5 = 5 ; PORT J Data Register bit 5
.equ PJ5 = 5 ; For compatibility
.equ PORTJ6 = 6 ; PORT J Data Register bit 6
.equ PJ6 = 6 ; For compatibility
; DDRJ - PORT J Data Direction Register
.equ DDJ0 = 0 ; PORT J Data Direction Register bit 0
.equ DDJ1 = 1 ; PORT J Data Direction Register bit 1
.equ DDJ2 = 2 ; PORT J Data Direction Register bit 2
.equ DDJ3 = 3 ; PORT J Data Direction Register bit 3
.equ DDJ4 = 4 ; PORT J Data Direction Register bit 4
.equ DDJ5 = 5 ; PORT J Data Direction Register bit 5
.equ DDJ6 = 6 ; PORT J Data Direction Register bit 6
; PINJ - PORT J Input Pins
.equ PINJ0 = 0 ; PORT J Input Pins bit 0
.equ PINJ1 = 1 ; PORT J Input Pins bit 1
.equ PINJ2 = 2 ; PORT J Input Pins bit 2
.equ PINJ3 = 3 ; PORT J Input Pins bit 3
.equ PINJ4 = 4 ; PORT J Input Pins bit 4
.equ PINJ5 = 5 ; PORT J Input Pins bit 5
.equ PINJ6 = 6 ; PORT J Input Pins bit 6
; ***** EXTERNAL_INTERRUPT ***********
; EICRA - External Interrupt Control Register A
.equ ISC00 = 0 ; External Interrupt Sense Control 0 Bit 0
.equ ISC01 = 1 ; External Interrupt Sense Control 0 Bit 1
; EIMSK - External Interrupt Mask Register
.equ INT0 = 0 ; External Interrupt Request 0 Enable
.equ PCIE0 = 4 ; Pin Change Interrupt Enable 0
.equ PCIE1 = 5 ; Pin Change Interrupt Enable 1
.equ PCIE2 = 6 ; Pin Change Interrupt Enable 2
.equ PCIE3 = 7 ; Pin Change Interrupt Enable 3
; EIFR - External Interrupt Flag Register
.equ INTF0 = 0 ; External Interrupt Flag 0
.equ PCIF0 = 4 ; Pin Change Interrupt Flag 0
.equ PCIF1 = 5 ; Pin Change Interrupt Flag 1
.equ PCIF2 = 6 ; Pin Change Interrupt Flag 2
.equ PCIF3 = 7 ; Pin Change Interrupt Flag 3
; PCMSK3 - Pin Change Mask Register 3
.equ PCINT24 = 0 ; Pin Change Enable Mask 24
.equ PCINT25 = 1 ; Pin Change Enable Mask 25
.equ PCINT26 = 2 ; Pin Change Enable Mask 26
.equ PCINT27 = 3 ; Pin Change Enable Mask 27
.equ PCINT28 = 4 ; Pin Change Enable Mask 28
.equ PCINT29 = 5 ; Pin Change Enable Mask 29
.equ PCINT30 = 6 ; Pin Change Enable Mask 30
; PCMSK2 - Pin Change Mask Register 2
.equ PCINT16 = 0 ; Pin Change Enable Mask 16
.equ PCINT17 = 1 ; Pin Change Enable Mask 17
.equ PCINT18 = 2 ; Pin Change Enable Mask 18
.equ PCINT19 = 3 ; Pin Change Enable Mask 19
.equ PCINT20 = 4 ; Pin Change Enable Mask 20
.equ PCINT21 = 5 ; Pin Change Enable Mask 21
.equ PCINT22 = 6 ; Pin Change Enable Mask 22
.equ PCINT23 = 7 ; Pin Change Enable Mask 23
; PCMSK1 - Pin Change Mask Register 1
.equ PCINT8 = 0 ; Pin Change Enable Mask 8
.equ PCINT9 = 1 ; Pin Change Enable Mask 9
.equ PCINT10 = 2 ; Pin Change Enable Mask 10
.equ PCINT11 = 3 ; Pin Change Enable Mask 11
.equ PCINT12 = 4 ; Pin Change Enable Mask 12
.equ PCINT13 = 5 ; Pin Change Enable Mask 13
.equ PCINT14 = 6 ; Pin Change Enable Mask 14
.equ PCINT15 = 7 ; Pin Change Enable Mask 15
; PCMSK0 - Pin Change Mask Register 0
.equ PCINT0 = 0 ; Pin Change Enable Mask 0
.equ PCINT1 = 1 ; Pin Change Enable Mask 1
.equ PCINT2 = 2 ; Pin Change Enable Mask 2
.equ PCINT3 = 3 ; Pin Change Enable Mask 3
.equ PCINT4 = 4 ; Pin Change Enable Mask 4
.equ PCINT5 = 5 ; Pin Change Enable Mask 5
.equ PCINT6 = 6 ; Pin Change Enable Mask 6
.equ PCINT7 = 7 ; Pin Change Enable Mask 7
; ***** LOCKSBITS ********************************************************
.equ LB1 = 0 ; Lock bit
.equ LB2 = 1 ; Lock bit
.equ BLB01 = 2 ; Boot Lock bit
.equ BLB02 = 3 ; Boot Lock bit
.equ BLB11 = 4 ; Boot lock bit
.equ BLB12 = 5 ; Boot lock bit
; ***** FUSES ************************************************************
; LOW fuse bits
.equ CKSEL0 = 0 ; Select Clock Source
.equ CKSEL1 = 1 ; Select Clock Source
.equ CKSEL2 = 2 ; Select Clock Source
.equ CKSEL3 = 3 ; Select Clock Source
.equ SUT0 = 4 ; Select start-up time
.equ SUT1 = 5 ; Select start-up time
.equ CKOUT = 6 ; Oscillator options
.equ CKDIV8 = 7 ; Divide clock by 8
; HIGH fuse bits
.equ BOOTRST = 0 ; Select Reset Vector
.equ BOOTSZ0 = 1 ; Select Boot Size
.equ BOOTSZ1 = 2 ; Select Boot Size
.equ EESAVE = 3 ; EEPROM memory is preserved through chip erase
.equ WDTON = 4 ; Watchdog timer always on
.equ SPIEN = 5 ; Enable Serial programming and Data Downloading
.equ JTAGEN = 6 ; Enable JTAG
.equ OCDEN = 7 ; Enable OCD
; EXTENDED fuse bits
.equ RESERVED = 0 ; Reserved fuse bit, do not program
.equ BODLEVEL0 = 1 ; Brown-out Detector trigger level
.equ BODLEVEL1 = 2 ; Brown-out Detector trigger level
; ***** CPU REGISTER DEFINITIONS *****************************************
.def XH = r27
.def XL = r26
.def YH = r29
.def YL = r28
.def ZH = r31
.def ZL = r30
; ***** DATA MEMORY DECLARATIONS *****************************************
.equ FLASHEND = 0x7fff ; Note: Word address
.equ IOEND = 0x00ff
.equ SRAM_START = 0x0100
.equ SRAM_SIZE = 4096
.equ RAMEND = 0x10ff
.equ XRAMEND = 0x0000
.equ E2END = 0x07ff
.equ EEPROMEND = 0x07ff
.equ EEADRBITS = 11
#pragma AVRPART MEMORY PROG_FLASH 65536
#pragma AVRPART MEMORY EEPROM 2048
#pragma AVRPART MEMORY INT_SRAM SIZE 4096
#pragma AVRPART MEMORY INT_SRAM START_ADDR 0x100
; ***** BOOTLOADER DECLARATIONS ******************************************
.equ NRWW_START_ADDR = 0x7000
.equ NRWW_STOP_ADDR = 0x7fff
.equ RWW_START_ADDR = 0x0
.equ RWW_STOP_ADDR = 0x6fff
.equ PAGESIZE = 128
.equ FIRSTBOOTSTART = 0x7e00
.equ SECONDBOOTSTART = 0x7c00
.equ THIRDBOOTSTART = 0x7800
.equ FOURTHBOOTSTART = 0x7000
.equ SMALLBOOTSTART = FIRSTBOOTSTART
.equ LARGEBOOTSTART = FOURTHBOOTSTART
; ***** INTERRUPT VECTORS ************************************************
.equ INT0addr = 0x0002 ; External Interrupt Request 0
.equ PCI0addr = 0x0004 ; Pin Change Interrupt Request 0
.equ PCI1addr = 0x0006 ; Pin Change Interrupt Request 1
.equ OC2addr = 0x0008 ; Timer/Counter2 Compare Match
.equ OVF2addr = 0x000a ; Timer/Counter2 Overflow
.equ ICP1addr = 0x000c ; Timer/Counter1 Capture Event
.equ OC1Aaddr = 0x000e ; Timer/Counter1 Compare Match A
.equ OC1Baddr = 0x0010 ; Timer/Counter Compare Match B
.equ OVF1addr = 0x0012 ; Timer/Counter1 Overflow
.equ OC0addr = 0x0014 ; Timer/Counter0 Compare Match
.equ OVF0addr = 0x0016 ; Timer/Counter0 Overflow
.equ SPIaddr = 0x0018 ; SPI Serial Transfer Complete
.equ URXCaddr = 0x001a ; USART, Rx Complete
.equ URXC0addr = 0x001a ; For compatibility
.equ UDREaddr = 0x001c ; USART Data register Empty
.equ UDRE0addr = 0x001c ; For compatibility
.equ UTXC0addr = 0x001e ; USART0, Tx Complete
.equ UTXCaddr = 0x001e ; For compatibility
.equ USI_STARTaddr = 0x0020 ; USI Start Condition
.equ USI_OVFaddr = 0x0022 ; USI Overflow
.equ ACIaddr = 0x0024 ; Analog Comparator
.equ ADCCaddr = 0x0026 ; ADC Conversion Complete
.equ ERDYaddr = 0x0028 ; EEPROM Ready
.equ SPMRaddr = 0x002a ; Store Program Memory Read
.equ RESERVEDaddr = 0x002c ; RESERVED
.equ PCI2addr = 0x002e ; Pin Change Interrupt Request 2
.equ PCI3addr = 0x0030 ; Pin Change Interrupt Request 3
.equ INT_VECTORS_SIZE = 50 ; size in words
#endif /* _M6450DEF_INC_ */
; ***** END OF FILE ******************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -