Monday, November 24, 2008

USB wiring for atmega168

This follows on last night's breadboard wiring... it's pretty simple if you know exactly what to wire. Which I didn't for a while, but since I have it I'll post it.

http://code.rancidbacon.com/ProjectLogArduinoUSB was very helpful for figuring out this stuff, on top of the avr-usb package itself.

This was used with the hid-mouse example from avrusb-20081022 on my standalone atmega168. There's basically no reason this would not work with an arduino board, as well. I only edited the AVRDUDE makefile entry to "avrdude -c dapa -p m168" so that it would run with my setup.

The wiring itself is:

3.6v pulldown diodes from ground to both D- and D+ wires. (it actually ran without this... USB ports won't be blown out by 5v. It's just not the best idea.)

68ohm (I used 75ohm) resistors from D- and D+ to pins 4 and 6 of the atmega168, respectively.

2.2k-5.0k (i used 4.7k) pullup from D- to 5v.

Thankfully USB is actually pretty resillent - it's hard to blow out a port.

Now to actually play with it more. That, and/or implement an ISP console for avrdude, which should allow anyone to make an arduino out of what I posted last night...

edit: I'm coming up with ideas far, far faster than I can implement them. I don't know if I'll get to where I want to be by the time vacation's over...

1 comment:

Hunter said...

Wow, I can smell the smoke all the way over here. (Pun intended.)

My gosh you're getting a lot figured out.

Hope you have a wonderful vacation.

Missing you.