V-usb attiny85

I’ve been recently fascinated by the V-USB project and its interesting applications to the ATtiny85 MCU. There are a couple of articles about its implementation on this tiny MCU but I’ve encountered many problems with the code and this is why I’m writing this notes.

Most notable materials/projects I’ve found on the net are:

Unfortunately, none of them worked out-of-the-box.  After following some of the tips indicated in the links above and I was able to run Hid-Mouse example from the main V-USB library and EasyLogger.
The compressed file linked below contains the schematic and the source code for the EasyLogger reference implementation, modified by me to run on my Attiny85, I just hope it will be useful if you want to start playing USB on that MCU.
I’m still having random errors like:
May  5 10:23:48 darkstar kernel: [ 5060.340336] input: obdev.at EasyLogger as /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.0/input/input36
May  5 10:23:48 darkstar kernel: [ 5060.341108] generic-usb 0003:4242:E131.0018: input,hidraw1: USB HID v1.01 Keyboard [obdev.at EasyLogger] on usb-0000:00:1d.0-1/input0
May  5 10:23:49 darkstar kernel: [ 5060.592176] hub 6-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
May  5 10:23:49 darkstar kernel: [ 5060.592190] usb 6-1: USB disconnect, device number 23
May  5 10:23:49 darkstar kernel: [ 5060.852121] usb 6-1: new low-speed USB device number 24 using uhci_hcd
May  5 10:23:49 darkstar kernel: [ 5060.976057] usb 6-1: device descriptor read/64, error -71
May  5 10:23:49 darkstar kernel: [ 5061.204082] usb 6-1: device descriptor read/64, error -71
May  5 10:23:49 darkstar kernel: [ 5061.420119] usb 6-1: new low-speed USB device number 25 using uhci_hcd
May  5 10:23:50 darkstar kernel: [ 5061.544134] usb 6-1: device descriptor read/64, error -71
May  5 10:23:50 darkstar kernel: [ 5061.810138] usb 6-1: unable to read config index 0 descriptor/all
May  5 10:23:50 darkstar kernel: [ 5061.810151] usb 6-1: can't read configurations, error -71
May  5 10:23:50 darkstar kernel: [ 5061.924102] usb 6-1: new low-speed USB device number 26 using uhci_hcd
May  5 10:23:50 darkstar kernel: [ 5062.340078] usb 6-1: device not accepting address 26, error -71
May  5 10:23:50 darkstar kernel: [ 5062.452149] usb 6-1: new low-speed USB device number 27 using uhci_hcd
May  5 10:23:51 darkstar kernel: [ 5062.868115] usb 6-1: device not accepting address 27, error -71
May  5 10:23:51 darkstar kernel: [ 5062.868156] hub 6-0:1.0: unable to enumerate USB device on port 1
May  5 10:23:54 darkstar kernel: [ 5065.648077] hub 2-0:1.0: connect-debounce failed, port 1 disabled
They are not reproducible and depend on which port/hub you connect the device, I suspect that I should use a shorter/better or shielded USB cable.

Have fun with Attiny85 and V-USB!

It's only fair to share...Tweet about this on TwitterShare on FacebookShare on LinkedInPin on PinterestShare on RedditShare on Google+