Using PCINT1 instead of INT0 on ATTINY45

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
roger
Posts: 12
Joined: Sat Dec 20, 2008 5:27 pm

Using PCINT1 instead of INT0 on ATTINY45

Post by roger » Fri Jan 02, 2009 10:00 pm

Is it possible to do this? I'm not familiar with the driver code so I'm not sure what else will need changing in the header file:

Code: Select all

/* ----------------------- Optional MCU Description ------------------------ */

/* The following configurations have working defaults in usbdrv.h. You
 * usually don't need to set them explicitly. Only if you want to run
 * the driver on a device which is not yet supported or with a compiler
 * which is not fully supported (such as IAR C) or if you use a differnt
 * interrupt than INT0, you may have to define some of these.
 */
/* #define USB_INTR_CFG            MCUCR */
/* #define USB_INTR_CFG_SET        ((1 << ISC00) | (1 << ISC01)) */
/* #define USB_INTR_CFG_CLR        0 */
/* #define USB_INTR_ENABLE         GIMSK */
/* #define USB_INTR_ENABLE_BIT     INT0 */
/* #define USB_INTR_PENDING        GIFR */
/* #define USB_INTR_PENDING_BIT    INTF0 */
/* #define USB_INTR_VECTOR         SIG_INTERRUPT0 */


Thanks.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Sun Jan 04, 2009 7:56 pm

It IS possible, but I have not done this myself. There are some code examples here in the forum from people who used PCINT for USB.

Please note that you should not use any higher priority hardware interrupts than PCINTx.

Post Reply