Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2405 of /home/qx/drupal-7.58/includes/menu.inc).

Design Files

Contents: 

All the design files for the NAV200 USB interface are available here: usb-interface.tar.gz. This includes the AVR firmware, CPLD code, schematic, board layout, gerbers, bill of materials, and a demo program. The code is intended to be built in Linux. It depends on libusb. It should be portable to Windows or Mac if you provide libusb and the build tools.

To program a new board, you will need the Xilinx tools, avr-gcc, and dfu-programmer.

Do this:

cd usb-interface/cpld
make
# CPLD programming files are now in work/
cd ../fw
make
# Plug in the new board. lsusb should show the Atmel bootloader (03eb:2ffa).
make prog
# The AVR is programmed. lsusb should show the NAV200 interface (3141:0008). If not, reconnect the board.
make prog-cpld
# This will print a lot of stuff. It should end with:
# XSDRTDO
# tdi 00
# tdo 00
# got 00

Disconnect and reconnect the board. It is now programmed and may be tested.

To reflash the board you must start the Atmel bootloader. Hold the program button while pressing and releasing the reset button. This can be done easily by rolling your finger across the two buttons, starting with the one near the USB connector. The program button (away from the USB connector) must be down while the reset button (near the USB connector) is released.

The USB interface firmware will turn on the green LED when connected to the host. The bootloader will not. If the green LED is on, the bootloader is not running.

To build the demo program:

cd demo/build
cmake ..
make

NAV200.cpp contains the code to use the USB interface. The distance scale is empirical and could be improved. The sensor already handles calibration of its measurements so only a single scale factor should be necessary.