⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m32hvbdef.inc

📁 AVR Assembler 2 compiler
💻 INC
📖 第 1 页 / 共 3 页
字号:
.equ	TWBCIF	= 7	; TWI Bus Connect/Disconnect Interrupt Flag

; TWAMR - TWI (Slave) Address Mask Register
.equ	TWAM0	= 1	; 
.equ	TWAM1	= 2	; 
.equ	TWAM2	= 3	; 
.equ	TWAM3	= 4	; 
.equ	TWAM4	= 5	; 
.equ	TWAM5	= 6	; 
.equ	TWAM6	= 7	; 

; TWBR - TWI Bit Rate register
.equ	TWBR0	= 0	; 
.equ	TWBR1	= 1	; 
.equ	TWBR2	= 2	; 
.equ	TWBR3	= 3	; 
.equ	TWBR4	= 4	; 
.equ	TWBR5	= 5	; 
.equ	TWBR6	= 6	; 
.equ	TWBR7	= 7	; 

; TWCR - TWI Control Register
.equ	TWIE	= 0	; TWI Interrupt Enable
.equ	TWEN	= 2	; TWI Enable Bit
.equ	TWWC	= 3	; TWI Write Collition Flag
.equ	TWSTO	= 4	; TWI Stop Condition Bit
.equ	TWSTA	= 5	; TWI Start Condition Bit
.equ	TWEA	= 6	; TWI Enable Acknowledge Bit
.equ	TWINT	= 7	; TWI Interrupt Flag

; TWSR - TWI Status Register
.equ	TWPS0	= 0	; TWI Prescaler
.equ	TWPS1	= 1	; TWI Prescaler
.equ	TWS3	= 3	; TWI Status
.equ	TWS4	= 4	; TWI Status
.equ	TWS5	= 5	; TWI Status
.equ	TWS6	= 6	; TWI Status
.equ	TWS7	= 7	; TWI Status

; TWDR - TWI Data register
.equ	TWD0	= 0	; TWI Data Register Bit 0
.equ	TWD1	= 1	; TWI Data Register Bit 1
.equ	TWD2	= 2	; TWI Data Register Bit 2
.equ	TWD3	= 3	; TWI Data Register Bit 3
.equ	TWD4	= 4	; TWI Data Register Bit 4
.equ	TWD5	= 5	; TWI Data Register Bit 5
.equ	TWD6	= 6	; TWI Data Register Bit 6
.equ	TWD7	= 7	; TWI Data Register Bit 7

; TWAR - TWI (Slave) Address register
.equ	TWGCE	= 0	; TWI General Call Recognition Enable Bit
.equ	TWA0	= 1	; TWI (Slave) Address register Bit 0
.equ	TWA1	= 2	; TWI (Slave) Address register Bit 1
.equ	TWA2	= 3	; TWI (Slave) Address register Bit 2
.equ	TWA3	= 4	; TWI (Slave) Address register Bit 3
.equ	TWA4	= 5	; TWI (Slave) Address register Bit 4
.equ	TWA5	= 6	; TWI (Slave) Address register Bit 5
.equ	TWA6	= 7	; TWI (Slave) Address register Bit 6


; ***** EXTERNAL_INTERRUPT ***********
; EICRA - External Interrupt Control Register
.equ	ISC00	= 0	; External Interrupt Sense Control 0 Bit 0
.equ	ISC01	= 1	; External Interrupt Sense Control 0 Bit 1
.equ	ISC10	= 2	; External Interrupt Sense Control 1 Bit 0
.equ	ISC11	= 3	; External Interrupt Sense Control 1 Bit 1
.equ	ISC20	= 4	; External Interrupt Sense Control 2 Bit 0
.equ	ISC21	= 5	; External Interrupt Sense Control 2 Bit 1
.equ	ISC30	= 6	; External Interrupt Sense Control 3 Bit 0
.equ	ISC31	= 7	; External Interrupt Sense Control 3 Bit 1

; EIMSK - External Interrupt Mask Register
.equ	INT0	= 0	; External Interrupt Request 0 Enable
.equ	INT1	= 1	; External Interrupt Request 1 Enable
.equ	INT2	= 2	; External Interrupt Request 2 Enable
.equ	INT3	= 3	; External Interrupt Request 3 Enable

; EIFR - External Interrupt Flag Register
.equ	INTF0	= 0	; External Interrupt Flag 0
.equ	INTF1	= 1	; External Interrupt Flag 1
.equ	INTF2	= 2	; External Interrupt Flag 2
.equ	INTF3	= 3	; External Interrupt Flag 3

