Alan numitron clock
SNES Pi Webserver
USB Volume/USB toys
SNES Arcade cabinet
Game boy projects
Home Presence Detector
Rand Nerd Tut
Carnet du maker (fr)
ATmel blog (defunct)
USB without Arduino
Software: V-USB http://www.obdev.at/products/vusb/index.html
Everything is said : just use that code for ATmel processors, and you can emulate USB stuffs. No need of an Arduino for lightweight projects anymore.
However, there's a high cost to enter and tame V-USB. I believe it came at a hard cost of analysis for lots of people for I see few people giving clear samples of how to do stuffs. Worse are the examples of V-USB itself that are not for beginners at all: unclear, not really explained, you have no idea why it works or not. So let me try to bring my help here (and if you don't care, me neither, it will be my cookbook).
Finger Password Keyboard, which is my second USB project. I will use this occasion to improve my explanation.
My sample keyboard project UsbKeyboardSample project on GitHub
Basic configuration : with that hardware, you will receive the host reports (project Tricolor USB alert)
This approach works perfectly, though it forbids to to send and receive characters (not a keyboard). A great "thank you !" to the guys at ThingM for their Blink(1) firmware and software code that I adapted to my needs.
It's a good thing I tried by myself first, it helped me greatly to understand what I had to change/keep in the thingM.blink(1) firmware.
The guys at ThingM made a Blink(1), a small gadget you plug to your PC and that shows notifications through RGB pulse, fade, blink... requires no driver (you bet, it's a proprietary HID), you install a small software that talks to the gadget on your PC and you're done. That's exactly what we need.
All the source code firmware and software (host side) is here : https://github.com/todbot/blink1
Source code is on Google SVN, it's tagged. It justs gets one byte message and display it on PORT B of Attiny2313.
I change a bit their code to save space and adapt to my needs:
This approach works partially: you get a keyboard, you can receive the Num lock, Caps lock, etc,,, leds status but you can't have a program talk to you. I tried C# and Python, each time I got errors. So unless one day I (or you?) find and fix the issue, consider that this approach doesn't work.
Use that tag https://alanarduinotools.googlecode.com/svn/tags/Attiny2313/VUSB_KeyboardReceiver_TricolorUsbSignal
You get a project that receives the changes of leds from your PC. It stopped sending characters (I must have mixed something) but in this project I didn't need it so I just removed everything that was linked to it. It's using an ATtiny2313 and there's very few space left (maybe 10%) so beware that if you want to do more than blinking leds you might want a slightly bigger MCU in terms of Flash available.
To understand what is it you need, I added a comment [Receive USB: you need this!] everyhere there was a piece of code needed. But in a nutshell, you need the skeleton of the V-USB project plus:
Misc links :
All content on this site is shared under the MIT licence (do what u want, don't sue me, hat tip appreciated)
electrogeek.cc ~ Formerly known as Kalshagar.wikispaces.com (AlanFromJapan [2009 - 2018])