Blame | Last modification | View Log | Download | RSS feed
ifndef __reglit1xinc ; avoid multiple inclusion__reglit1xinc equ 1savelisting off ; no listing over this file;****************************************************************************;* *;* AS 1.42 - File REGLIT1X.INC *;* *;* contains SFR and Bit Definitions for ST7LITE1x *;* *;* Source: ST7LITE1 Data Sheet, Rev. 2.0, December 2004 *;* *;****************************************************************************;----------------------------------------------------------------------------; Memory AddressesRAMSTART label $0080 ; Start Address Internal RAM; ($100...$17f not occupied)RAMEND label $01ff ; End " " "switch SUBSTR(MOMCPUNAME,STRLEN(MOMCPUNAME)-3,1)case "0","5"case "9"EESTART label $1000 ; Start Address Internal EEPROMEEEND label $107f ; End " " "endcaseRCCR0 label $1000 ; RC Oscillator Calibration ValuesRCCR1 label $1001;----------------------------------------------------------------------------; Interrupt VectorsSPI_vect label $ffe2 ; SPI InterruptLT_RTC1_vect label $ffe4 ; Lite Timer RTC1 InterruptLT_IC_vect label $ffe6 ; Lite Timer Input Capture InterruptAT_OF1_vect label $ffe8 ; AT Timer Overflow 1 InterruptAT_OC_vect label $ffea ; AT Timer Output Compare Interrupt, shared with...AT_IC_vect label $ffea ; AT Timer Input Capture InterruptSI_vect label $ffec ; AVD InterruptLT_RTC2_vect label $fff0 ; LITE TIMER RTC2 interruptEI3_vect label $fff2 ; External Interrupt Vector EI3EI2_vect label $fff4 ; External Interrupt Vector EI2EI1_vect label $fff6 ; External Interrupt Vector EI1EI0_vect label $fff8 ; External Interrupt Vector EI0AWU_vect label $fffa ; Auto Wakeup Interrupt VectorTRAP_vect label $fffc ; TRAP (software) Interrupt VectorRESET_vect label $fffe ; RESET Vector;----------------------------------------------------------------------------; GPIOinclude "gpio.inc"__defgpio "PA",$0000__defgpio "PB",$0003;----------------------------------------------------------------------------; Lite TimerLTCSR2 label $0008 ; Lite Timer Control/Status Register 2TB2IE bit LTCSR2,1 ; Timebase 2 Interrupt Enable BitTB2F bit LTCSR2,0 ; Timebase 2 Interrupt FlagLTARR label $0009 ; Lite Timer Auto-reload RegisterLTCNTR label $000a ; Lite Timer Counter RegisterLTCSR1 label $000b ; Lite Timer Control/Status Register 1TBICIE bit LTCSR1,7 ; Interrupt Enable BitTBICF bit LTCSR1,6 ; Input Capture FlagTB bit LTCSR1,5 ; Timebase Period Selection BitTB1IE bit LTCSR1,4 ; Timebase Interrupt Enable BitTB1F bit LTCSR1,3 ; Timebase Interrupt FlagLTICR label $000c ; Lite Timer Input Capture Register;----------------------------------------------------------------------------; Auto-Reload TimerATCSR label $000d ; Timer Control/Status RegisterICF bit ATCSR,6 ; Input Capture flagICIE bit ATCSR,5 ; IC Interrupt Enable bitCK bfield ATCSR,3,2 ; Counter Clock SelectionOVF1 bit ATCSR,2 ; Overflow flagOVFIE1 bit ATCSR,1 ; Overflow Interrupt Enable bitATCMPIE bit ATCSR,0 ; Compare Interrupt Enable bitCNTRH label $000e ; Counter Register HighCNTRL label $000f ; Counter Register LowATRH label $0010 ; Auto-Reload Register 1 HighATRL label $0011 ; Auto-Reload Register 1 LowPWMCR label $0012 ; PWM Output Control RegisterOE3 bit PWMCR,6 ; PWM3 Output EnableOE2 bit PWMCR,4 ; PWM2 Output EnableOE1 bit PWMCR,2 ; PWM1 Output EnableOE0 bit PWMCR,0 ; PWM0 Output EnablePWM0CSR label $0013 ; PWM 0 Control/Status RegisterOP0 bit PWM0CSR,1 ; PWM0 Output Polarity BitCMPF0 bit PWM0CSR,0 ; PWM0 Compare FlagPWM1CSR label $0014 ; PWM 1 Control/Status RegisterOP1 bit PWM1CSR,1 ; PWM1 Output Polarity BitCMPF1 bit PWM1CSR,0 ; PWM1 Compare FlagPWM2CSR label $0015 ; PWM 2 Control/Status RegisterOP2 bit PWM2CSR,1 ; PWM2 Output Polarity BitCMPF2 bit PWM2CSR,0 ; PWM2 Compare FlagPWM3CSR label $0016 ; PWM 3 Control/Status RegisterOP_EN bit PWM3CSR,3 ; One Pulse Mode Enable BitOPEDGE bit PWM3CSR,2 ; One Pulse Edge Selection BitOP3 bit PWM3CSR,1 ; PWM3 Output Polarity BitCMPF3 bit PWM3CSR,0 ; PWM3 Compare FlagDCR0H label $0017 ; PWM 0 Duty Cycle Register HighDCR0L label $0018 ; PWM 0 Duty Cycle Register LowDCR1H label $0019 ; PWM 1 Duty Cycle Register HighDCR1L label $001a ; PWM 1 Duty Cycle Register LowDCR2H label $001b ; PWM 2 Duty Cycle Register HighDCR2L label $001c ; PWM 2 Duty Cycle Register LowDCR3H label $001d ; PWM 3 Duty Cycle Register HighDCR3L label $001e ; PWM 3 Duty Cycle Register LowATICRH label $001f ; Input Capture Register HighATICRL label $0020 ; Input Capture Register LowTRANCR label $0021 ; Transfer Control RegisterTRAN bit TRANCR,0 ; Transfer enableBREAKCR label $0022 ; Break Control RegisterPWM bfield BREAKCR,0,4 ; Break Pattern bitsBA bit BREAKCR,5 ; Break ActiveBPEN bit BREAKCR,4 ; Break Pin Enable;----------------------------------------------------------------------------; WatchdogWDGCR label $002e ; Watchdog Control RegisterWDGA bit WDGCR,7 ; Activation bit;----------------------------------------------------------------------------; FlashFCSR label $002f ; Flash Control/Status Register;----------------------------------------------------------------------------; EEPROMifdef EESTARTEECSR label $0030 ; Data EEPROM Control/Status RegisterE2LAT bit EECSR,1 ; Latch Access TransferE2PGM bit EECSR,0 ; Programming control and statusendif;----------------------------------------------------------------------------; SPIinclude "spi2.inc"__defspi $0031;----------------------------------------------------------------------------; Analog/Digital Converterinclude "adc10.inc"__defadc10 $0034;----------------------------------------------------------------------------; ITCEICR label $0037 ; External Interrupt Control RegisterIS3 bfield EICR,6,2 ; ei3 SensitivityIS2 bfield EICR,4,2 ; ei2 SensitivityIS1 bfield EICR,2,2 ; ei1 SensitivityIS0 bfield EICR,0,2 ; ei0 SensitivityEISR label $003c ; External Interrupt Selection RegisterEI3 bfield EISR,6,2 ; ei3 Pin SelectionEI2 bfield EISR,4,2 ; ei2 Pin SelectionEI1 bfield EISR,2,2 ; ei1 Pin SelectionEI0 bfield EISR,0,2 ; ei0 Pin Selection;----------------------------------------------------------------------------; MCCMCCSR label $0038 ; Main Clock Control / Status RegisterMCO bit MCCSR,1 ; Main Clock Out Enable BitSMS bit MCCSR,0 ; Slow Mode Selection Bit;----------------------------------------------------------------------------; RC CalibrationRCCR label $0039 ; RC Calibration Control/Status RegisterSICSR label $003a ; System Integrity Control/Status RegisterLOCK32 bit SICSR,7 ; PLL 32Mhz Locked FlagWDGRF bit SICSR,4 ; Watchdog Reset FlagLOCKED bit SICSR,3 ; PLL Locked FlagLVDRF bit SICSR,2 ; LVD Reset FlagAVDF bit SICSR,1 ; Voltage Detector FlagAVDIE bit SICSR,0 ; Voltage Detector Interrupt Enable;----------------------------------------------------------------------------; Auto Wakeup UnitAWUPR label $0049 ; AWU Preload RegisterAWUCSR label $004a ; AWU Control/Status RegisterAWUF bit AWUCSR,2 ; Auto Wakeup FlagAWUM bit AWUCSR,1 ; Auto Wakeup Measurement BitAWUEN bit AWUCSR,0 ; Auto Wakeup From Halt Enabled Bit;----------------------------------------------------------------------------; Debug Moduleinclude "dm.inc"__defdm $004brestoreendif ; __reglit1xinc