Substitute of INT0 pin for AVR-USB D+

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Stephen
Posts: 6
Joined: Mon Apr 07, 2008 7:20 am

Substitute of INT0 pin for AVR-USB D+

Post by Stephen » Mon Apr 07, 2008 7:40 am

In ATMega8, there are only three I/O port PB0 - PB7, PC0-PC6, PD0 - PD7. My device will be communicate to other device by 8-bit parallel interface. Since PB6 and PB7 is used for crystal oscillation, so the remained choice is PD0 - PD7. However, the PD2(INT0) is used for D+ interrupt communication.

My question, can i use ATMega88 which has got PCINT0 - PCINT23? That's mean I use PD0 - PD7 for 8-bit parallel interface and take another pin from PB or PC for D+ connection.

In datasheet of ATMega88 said, "The external interrupts are triggered by INT0 and INT1 or any of PCINT23..0 pins".

Thanks.

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

Post by christian » Mon Apr 07, 2008 10:10 am

Yes, this is possible. You need to modify the interrupt configuration at the end of usbconfig.h. And you MUST make sure that no higher level interrupt is used (except if you know exactly what you are doing).

Post Reply