(home)

Project Log : Arduino USB

Description

Project log for developing USB expansion shield for Arduino and associated code.

See also: Learning About Arduino and AVR-USB

Notes

USB lines D+ and D- MUST be wired to the same I/O port. We recommend that D+
triggers the interrupt (best achieved by using INT0 for D+), but it is also
possible to trigger the interrupt from D-. If D- is used, interrupts are also
triggered by SOF packets. D- requires a pullup of 1.5k to +3.5V (and the device
must be powered at 3.5V) to identify as low-speed USB device. A pullup of
1M SHOULD be connected from D+ to +3.5V to prevent interference when no USB
master is connected. We use D+ as interrupt source and not D- because it
does not trigger on keep-alive and RESET states.
Mar  7 04:52:38 localhost kernel: [685132.128973] usb 1-2: new low speed USB device using uhci_hcd and address 9
Mar  7 04:52:38 localhost kernel: [685132.252884] usb 1-2: device descriptor read/64, error -71
Mar  7 04:52:38 localhost kernel: [685132.480711] usb 1-2: device descriptor read/64, error -71
Mar  7 04:52:39 localhost kernel: [685132.696583] usb 1-2: new low speed USB device using uhci_hcd and address 10
Mar  7 04:52:39 localhost kernel: [685132.816506] usb 1-2: device descriptor read/64, error -71
Mar  7 04:52:39 localhost kernel: [685133.040335] usb 1-2: device descriptor read/64, error -71
Mar  7 04:52:39 localhost kernel: [685133.256203] usb 1-2: new low speed USB device using uhci_hcd and address 11
Mar  7 04:52:40 localhost kernel: [685133.663904] usb 1-2: device not accepting address 11, error -71
Mar  7 04:52:40 localhost kernel: [685133.775828] usb 1-2: new low speed USB device using uhci_hcd and address 12
Mar  7 04:52:40 localhost kernel: [685134.183550] usb 1-2: device not accepting address 12, error -71
hardware/tools/avr/bin/avrdude -Chardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm168 -cstk500v1 -P/dev/tty.usbserial-<id> -b19200 -D -Uflash:w:<path>main.hex:i
Bus 001 Device 040: ID 16c0:05dc  
  iManufacturer           1 www.obdev.at
  iProduct                2 PowerSwitch

hardware/tools/avr/bin/avr-g++  -Wall -Os -I. -DUSB_CFG_CLOCK_KHZ=16000  -mmcu=atmega168  -c usbdrvasm.S
hardware/tools/avr/bin/avr-g++  -Wall -Os -I. -DUSB_CFG_CLOCK_KHZ=16000  -mmcu=atmega168  -c usbdrv.c
sudo cat /dev/input/by-path/pci-0000\:00\:14.2-usb-0\:2\:1.0-event- | hexdump
0000000 86c7 47de 05cc 000b 0001 002a 0001 0000
0000010 86c7 47de 05d7 000b 0001 001e 0001 0000
0000020 86c7 47de 05d9 000b 0000 0000 0000 0000
0000030 86c7 47de da7f 000c 0001 002a 0000 0000
0000040 86c7 47de da89 000c 0001 001e 0000 0000
0000050 86c7 47de da8c 000c 0000 0000 0000 0000
0000000 88e5 47de a4c7 000b 0001 002a 0001 0000
0000010 88e5 47de a4d0 000b 0001 0030 0001 0000
0000020 88e5 47de a4d2 000b 0000 0000 0000 0000
0000030 88e5 47de 9ec5 000c 0001 002a 0000 0000
0000040 88e5 47de 9ece 000c 0001 0030 0000 0000
0000050 88e5 47de 9ed1 000c 0000 0000 0000 0000
code@rancidbacon.com