; PCICR - Pin Change Interrupt Control Register
.equ	PCIE0	= 0	; Pin Change Interrupt Enable 0
.equ	PCIE1	= 1	; Pin Change Interrupt Enable 1

; PCIFR - Pin Change Interrupt Flag Register
.equ	PCIF0	= 0	; Pin Change Interrupt Flag 1
.equ	PCIF1	= 1	; Pin Change Interrupt Flag 1

; PCMSK1 - Pin Change Enable Mask Register 1
.equ	PCINT4	= 0	; Pin Change Enable Mask 4
.equ	PCINT5	= 1	; Pin Change Enable Mask 5
.equ	PCINT6	= 2	; Pin Change Enable Mask 6
.equ	PCINT7	= 3	; Pin Change Enable Mask 7
.equ	PCINT8	= 4	; Pin Change Enable Mask 8
.equ	PCINT9	= 5	; Pin Change Enable Mask 9
.equ	PCINT10	= 6	; Pin Change Enable Mask 10
.equ	PCINT11	= 7	; Pin Change Enable Mask 11

; PCMSK0 - Pin Change Enable 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


; ***** TIMER_COUNTER_1 **************
; TCCR1A - Timer/Counter 1 Control Register A
.equ	WGM10	= 0	; Waveform Generation Mode
.equ	ICS1	= 3	; Input Capture Select
.equ	ICES1	= 4	; Input Capture Edge Select
.equ	ICNC1	= 5	; Input Capture Noise Canceler
.equ	ICEN1	= 6	; Input Capture Mode Enable
.equ	TCW1	= 7	; Timer/Counter Width

; TCCR1B - Timer/Counter1 Control Register B
.equ	CS10	= 0	; Clock Select1 bit 0
.equ	CS11	= 1	; Clock Select1 bit 1
.equ	CS12	= 2	; Clock Select1 bit 2

; OCR1A - Output Compare Register 1A
.equ	OCR1A0	= 0	; 
.equ	OCR1A1	= 1	; 
.equ	OCR1A2	= 2	; 
.equ	OCR1A3	= 3	; 
.equ	OCR1A4	= 4	; 
.equ	OCR1A5	= 5	; 
.equ	OCR1A6	= 6	; 
.equ	OCR1A7	= 7	; 

; OCR1B - Output Compare Register B
.equ	OCR1B0	= 0	; 
.equ	OCR1B1	= 1	; 
.equ	OCR1B2	= 2	; 
.equ	OCR1B3	= 3	; 
.equ	OCR1B4	= 4	; 
.equ	OCR1B5	= 5	; 
.equ	OCR1B6	= 6	; 
.equ	OCR1B7	= 7	; 

; TIMSK1 - Timer/Counter Interrupt Mask Register
.equ	TOIE1	= 0	; Timer/Counter1 Overflow Interrupt Enable
.equ	OCIE1A	= 1	; Timer/Counter1 Output Compare A Interrupt Enable
.equ	OCIE1B	= 2	; Timer/Counter1 Output Compare B Interrupt Enable
.equ	ICIE1	= 3	; Timer/Counter n Input Capture Interrupt Enable

; TIFR1 - Timer/Counter Interrupt Flag register
.equ	TOV1	= 0	; Timer/Counter1 Overflow Flag
.equ	OCF1A	= 1	; Timer/Counter1 Output Compare Flag A
.equ	OCF1B	= 2	; Timer/Counter1 Output Compare Flag B
.equ	ICF1	= 3	; Timer/Counter 1 Input Capture Flag

; GTCCR - General Timer/Counter Control Register
.equ	PSRSYNC	= 0	; Prescaler Reset
.equ	TSM	= 7	; Timer/Counter Synchronization Mode


; ***** 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


; ***** BATTERY_PROTECTION ***********
; BPPLR - Battery Protection Parameter Lock Register
.equ	BPPL	= 0	; Battery Protection Parameter Lock
.equ	BPPLE	= 1	; Battery Protection Parameter Lock Enable

; BPCR - Battery Protection Control Register
.equ	CHCD	= 0	; Charge High-current Protection Disable
.equ	DHCD	= 1	; Discharge High-current Protection Disable
.equ	COCD	= 2	; Charge Over-current Protection Disabled
.equ	DOCD	= 3	; Discharge Over-current Protection Disabled
.equ	SCD	= 4	; Short Circuit Protection Disabled
.equ	EPID	= 5	; External Protection Input Disable

