Page 1 of 1

Pin / port choice for usb data

Posted: Sun Jan 31, 2016 10:48 pm
by shiona
I'm creating my first v-usb project.
Attiny24 ended up as my ┬ÁC of choice.

On the main page I found:
No UART, timer, input capture unit or other special hardware is required (except one edge triggered interrupt).

Also http://vusb.wikidot.com/hardware makes no mention of any hardware requirements about pin selection.

Unable to find any realiable source, I looked up multiple schematics of different V-USB projects and it seemed everyone
was using INT0 connected to D+, so I did so too. This is PB2 on the device. PB0-1 are XTAL and PB3 is RESET', which I
would prefer not to disable. That meant D- would have to go to port A. PA0 was the closest pin to trace to, so I went with that.

Now, after designing the board, etching, sourcing the parts and soldering, I came across
http://codeandlife.com/2012/01/29/avr-a ... al-part-3/
which cites some code which gives me the impression D+ and D- are required to share the port.
Is this the case?

I do have PA1-2 free, can I use them somehow to save my situation?

EDIT:
After posting I found out that yes, the fear in my original post is true. This information is hidden inside usbdrv.h.
I believe sharing the information about this limitation with potential users would be fair.

Re: Pin / port choice for usb data

Posted: Mon Feb 01, 2016 7:16 pm
by horo
Hi,

Have a look:
https://forums.obdev.at/viewtopic.php?f=8&t=6322
http://vusb.wikidot.com/examples (Scroll down to "Other interrupts than INT0 for USB")

Ciao, Martin