I am trying to receive and send some data from a computer to an ATtiny through USB. Can an ATtiny85 IC communicate with a computer through USB? If yes, how should it be connected?
3 Answers
Digispark made a lot of these as part of a "cheap Arduino USB interface" project a while back.
This is my Digispark, it's pretty cute:
They have a web page here.
I got them for about $2 each. The board has the ATtiny85, a voltage regulator, and a handful of other parts.
Schematic (courtesy of Digistump Wiki):
More information about the Virtual USB idea at USB-Keyboard with Arduino and V-USB library, an example.
- 38,901
- 13
- 69
- 125
Can an ATtiny85 ic communicate with a computer through USB?if yes,how should be the connection?
Have you checked the web? There are many such projects. Here is a link to one:
http://www.instructables.com/id/Digispark-DIY-The-smallest-USB-Arduino/
Please remember "Google is your friend".
Cheers!
- 7,989
- 2
- 16
- 21
After much searching the best I've found is a lot of examples where the Digispark emulates a keyboard or mouse, so one crude way to read data is to output it as keystrokes, then make sure you have Notepad open to capture the keystrokes when you plug the Digispark in.
There did appear to be a CDC library that might have been usable at some time but as I understand it Windows 10 doesn't recognise it, though Linux might.
The explanation I saw was that the Digispark is a Low speed USB device, and by the USB specification low speed devices are only allowed to implement HID (keyboard, mouse) and not CDC though some operating systems may ignore this.
It ought to be possible to set the Digispark up as a HID device with no functions and then communicate with its endpoint directly, but I have not found a working demo of this although I suspect this is how the bootloader communicates.
- 21
- 1

