I very successfully completed the V-USB project using Arduino outputting keystrokes to my computer. But as the atmega328 isn't exactly small, I was hoping to run V-USB on the attiny85. I know this is possible and I've searched google and this forum but I havent found detailed instructions.
I would like to use the Arduino IDE. I saw the V-USB easylogger project and the code for that isn't arduino :~
Any help pointing me in the right direction will be appreciated. Thanks
Check out the Digispark (Digispark USB Development Board - Digistump). It's pretty much what you describe. You can either buy a built one, or since it's open source, base your own design on it.
Digispark is pretty awesome. I just got one. It's 1 square inch of Arduino goodness with built in USB!
It is a little "different" however. Be sure to read the wiki on it (link to it on page given above). Because of the small size and limited pins, USB, etc...not all libraries work as expected. I believe it also doesn't have but-in, easy to use serial communication. It can do it, but might take a little extra trickiness to make it work how you want. But, for the price...I say buy one & give it a try. It's so tiny!
When using the 'micronucleus' to program ATTiny (at least with the Digispark Arduino IDE) you should not plug into USB until after clicking to send sketch to Arduino. It then gives you like 60 seconds to plug it in.
Also, since the USB programming pins are shared as other input/output/PWM pins.... make sure your circuit won't interfere with programming signal. Just be aware what's connected to them. I usually just disconnect everything from the board until after I load my sketch onto it to be safe.
Thanks for all the help guys! I got the hex file uploaded (on my own! That made me happy :)) but thanks for the complete directions they may be useful to others reading this.
I got the blink sketch uploaded and that worked, but when I keep trying to upload it fails with a "USB not recognized/malfunctioned" message in windows. Any suggestions?
phillips:
Thanks for all the help guys! I got the hex file uploaded (on my own! That made me happy :)) but thanks for the complete directions they may be useful to others reading this.
I got the blink sketch uploaded and that worked, but when I keep trying to upload it fails with a "USB not recognized/malfunctioned" message in windows. Any suggestions?
I didnt know which pin is USB D+ and D- though. I'm also not using an exact 1k5 resistor (instead 4 resistors that add to about 1k5). It has worked about 1/4 the time but I don't know what I'm doing different that makes it work.
I have the same problem you have, after wasted lots of time i continue without connect my Attiny85 through USB, using Arduino IDE, any Suggestion?, idea?, comment?
Escrich:
I have the same problem you have, after wasted lots of time i continue without connect my Attiny85 through USB, using Arduino IDE, any Suggestion?, idea?, comment?
OP solved his problem with USB hub. Where is your problem?
Hi Smajdalf, first of all, thanks for your fast answer, after that, looking at your answer:
"OP solved his problem with USB hub. Where is your problem?"
I don't know what you mean when you write "OP", my actual problem it´s because i want to have an USB adapter on an Attiny85, i'm trying to use a small board like the one in the picture, or like the attached schema, i'm readig how to do it with Atmel Studio, but I'm still no ready to use Atmel Studio, at this moment i have not enough knowledge to use it, that´s because i want to do it using Arduino IDE.
You can use Arduino IDE. But first you need to upload bootloader to the ATTiny (and set fuses). Try to follow links in reply #4. Then you may need to install drivers for Digispark into the IDE.
Well, I was advanced something, at this momment I can upload an sketch on the attiny85 using the Arduino IDE though the USB connector, choosing Digispark boards at Arduino IDE, now my questions are:
Is this all what we can do with this USB connector?
Could i make an sketch sending information from attiny to the computer using this USB connector?
Look at Digispark wiki. There is thing called DigiCDC (they also have examples in IDE) and it emulates Serial communication just like "normal" Arduino. But you need drivers for it. For me it works flawlessly on Windows XP and Vista but I did not manage to get it to work on my new Windows 10 computer. I don't know if it is Windows or hardware problem, maybe a hub would help (I don't have one). It somehow violates USB standarts and if your system is not forgiving it won't work.
There are also other ways that are said to work (using HID protocol) but I did not have time to play with it.