; BPHCTR - Battery Protection Short-current Timing Register
.equ	HCPT0	= 0	; High-current Protection Timing bit 0
.equ	HCPT1	= 1	; High-current Protection Timing bit 1
.equ	HCPT2	= 2	; High-current Protection Timing bit 2
.equ	HCPT3	= 3	; High-current Protection Timing bit 3
.equ	HCPT4	= 4	; High-current Protection Timing bit 4
.equ	HCPT5	= 5	; High-current Protection Timing bit 5

; BPOCTR - Battery Protection Over-current Timing Register
.equ	OCPT0	= 0	; Over-current Protection Timing bit 0
.equ	OCPT1	= 1	; Over-current Protection Timing bit 1
.equ	OCPT2	= 2	; Over-current Protection Timing bit 2
.equ	OCPT3	= 3	; Over-current Protection Timing bit 3
.equ	OCPT4	= 4	; Over-current Protection Timing bit 4
.equ	OCPT5	= 5	; Over-current Protection Timing bit 5

; BPSCTR - Battery Protection Short-current Timing Register
.equ	SCPT0	= 0	; Short-current Protection Timing
.equ	SCPT1	= 1	; Short-current Protection Timing
.equ	SCPT2	= 2	; Short-current Protection Timing
.equ	SCPT3	= 3	; Short-current Protection Timing
.equ	SCPT4	= 4	; Short-current Protection Timing
.equ	SCPT5	= 5	; Short-current Protection Timing
.equ	SCPT6	= 6	; Short-current Protection Timing

; BPCHCD - Battery Protection Charge-High-current Detection Level Register
.equ	CHCDL0	= 0	; Charge High-current Detection Level
.equ	CHCDL1	= 1	; Charge High-current Detection Level
.equ	CHCDL2	= 2	; Charge High-current Detection Level
.equ	CHCDL3	= 3	; Charge High-current Detection Level
.equ	CHCDL4	= 4	; Charge High-current Detection Level
.equ	CHCDL5	= 5	; Charge High-current Detection Level
.equ	CHCDL6	= 6	; Charge High-current Detection Level
.equ	CHCDL7	= 7	; Charge High-current Detection Level

; BPDHCD - Battery Protection Discharge-High-current Detection Level Register
.equ	DHCDL0	= 0	; Discharge High-current Detection Level bit 0
.equ	DHCDL1	= 1	; Discharge High-current Detection Level bit 1
.equ	DHCDL2	= 2	; Discharge High-current Detection Level bit 2
.equ	DHCDL3	= 3	; Discharge High-current Detection Level bit 3
.equ	DHCDL4	= 4	; Discharge High-current Detection Level bit 4
.equ	DHCDL5	= 5	; Discharge High-current Detection Level bit 5
.equ	DHCDL6	= 6	; Discharge High-current Detection Level bit 6
.equ	DHCDL7	= 7	; Discharge High-current Detection Level bit 7

; BPCOCD - Battery Protection Charge-Over-current Detection Level Register
.equ	COCDL0	= 0	; Charge Over-current Detection Level
.equ	COCDL1	= 1	; Charge Over-current Detection Level
.equ	COCDL2	= 2	; Charge Over-current Detection Level
.equ	COCDL3	= 3	; Charge Over-current Detection Level
.equ	COCDL4	= 4	; Charge Over-current Detection Level
.equ	COCDL5	= 5	; Charge Over-current Detection Level
.equ	COCDL6	= 6	; Charge Over-current Detection Level
.equ	COCDL7	= 7	; Charge Over-current Detection Level

; BPDOCD - Battery Protection Discharge-Over-current Detection Level Register
.equ	DOCDL0	= 0	; Discharge Over-current Detection Level bit0
.equ	DOCDL1	= 1	; Discharge Over-current Detection Level bit1
.equ	DOCDL2	= 2	; Discharge Over-current Detection Level bit2
.equ	DOCDL3	= 3	; Discharge Over-current Detection Level bit3
.equ	DOCDL4	= 4	; Discharge Over-current Detection Level bit4
.equ	DOCDL5	= 5	; Discharge Over-current Detection Level bit5
.equ	DOCDL6	= 6	; Discharge Over-current Detection Level bit6
.equ	DOCDL7	= 7	; Discharge Over-current Detection Level bit7

