Pin / port choice for usb data

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
shiona
Posts: 1
Joined: Sun Jan 31, 2016 10:32 pm

Pin / port choice for usb data

Post by shiona » Sun Jan 31, 2016 10:48 pm

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.

horo
Rank 2
Rank 2
Posts: 63
Joined: Tue Mar 04, 2008 2:26 pm
Location: Berlin & Lindau, Germany

Re: Pin / port choice for usb data

Post by horo » Mon Feb 01, 2016 7:16 pm

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

Post Reply