USB Bootcamp

Group Members:

  • Adam ODonovan, University of Maryland
  • Daniel B. Fasnacht, Institute of Neuroinformatics, ETH Zurich
  • Daniel Lofaro, Drexel University
  • Sergio Davies, The University of Manchester
  • Shih-Chii Liu, Institute of Neuroinformatics, UNI/ETHZ
  • Steve Kalik, Toyota Research Institue
  • Tara Julia Hamilton, The University of New South Wales
  • Timmer Horiuchi, University of Maryland
  • Tobi Delbruck, Institute of Neuroinformatics, UZH/ETH Zurich

Leaders: Tobi Delbruck & Daniel B. Fasnacht

Learn how to use  USB (Universal Serial Bus - the thing you have on every PC) to  interface to neuromorphic chips and servo motors. Write your own USB driver, make a robot that uses  a silicon retina, write microcontroller firmware for the first time. Unlock the power of combining ubiquitous PC digital computation with your own neuromorphic hardware sensors and actuators.

The USB group is working closely together with wiki:2010/smd10 , with the objective to build USB device board based on either a new Atmel USB board or the  SiLabs C8051F320 controller.

Atmel AVR32 UC3B

The Atmel USB chip is a very high-performance Atmel 32-bit CPU: (AVR32UC3B1256: 256KB flash, 32KB RAM, full-speed USB, 60MHz CPU clock, and lots of features like GPIOs, ADC, DAC(PWM), Timers, USART, I2C and even a 16-bit stereo audio out)

The two really cool things about this device are:

  • it is supported by the GCC compiler, so you can you the entire open-source GNU toolchain to program it (no cygwin needed either!)
  • the chip has a built-in programmer, which allows you to program even a blank + bare chip without any programming device (Using the standard DFU protocol, which is mostly known from smart-phones otherwise...)

Because we need to order components for us to work with, you need to register early (preferably now) so we can estimate how many people I need to supply with equipment.

The objective of both the SMD and USB tutorials is that every participant gets his own USB board to take home and work with. (See attached photograph).

  • The SMD tutorial will consists of two 1-hour lessons end of the first/beginning of the second week (plus as much individual practice as you want).
  • The USB bootcamp will be 2-3 meetings early in the second / third week.
  • The idea is that you can build this device and maybe apply it directly in another project / work group you are engaging in.
  1. SMD Workgroup page for building the borad
  2. USB Firmware Programming for the AVR32 UC3 page


The C8051F320 is a USB enabled microcontroller which is fully compatible to the Intel MCS51 (aka 8051) architecture. This chip can be easily used to control up to four servos which have PWM inputs. But it is also adaptable to interface to all kinds of digital I/O as well as analog inputs using its 10bit ADC. The cool thing about this chip is that it integrates a factory-calibrated oscillator and regulator (which you can also use as a 3.3V supply) and we have a lot of experience with it and already have applications developed that are integrated into wiki:2010/jaer10; e.g. we've built a large number of robots that use the servo control, have control a laser pointer, have developed numerous IR controllers for WowWee toys that spoof the regular IR remote control, etc. The downside is that the SiLabs? is only an 8-bit controller and requires use of the Keil C compiler for the 8051, which is an ancient architecture. These tools are available below, but only for Windows.

CHECK from 2009 below

Background information on USB Devices

On the host side, we use the Java interface to the  Theyscon USBIO Driver for Windows. We may also discuss USB drivers under linux which is something that Daniel B. Fasnacht has considerable experience. Anyone who knows about MacOS USB drivers is also welcome to contribute.

See The USB bootcamp SubVersion repository for other material. See the attachments below for the SiLabs IDE, user guides, etc.

Examples of projects from 2008 workshop

The 2008 USB bootcamp met twice for lecture turorials and then worked on several projects:


  1. Download and unzip attachment:jaer-usb-tutorial-export.zip Download. We will be using the jAER framework? for projects involving USB and the SiLabs IDE with C51 compiler patch. Alternatively, you can  check out a working copy of jAER. The  Thesycon drivers and java package are included in jAER. A full checkout of jAER will provide all firmware, host side code, and drivers.
  2. Download and install the SiLabs IDE attachment:mcu_ide_v330.exe Download. For projects that will use the  Silicon Labs  C8051F320 controller, install the  Silicon Labs IDE (Integrated Development Environment=IDE). This IDE lets you write C code for the controller, download firmware, debug and single step, etc.
  3. Download and unzip source:usb09/siLabs_keil_files.zip to enable compilation of larger files. Ask how to patch the SiLabs IDE.
  4. Download attachment: ServoUSBFirmware.zip and unzip it to a path with no spaces in its name, e.g. C:\USBServoFirmware. This is necessary for the linker to work.
  5. Start the SiLabs IDE and open the USBServo project. Try to build it; if it fails build then ask for help.
  6. Open the jAER project in netbeans (or your favorite java IDE) and open/run the class ServoTest. You should see something like this:

photo of ServoUSB board. Or use the command file in jAER utilities/ServoTest.cmd to run the class.

  1. Plug in your completed !USB Servo board and install the drivers from jAER's drivers\driverServoController.
  2. If your board is working, you should be able to install the drivers and open the !USB Servo board from ServoTest. Every time you change a servo setting, the LED on the board should flash.

To write the !ServoUSB firmware

  1. Plug in the USB debug adapter and connect it to your completed ServoUSB board.
  2. In the SiLabs IDE, select the comm menu and choose the debug adapter.
  3. Program the ServoUSB board.

SiLabs USB debug adapter and development kit

The  USB Debug Adapter is the handy device for programming the SiLabs? C8051F320 controllers and costs $35 each.

You can buy  the F320 development kit for yourself for about $70.

SiLabs forum

The  SiLabs documentation is a very helpful forum but requires a free account signup for access.

ServoUSB firmware

The ServoUSB USB firmware is in  https://jaer.svn.sourceforge.net/svnroot/jaer/trunk/deviceFirmwarePCBLayout/SiLabsC8051F320/ServoUSBFirmware.

See the attachments for more information on the ServoUSB board, including board layout, schematic, etc.

CypressFX2 USB development (advanced USB developers only)

For anyone who wants to work with the Cypress FX2LP high speed controller, you need to install  the Cypress FX2LP Development Kit, which consists of 3 separate downloads.

The  Cypress EZ-USB technical reference manual (TRM) is essential for working with the FX2LP chip.

Potential future projects

LED flasher

Program the firmeware on the USBServo board shown below to control a set of 4 flashing LEDs from a PC. We'll use these as a basis for a  gaze tracker in conjunction with the  temporal contrast silicon retina by mounting the LEDs on the corners of a monitor to produce flashing glints reflected from the eye. We can use the fine temporal response afforded by the retina to filter the glints out of background signal and can actively control which glints are being generated using the LED flasher.

Linux USB driver development

Learn how to write a linux USB driver using JSR-80 and how it interfaces to  jAER. Or improve the beta driver that already exists in jAER which is based on a completely native implementation.

Software mapper in jAER using Raphael Berner's USBAERmini2 board

Write host-side code to do AER mapping in software using jAER.