; BPSCD - Battery Protection Short-Circuit Detection Level Register
.equ	SCDL0	= 0	; Short-circuit Detection Level bit 0
.equ	SCDL1	= 1	; Short-circuit Detection Level bit 1
.equ	SCDL2	= 2	; Short-circuit Detection Level bit 2
.equ	SCDL3	= 3	; Short-circuit Detection Level bit 3
.equ	SCDL4	= 4	; Short-circuit Detection Level bit 4
.equ	SCDL5	= 5	; Short-circuit Detection Level bit 5
.equ	SCDL6	= 6	; Short-circuit Detection Level bit 6
.equ	SCDL7	= 7	; Short-circuit Detection Level bit 7

; BPIFR - Battery Protection Interrupt Flag Register
.equ	CHCIF	= 0	; Charge High-current Protection Activated Interrupt
.equ	DHCIF	= 1	; Disharge High-current Protection Activated Interrupt
.equ	COCIF	= 2	; Charge Over-current Protection Activated Interrupt Flag
.equ	DOCIF	= 3	; Discharge Over-current Protection Activated Interrupt Flag
.equ	SCIF	= 4	; Short-circuit Protection Activated Interrupt Flag

; BPIMSK - Battery Protection Interrupt Mask Register
.equ	CHCIE	= 0	; Charger High-current Protection Activated Interrupt
.equ	DHCIE	= 1	; Discharger High-current Protection Activated Interrupt
.equ	COCIE	= 2	; Charge Over-current Protection Activated Interrupt Enable
.equ	DOCIE	= 3	; Discharge Over-current Protection Activated Interrupt Enable
.equ	SCIE	= 4	; Short-circuit Protection Activated Interrupt Enable


; ***** CHARGER_DETECT ***************
; CHGDCSR - Charger Detect Control and Status Register
.equ	CHGDIE	= 0	; Charger Detect Interrupt Enable
.equ	CHGDIF	= 1	; Charger Detect Interrupt Flag
.equ	CHGDISC0	= 2	; Charger Detect Interrupt Sense Control
.equ	CHGDISC1	= 3	; Charger Detect Interrupt Sense Control
.equ	BATTPVL	= 4	; BATT Pin Voltage Level


; ***** VOLTAGE_REGULATOR ************
; ROCR - Regulator Operating Condition Register
.equ	ROCWIE	= 0	; ROC Warning Interrupt Enable
.equ	ROCWIF	= 1	; ROC Warning Interrupt Flag
.equ	ROCD	= 4	; ROC Disable
.equ	ROCS	= 7	; ROC Status


; ***** BANDGAP **********************
; BGCSR - Bandgap Control and Status Register
.equ	BGSCDIE	= 0	; Bandgap Short Circuit Detection Interrupt Enable
.equ	BGSCDIF	= 1	; Bandgap Short Circuit Detection Interrupt Flag
.equ	BGSCDE	= 4	; Bandgap Short Circuit Detection Enabled
.equ	BGD	= 5	; Bandgap Disable

; BGCRR - Bandgap Calibration of Resistor Ladder
.equ	BGCR0	= 0	; Bandgap Calibration of Resistor Ladder Bit 0
.equ	BGCR1	= 1	; Bandgap Calibration of Resistor Ladder Bit 1
.equ	BGCR2	= 2	; Bandgap Calibration of Resistor Ladder Bit 2
.equ	BGCR3	= 3	; Bandgap Calibration of Resistor Ladder Bit 3
.equ	BGCR4	= 4	; Bandgap Calibration of Resistor Ladder Bit 4
.equ	BGCR5	= 5	; Bandgap Calibration of Resistor Ladder Bit 5
.equ	BGCR6	= 6	; Bandgap Calibration of Resistor Ladder Bit 6
.equ	BGCR7	= 7	; Bandgap Calibration of Resistor Ladder Bit 7

; BGCCR - Bandgap Calibration Register
.equ	BGCC0	= 0	; BG Calibration of PTAT Current Bit 0
.equ	BGCC1	= 1	; BG Calibration of PTAT Current Bit 1
.equ	BGCC2	= 2	; BG Calibration of PTAT Current Bit 2
.equ	BGCC3	= 3	; BG Calibration of PTAT Current Bit 3
.equ	BGCC4	= 4	; BG Calibration of PTAT Current Bit 4
.equ	BGCC5	= 5	; BG Calibration of PTAT Current Bit 5


; ***** 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	CKOE	= 5	; Clock Output Enable

; MCUSR - MCU Status Register
.equ	PORF	= 0	; Power-on reset flag

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -