Hi Guys,
New to the forum and new to AVRs, but have programmed other microcontrollers.
I'm just laying out a board with an ATmega128 on it. I have a question about the interrupts that are used with AVR-USB.
On the ATmega128 there are 8 interrupts, INT0-3 are asynchronous, INT4-7 are synchronous. With the latest AVR-USB software you can change which interrupt is used. I understand that the interrupt used for the USB must be the highest priority, but does the interrupt need to be one of INT0-3 or can I used INT4-7???
I'm guessing this might change with clock frequency?
Thanks in advance.
Alan
AVR-USB on ATmega128
Just an update.
AVR-USB will work with INT4-7. My setup for INT5 is:
It worked with no problems at all.
AVR-USB will work with INT4-7. My setup for INT5 is:
Code: Select all
#define USB_INTR_CFG EICRB
#define USB_INTR_CFG_SET ((1 << ISC50) | (1 << ISC51))
#define USB_INTR_CFG_CLR 0
#define USB_INTR_ENABLE EIMSK
#define USB_INTR_ENABLE_BIT INT5
#define USB_INTR_PENDING EIFR
#define USB_INTR_PENDING_BIT INTF5
#define USB_INTR_VECTOR SIG_INTERRUPT5
It worked with no problems at all.