I'm going to try and implement USB with my AVR based keyboard project so that I can connect the keyboard to a PC/Mac/etc..
Ideally, I'd like a little advice on whether I have things right (see below), if I've missed anything and also if anyone has any advice for a USB newbie.
I've gleaned the following info from the net (i.e. a bit of googling):
- As this is a keyboard project my device will be seen as a low power HID device (<100mA draw)
- Low power devices cannot exceed 100mA if bus powered
- The D- and D+ lines need to connected to two pins on the AVR (obviously!)
- USB logic HI is >2.8V and LOW is <0.3V
- As the board is bus powered from the USB, and that will be at 5V, then 3.6v zener diodes will be necessary to clamp D- and D+ lines to remain within USB spec.
- D- should have two pull up resistors (15K and 1.5K) and D+ should have one pull down resistor (15K). I've seen quite a few diagrams with different numbers of resistors and values, but think that this is correct for low powered devices.
Have I got the above right? Also, with regards the firmware, does anyone have any suggestions library wise which comes with a good tutorial? Or should I go with V-USB and try and muddle my way through? Looks intimidating lol.
Any advice gratefully received!
[EDIT] Oops got D1 the wrong way around. Should have the anode facing D+. Doh