AVR 单片机程序中#pragma interrupt_handler adc_isr:iv_ADC,后的iv_ADC这种中断是在哪查看到得?
是<iom16v.h>中的宏定义;#defineiv_RESET1#defineiv_INT02#defineiv_EXT_INT02#defineiv_INT13#de...
是<iom16v.h>中的宏定义;
#define iv_RESET 1
#define iv_INT0 2
#define iv_EXT_INT0 2
#define iv_INT1 3
#define iv_EXT_INT1 3
#define iv_TIMER2_COMPA 4
#define iv_TIMER2_COMP 4
#define iv_TIM2_COMP 4
#define iv_TIMER2_OVF 5
#define iv_TIM2_OVF 5
#define iv_TIMER1_CAPT 6
#define iv_TIM1_CAPT 6
#define iv_TIMER1_COMPA 7
#define iv_TIM1_COMPA 7
#define iv_TIMER1_COMPB 8
#define iv_TIM1_COMPB 8
#define iv_TIMER1_OVF 9
#define iv_TIM1_OVF 9
#define iv_TIMER0_OVF 10
#define iv_TIM0_OVF 10
#define iv_SPI_STC 11
#define iv_USART_RX 12
#define iv_USART_RXC 12
#define iv_USART0_RX 12
#define iv_USART0_RXC 12
#define iv_USART_DRE 13
#define iv_USART_UDRE 13
#define iv_USART0_DRE 13
#define iv_USART0_UDRE 13 展开
#define iv_RESET 1
#define iv_INT0 2
#define iv_EXT_INT0 2
#define iv_INT1 3
#define iv_EXT_INT1 3
#define iv_TIMER2_COMPA 4
#define iv_TIMER2_COMP 4
#define iv_TIM2_COMP 4
#define iv_TIMER2_OVF 5
#define iv_TIM2_OVF 5
#define iv_TIMER1_CAPT 6
#define iv_TIM1_CAPT 6
#define iv_TIMER1_COMPA 7
#define iv_TIM1_COMPA 7
#define iv_TIMER1_COMPB 8
#define iv_TIM1_COMPB 8
#define iv_TIMER1_OVF 9
#define iv_TIM1_OVF 9
#define iv_TIMER0_OVF 10
#define iv_TIM0_OVF 10
#define iv_SPI_STC 11
#define iv_USART_RX 12
#define iv_USART_RXC 12
#define iv_USART0_RX 12
#define iv_USART0_RXC 12
#define iv_USART_DRE 13
#define iv_USART_UDRE 13
#define iv_USART0_DRE 13
#define iv_USART0_UDRE 13 展开
2个回答
展开全部
你的<iom16v.h>不全吧?
不知道你用的是不是ICCavr编译软件,ICCavr在ioXXXXv.h头文件中已经定义了
#define iv_ADC 15
一般形式是: iv_<中断向量名>,AD的中断向量源就是ADC,你可以看datasheet里中断向量表的中断源名
我的<iom16v.h>文件里有:
/* Interrupt Vector Numbers */
#define iv_RESET 1
#define iv_INT0 2
#define iv_EXT_INT0 2
#define iv_INT1 3
#define iv_EXT_INT1 3
#define iv_TIMER2_COMPA 4
#define iv_TIMER2_COMP 4
#define iv_TIM2_COMP 4
#define iv_TIMER2_OVF 5
#define iv_TIM2_OVF 5
#define iv_TIMER1_CAPT 6
#define iv_TIM1_CAPT 6
#define iv_TIMER1_COMPA 7
#define iv_TIM1_COMPA 7
#define iv_TIMER1_COMPB 8
#define iv_TIM1_COMPB 8
#define iv_TIMER1_OVF 9
#define iv_TIM1_OVF 9
#define iv_TIMER0_OVF 10
#define iv_TIM0_OVF 10
#define iv_SPI_STC 11
#define iv_USART_RX 12
#define iv_USART_RXC 12
#define iv_USART0_RX 12
#define iv_USART0_RXC 12
#define iv_USART_DRE 13
#define iv_USART_UDRE 13
#define iv_USART0_DRE 13
#define iv_USART0_UDRE 13
#define iv_USART_TX 14
#define iv_USART_TXC 14
#define iv_USART0_TX 14
#define iv_USART0_TXC 14
#define iv_ADC 15
#define iv_EE_RDY 16
#define iv_EE_READY 16
#define iv_ANA_COMP 17
#define iv_ANALOG_COMP 17
#define iv_TWI 18
#define iv_TWSI 18
#define iv_INT2 19
#define iv_EXT_INT2 19
#define iv_TIMER0_COMPA 20
#define iv_TIMER0_COMP 20
#define iv_TIM0_COMP 20
#define iv_SPM_RDY 21
#define iv_SPM_READY 21
不知道你用的是不是ICCavr编译软件,ICCavr在ioXXXXv.h头文件中已经定义了
#define iv_ADC 15
一般形式是: iv_<中断向量名>,AD的中断向量源就是ADC,你可以看datasheet里中断向量表的中断源名
我的<iom16v.h>文件里有:
/* Interrupt Vector Numbers */
#define iv_RESET 1
#define iv_INT0 2
#define iv_EXT_INT0 2
#define iv_INT1 3
#define iv_EXT_INT1 3
#define iv_TIMER2_COMPA 4
#define iv_TIMER2_COMP 4
#define iv_TIM2_COMP 4
#define iv_TIMER2_OVF 5
#define iv_TIM2_OVF 5
#define iv_TIMER1_CAPT 6
#define iv_TIM1_CAPT 6
#define iv_TIMER1_COMPA 7
#define iv_TIM1_COMPA 7
#define iv_TIMER1_COMPB 8
#define iv_TIM1_COMPB 8
#define iv_TIMER1_OVF 9
#define iv_TIM1_OVF 9
#define iv_TIMER0_OVF 10
#define iv_TIM0_OVF 10
#define iv_SPI_STC 11
#define iv_USART_RX 12
#define iv_USART_RXC 12
#define iv_USART0_RX 12
#define iv_USART0_RXC 12
#define iv_USART_DRE 13
#define iv_USART_UDRE 13
#define iv_USART0_DRE 13
#define iv_USART0_UDRE 13
#define iv_USART_TX 14
#define iv_USART_TXC 14
#define iv_USART0_TX 14
#define iv_USART0_TXC 14
#define iv_ADC 15
#define iv_EE_RDY 16
#define iv_EE_READY 16
#define iv_ANA_COMP 17
#define iv_ANALOG_COMP 17
#define iv_TWI 18
#define iv_TWSI 18
#define iv_INT2 19
#define iv_EXT_INT2 19
#define iv_TIMER0_COMPA 20
#define iv_TIMER0_COMP 20
#define iv_TIM0_COMP 20
#define iv_SPM_RDY 21
#define iv_SPM_READY 21
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询