Blame | Last modification | View Log | Download | RSS feed
ifndef __reglit0xinc ; avoid multiple inclusion__reglit0xinc equ 1savelisting off ; no listing over this file;****************************************************************************;* *;* AS 1.42 - File REGLIT0X.INC *;* *;* contains SFR and Bit Definitions for ST7LITE0x *;* *;* Source: ST7LITE0xY0 Data Sheet, Rev. 6, November 2007 *;* *;****************************************************************************;----------------------------------------------------------------------------; Memory AddressesRAMSTART label $0080 ; Start Address Internal RAMRAMEND label $00ff ; End " " "if SUBSTR(MOMCPUNAME,7,1)="S"ROMSTART equ $fa00elseifROMSTART equ $fc00endifswitch SUBSTR(MOMCPUNAME,STRLEN(MOMCPUNAME)-3,1)case "2"__hasadc equ 0case "5"__hasadc equ 1case "9"__hasadc equ 1EESTART label $1000EEEND label $107felsecasefatal "Huh?"endcaseRCCR0 label $1000 ; RC Oscillator Calibration ValuesRCCR1 label $1001;----------------------------------------------------------------------------; Interrupt VectorsSPI_vect label $ffe2 ; SPI InterruptLT_RTC1vect label $ffe4 ; Lite Timer RTC1 InterruptLT_IC_vect label $ffe6 ; Lite Timer Input Capture InterruptAT_OF_vect label $ffe8 ; AT Timer Overflow 1 InterruptAT_OC_vect label $ffea ; AT Timer Output Compare InterruptSI_vect label $ffec ; AVD 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 EI0TRAP_vect label $fffc ; TRAP (software) Interrupt VectorRESET_vect label $fffe ; RESET Vector;----------------------------------------------------------------------------; GPIOinclude "gpio.inc"__defgpio "PA",$0000__defgpio "PB",$0003;----------------------------------------------------------------------------; Lite TimerLTCSR label $000b ; Lite Timer Control/Status Register 2ICIE bit LTCSR,7 ; Input Capture Interrupt EnableICF bit LTCSR,6 ; Input Capture FlagTB bit LTCSR,5 ; Timebase Period SelectionTBIE bit LTCSR,4 ; Timebase Interrupt Enable BitTBF bit LTCSR,3 ; Timebase Interrupt FlagWDGR bit LTCSR,2 ; Force Reset/ Reset Status FlagWDGE bit LTCSR,1 ; Watchdog EnableWDGD bit LTCSR,0 ; Watchdog Reset DelayLTICR label $000c ; Lite Timer Input Capture Register;----------------------------------------------------------------------------; Auto-Reload TimerATCSR label $000d ; Timer Control/Status RegisterCK bfield ATCSR,3,2 ; Counter Clock SelectionOVF bit ATCSR,2 ; Overflow FlagOVFIE bit ATCSR,1 ; Overflow Interrupt Enable BitCMPIE 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 RegisterOE0 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 FlagDCR0H label $0017 ; PWM 0 Duty Cycle Register HighDCR0L label $0018 ; PWM 0 Duty Cycle Register Low;----------------------------------------------------------------------------; FlashFCSR label $002f ; Flash Control/Status RegisterOPT bit FCSR,2LAT bit FCSR,1PGM bit FCSR,0;----------------------------------------------------------------------------; 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 Converterif __hasadcADCCSR label $0034 ; A/D Control Status RegisterEOC bit ADCCSR,7 ; Conversion CompleteSPEED bit ADCCSR,6 ; ADC Clock SelectionADON bit ADCCSR,5 ; A/D Converter and Amplifier OnCH bfield ADCCSR,0,3 ; Channel SelectionADCDR label $0035 ; A/D Data RegisterADCAMP label $0036 ; A/D Amplifier Control RegisterSLOW bit ADCAMP,3 ; Slow ModeAMPSEL bit ADCAMP,2 ; Amplifier Selection Bitendif;----------------------------------------------------------------------------; 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 Sensitivity;----------------------------------------------------------------------------; CLOCKSMCCSR 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 RegisterCR bfield RCCR,0,8 ; RC Oscillator Frequency Adjustment Bits;----------------------------------------------------------------------------; SISICSR label $003a ; System Integrity Control/Status RegisterLOCKED bit SICSR,3 ; PLL Locked FlagLVDRF bit SICSR,2 ; LVD Reset FlagAVDF bit SICSR,1 ; Voltage Detector FlagAVDIE bit SICSR,0 ; Voltage Detector Interrupt Enablerestoreendif ; __reglit0xinc