Page 1 of 1

Using PCINT1 instead of INT0 on ATTINY45

Posted: Fri Jan 02, 2009 10:00 pm
by roger
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.

Posted: Sun Jan 04, 2009 7:56 pm
by christian
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.