📄 m406def.inc
字号:
.equ DOCIE = 1 ;
.equ COCIE = 2 ;
.equ DUVIE = 3 ; Deep Under-voltage Early Warning Interrupt Enable
.equ SCIF = 4 ;
.equ DOCIF = 5 ;
.equ COCIF = 6 ; Charge Over-current Protection Activated Interrupt Flag
.equ DUVIF = 7 ; Deep Under-voltage Early Warning Interrupt Flag
; ***** FET **************************
; FCSR -
.equ PFD = 0 ; Precharge FET disable
.equ CFE = 1 ; Charge FET Enable
.equ DFE = 2 ; Discharge FET Enable
.equ CPS = 3 ; Current Protection Status
.equ PWMOPC = 4 ; Pulse Width Modulation Modulation of OPC output
.equ PWMOC = 5 ; Pulse Width Modulation of OC output
; ***** COULOMB_COUNTER **************
; CADCSRA - CC-ADC Control and Status Register A
.equ CADSE = 0 ; When the CADSE bit is written to one, the ongoing CC-ADC conversion is aborted, and the CC-ADC enters Regular Current detection mode.
.equ CADSI0 = 1 ; The CADSI bits determine the current sampling interval for the Regular Current detection in Power-down mode. The actual settings remain to be determined.
.equ CADSI1 = 2 ; The CADSI bits determine the current sampling interval for the Regular Current detection in Power-down mode. The actual settings remain to be determined.
.equ CADAS0 = 3 ; CC_ADC Accumulate Current Select Bit 0
.equ CADAS1 = 4 ; CC_ADC Accumulate Current Select Bit 1
.equ CADUB = 5 ; CC_ADC Update Busy
.equ CADEN = 7 ; When the CADEN bit is cleared (zero), the CC-ADC is disabled. When the CADEN bit is set (one), the CC-ADC will continuously measure the voltage drop over the external sense resistor RSENSE. In Power-down, only the Regular Current detection is active. In Power-off, the CC-ADC is always disabled.
; CADCSRB - CC-ADC Control and Status Register B
.equ CADICIF = 0 ; CC-ADC Instantaneous Current Interrupt Flag
.equ CADRCIF = 1 ; CC-ADC Accumulate Current Interrupt Flag
.equ CADACIF = 2 ; CC-ADC Accumulate Current Interrupt Flag
.equ CADICIE = 4 ; CAD Instantenous Current Interrupt Enable
.equ CADRCIE = 5 ; Regular Current Interrupt Enable
.equ CADACIE = 6 ;
; CADAC3 - ADC Accumulate Current
.equ CADAC24 = 0 ;
.equ CADAC25 = 1 ;
.equ CADAC26 = 2 ;
.equ CADAC27 = 3 ;
.equ CADAC28 = 4 ;
.equ CADAC29 = 5 ;
.equ CADAC30 = 6 ;
.equ CADAC31 = 7 ;
; CADAC2 - ADC Accumulate Current
.equ CADAC16 = 0 ;
.equ CADAC17 = 1 ;
.equ CADAC18 = 2 ;
.equ CADAC19 = 3 ;
.equ CADAC20 = 4 ;
.equ CADAC21 = 5 ;
.equ CADAC22 = 6 ;
.equ CADAC23 = 7 ;
; CADAC1 - ADC Accumulate Current
.equ CADAC08 = 0 ;
.equ CADAC09 = 1 ;
.equ CADAC10 = 2 ;
.equ CADAC11 = 3 ;
.equ CADAC12 = 4 ;
.equ CADAC13 = 5 ;
.equ CADAC14 = 6 ;
.equ CADAC15 = 7 ;
; CADAC0 - ADC Accumulate Current
.equ CADAC00 = 0 ;
.equ CADAC01 = 1 ;
.equ CADAC02 = 2 ;
.equ CADAC03 = 3 ;
.equ CADAC04 = 4 ;
.equ CADAC05 = 5 ;
.equ CADAC06 = 6 ;
.equ CADAC07 = 7 ;
; CADRCC - CC-ADC Regular Charge Current
.equ CADRCC0 = 0 ; When the CADSE bit is written to one, the ongoing CC-ADC conversion is aborted, and the CC-ADC enters Regular Current detection mode.
.equ CADRCC1 = 1 ; The CADSI bits determine the current sampling interval for the Regular Current detection in Power-down mode. The actual settings remain to be determined.
.equ CADRCC2 = 2 ; The CADSI bits determine the current sampling interval for the Regular Current detection in Power-down mode. The actual settings remain to be determined.
.equ CADRCC3 = 3 ; The CADACT bits determine the conversion time for the Accumulate Current output as shown in Table 43.
.equ CADRCC4 = 4 ; The CADACT bits determine the conversion time for the Accumulate Current output as shown in Table 43.
.equ CADRCC5 = 5 ;
.equ CADRCC6 = 6 ;
.equ CADRCC7 = 7 ; When the CADEN bit is cleared (zero), the CC-ADC is disabled. When the CADEN bit is set (one), the CC-ADC will continuously measure the voltage drop over the external sense resistor RSENSE. In Power-down, only the Regular Current detection is active. In Power-off, the CC-ADC is always disabled.
; CADRDC - CC-ADC Regular Discharge Current
.equ CADRDC0 = 0 ; When the CADSE bit is written to one, the ongoing CC-ADC conversion is aborted, and the CC-ADC enters Regular Current detection mode.
.equ CADRDC1 = 1 ; The CADSI bits determine the current sampling interval for the Regular Current detection in Power-down mode. The actual settings remain to be determined.
.equ CADRDC2 = 2 ; The CADSI bits determine the current sampling interval for the Regular Current detection in Power-down mode. The actual settings remain to be determined.
.equ CADRDC3 = 3 ; The CADACT bits determine the conversion time for the Accumulate Current output as shown in Table 43.
.equ CADRDC4 = 4 ; The CADACT bits determine the conversion time for the Accumulate Current output as shown in Table 43.
.equ CADRDC5 = 5 ;
.equ CADRDC6 = 6 ;
.equ CADRDC7 = 7 ; When the CADEN bit is cleared (zero), the CC-ADC is disabled. When the CADEN bit is set (one), the CC-ADC will continuously measure the voltage drop over the external sense resistor RSENSE. In Power-down, only the Regular Current detection is active. In Power-off, the CC-ADC is always disabled.
; ***** CELL_BALANCING ***************
; CBCR - Cell Balancing Control Register
.equ CBE1 = 0 ; Battery Protection Parameter Lock
.equ CBE2 = 1 ; Cell Balancing Enable 2
.equ CBE3 = 2 ; Cell Balancing Enable 4
.equ CBE4 = 3 ; Cell Balancing Enable 4
; ***** CPU **************************
; SREG - Status Register
.equ SREG_C = 0 ; Carry Flag
.equ SREG_Z = 1 ; Zero Flag
.equ SREG_N = 2 ; Negative Flag
.equ SREG_V = 3 ; Two's Complement Overflow Flag
.equ SREG_S = 4 ; Sign Bit
.equ SREG_H = 5 ; Half Carry Flag
.equ SREG_T = 6 ; Bit Copy Storage
.equ SREG_I = 7 ; Global Interrupt Enable
; MCUCR - MCU Control Register
.equ IVCE = 0 ; Interrupt Vector Change Enable
.equ IVSEL = 1 ; Interrupt Vector Select
.equ PUD = 4 ; Pull-up disable
.equ JTD = 7 ; JTAG Disable
; MCUSR - MCU Status Register
.equ PORF = 0 ; Power-on reset flag
.equ EXTRF = 1 ; External Reset Flag
.equ BODRF = 2 ; Brown-out Reset Flag
.equ WDRF = 3 ; Watchdog Reset Flag
.equ JTRF = 4 ; JTAG Reset Flag
; FOSCCAL - Fast Oscillator Calibration Value
.equ FCAL0 = 0 ; Oscillator Calibration Value Bit0
.equ FCAL1 = 1 ; Oscillator Calibration Value Bit1
.equ FCAL2 = 2 ; Oscillator Calibration Value Bit2
.equ FCAL3 = 3 ; Oscillator Calibration Value Bit3
.equ FCAL4 = 4 ; Oscillator Calibration Value Bit4
.equ FCAL5 = 5 ; Oscillator Calibration Value Bit5
.equ FCAL6 = 6 ; Oscillator Calibration Value Bit6
.equ FCAL7 = 7 ; Oscillator Calibration Value Bit7
; SMCR - Sleep Mode Control Register
.equ SE = 0 ; Sleep Enable
.equ SM0 = 1 ; Sleep Mode Select bit 0
.equ SM1 = 2 ; Sleep Mode Select bit 1
.equ SM2 = 3 ; Sleep Mode Select bit 2
; GPIOR2 - General Purpose IO Register 2
.equ GPIOR20 = 0 ; General Purpose IO Register 2 bit 0
.equ GPIOR21 = 1 ; General Purpose IO Register 2 bit 1
.equ GPIOR22 = 2 ; General Purpose IO Register 2 bit 2
.equ GPIOR23 = 3 ; General Purpose IO Register 2 bit 3
.equ GPIOR24 = 4 ; General Purpose IO Register 2 bit 4
.equ GPIOR25 = 5 ; General Purpose IO Register 2 bit 5
.equ GPIOR26 = 6 ; General Purpose IO Register 2 bit 6
.equ GPIOR27 = 7 ; General Purpose IO Register 2 bit 7
; GPIOR1 - General Purpose IO Register 1
.equ GPIOR10 = 0 ; General Purpose IO Register 1 bit 0
.equ GPIOR11 = 1 ; General Purpose IO Register 1 bit 1
.equ GPIOR12 = 2 ; General Purpose IO Register 1 bit 2
.equ GPIOR13 = 3 ; General Purpose IO Register 1 bit 3
.equ GPIOR14 = 4 ; General Purpose IO Register 1 bit 4
.equ GPIOR15 = 5 ; General Purpose IO Register 1 bit 5
.equ GPIOR16 = 6 ; General Purpose IO Register 1 bit 6
.equ GPIOR17 = 7 ; General Purpose IO Register 1 bit 7
; GPIOR0 - General Purpose IO Register 0
.equ GPIOR00 = 0 ; General Purpose IO Register 0 bit 0
.equ GPIOR01 = 1 ; General Purpose IO Register 0 bit 1
.equ GPIOR02 = 2 ; General Purpose IO Register 0 bit 2
.equ GPIOR03 = 3 ; General Purpose IO Register 0 bit 3
.equ GPIOR04 = 4 ; General Purpose IO Register 0 bit 4
.equ GPIOR05 = 5 ; General Purpose IO Register 0 bit 5
.equ GPIOR06 = 6 ; General Purpose IO Register 0 bit 6
.equ GPIOR07 = 7 ; General Purpose IO Register 0 bit 7
; CCSR - Clock Control and Status Register
.equ ACS = 0 ; Asynchronous Clock Select
.equ XOE = 1 ; 32 kHz Crystal Oscillator Enable
; DIDR0 - Digital Input Disable Register
.equ VADC0D = 0 ; When this bit is written logic one, the digital input buffer of the corresponding V_ADC pin is disabled.
.equ VADC1D = 1 ; When this bit is written logic one, the digital input buffer of the corresponding V_ADC pin is disabled.
.equ VADC2D = 2 ; When this bit is written logic one, the digital input buffer of the corresponding V_ADC pin is disabled.
.equ VADC3D = 3 ; When this bit is written logic one, the digital input buffer of the corresponding V_ADC pin is disabled.
; PRR0 - Power Reduction Register 0
.equ PRVADC = 0 ; Power Reduction V-ADC
.equ PRTIM0 = 1 ; Power Reduction Timer/Counter0
.equ PRTIM1 = 2 ; Power Reduction Timer/Counter1
.equ PRTWI = 3 ; Power Reduction TWI
; ***** WATCHDOG *********************
; WDTCSR - Watchdog Timer Control Register
.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 WDP3 = 5 ; Watchdog Timer Prescaler Bit 3
.equ WDIE = 6 ; Watchdog Timeout Interrupt Enable
.equ WDIF = 7 ; Watchdog Timeout Interrupt Flag
; ***** TIMER_COUNTER_0 **************
; TCCR0A - Timer/Counter0 Control Register
.equ WGM00 = 0 ; Clock Select0 bit 0
.equ WGM01 = 1 ; Clock Select0 bit 1
.equ COM0B0 = 4 ;
.equ COM0B1 = 5 ;
.equ COM0A0 = 6 ; Waveform Generation Mode
.equ COM0A1 = 7 ; Force Output Compare
; TCCR0B - Timer/Counter0 Control Register
.equ CS00 = 0 ; Clock Select0 bit 0
.equ CS01 = 1 ; Clock Select0 bit 1
.equ CS02 = 2 ; Clock Select0 bit 2
.equ WGM02 = 3 ;
.equ FOC0B = 6 ; Waveform Generation Mode
.equ FOC0A = 7 ; Force Output Compare
; TCNT0 - Timer Counter 0
.equ TCNT00 = 0 ; Timer Counter 0 bit 0
.equ TCNT01 = 1 ; Timer Counter 0 bit 1
.equ TCNT02 = 2 ; Timer Counter 0 bit 2
.equ TCNT03 = 3 ; Timer Counter 0 bit 3
.equ TCNT04 = 4 ; Timer Counter 0 bit 4
.equ TCNT05 = 5 ; Timer Counter 0 bit 5
.equ TCNT06 = 6 ; Timer Counter 0 bit 6
.equ TCNT07 = 7 ; Timer Counter 0 bit 7
; OCR0A - Output compare Register A
.equ OCR0A0 = 0 ;
.equ OCR0A1 = 1 ;
.equ OCR0A2 = 2 ;
.equ OCR0A3 = 3 ;
.equ OCR0A4 = 4 ;
.equ OCR0A5 = 5 ;
.equ OCR0A6 = 6 ;
.equ OCR0A7 = 7 ;
; OCR0B - Output compare Register B
.equ OCR0B0 = 0 ;
.equ OCR0B1 = 1 ;
.equ OCR0B2 = 2 ;
.equ OCR0B3 = 3 ;
.equ OCR0B4 = 4 ;
.equ OCR0B5 = 5 ;
.equ OCR0B6 = 6 ;
.equ OCR0B7 = 7 ;
; TIMSK0 - Timer/Counter Interrupt Mask Register
.equ TOIE0 = 0 ; Overflow Interrupt Enable
.equ OCIE0A = 1 ; Output Compare Interrupt Enable
.equ OCIE0B = 2 ; Output Compare Interrupt Enable
; TIFR0 - Timer/Counter Interrupt Flag register
.equ TOV0 = 0 ; Overflow Flag
.equ OCF0A = 1 ; Output Compare Flag
.equ OCF0B = 2 ; Output Compare Flag
; ***** PORTA ************************
; PORTA - Port A Data Register
.equ PORTA0 = 0 ; Port A Data Register bit 0
.equ PA0 = 0 ; For compatibility
.equ PORTA1 = 1 ; Port A Data Register bit 1
.equ PA1 = 1 ; For compatibility
.equ PORTA2 = 2 ; Port A Data Register bit 2
.equ PA2 = 2 ; For compatibility
.equ PORTA3 = 3 ; Port A Data Register bit 3
.equ PA3 = 3 ; For compatibility
.equ PORTA4 = 4 ; Port A Data Register bit 4
.equ PA4 = 4 ; For compatibility
.equ PORTA5 = 5 ; Port A Data Register bit 5
.equ PA5 = 5 ; For compatibility
.equ PORTA6 = 6 ; Port A Data Register bit 6
.equ PA6 = 6 ; For compatibility
.equ PORTA7 = 7 ; Port A Data Register bit 7
.equ PA7 = 7 ; For compatibility
; DDRA - Port A Data Direction Register
.equ DDA0 = 0 ; Data Direction Register, Port A, bit 0
.equ DDA1 = 1 ; Data Direction Register, Port A, bit 1
.equ DDA2 = 2 ; Data Direction Register, Port A, bit 2
.equ DDA3 = 3 ; Data Direction Register, Port A, bit 3
.equ DDA4 = 4 ; Data Direction Register, Port A, bit 4
.equ DDA5 = 5 ; Data Direction Register, Port A, bit 5
.equ DDA6 = 6 ; Data Direction Register, Port A, bit 6
.equ DDA7 = 7 ; Data Direction Register, Port A, bit 7
; PINA - Port A Input Pins
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -