Nanduino » Testing

Step 1: Tool-Check

This section assumes you're using Windows as your host OS, but it's pretty similar with Linux. Unfortunately I can't try it with a Mac because I don't have access to one.

You will need:

  • Nanduino
  • A USB cable with a mini-B connector
  • The Atmel FLIP tool.

Step 2: Install FLIP

Atmel's FLexible In-system Programmer allows you to upload the AVR code you've written to the micro over USB without the need for a dedicated programmer, using the USB bootloader that is loaded into every AT90USB162 before it leaves the factory. Follow the on-screen instructions during the installation.

Step 3: Connect It Up

Connect the Nanduino to your computer with the USB cable. If you're paranoid it might make sense to connect it to a cheap external USB hub, just in case. You should hear the device enumerate and your OS will pop up a window similar to this:

That means the device has powered up and started running the bootloader program, but your host OS is unable to recognise it as any standard USB device type (e.g a keyboard or a mouse).

Step 4: Install Drivers

You will need to tell your OS to use the driver which was installed along with FLIP. On my system they were put in C:\Program Files\Atmel\Flip 3.3.4\usb.

You should now see the Nanduino listed in Device Manager under "LibUSB-Win32 Devices":

Step 5: Run FLIP

The first thing to do when you run FLIP is to select the device type. Do that with the little button that looks like an IC in the top left:

Once you've selected AT90USB162, you can press ctrl-U to connect to the device over USB:

If all is well, FLIP will negotiate with the Nanduino and return with a ready screen, including details like the device's signature bytes and the bootloader version:

From here, you're ready to load some code into the Nanduino. Before doing so you should hack together a bit of veroboard with at least two buttons to control RESET and HWB. Once the device is programmed with an application, that application will run when the power is applied, instead of the bootloader. Unless you're Sophie Wilson, it's likely that your application will not be right first time and you will need to go through a few iterations before you're happy with it. For this you will need a way to get back to the bootloader. Luckily you can do this easily: if the HWB input is low when the micro comes out of RESET, it will run the bootloader. A power-on reset is insufficient. You need to actually connect the RESET line to GND for a short time.


2 Comments

  1. Ken Boak says:

    Good Work - especially on a home made pcb.

    Nice Reference to Sophie Wilson. I saw the dramatisation "Micro Men" - quite impressive getting a whole 6502 monitor program into an eprom without a single bug.

    I used to hand code Z80 assembler in hex, program it into an eprom using an Apple II on the 2nd floor, run downstairs plug it into the target board, and weep at the lack of expected results. Good job programming tools have improved since 1983.

  2. Chris says:

    Thanks Ken!

    I saw Micro Men too, very nostalgic. I'm sure I read that anecdote about Sophie Wilson in an interview with Steve Furber somewhere.

    Yep, things have improved superficially, but even though we can travel faster nowadays, the horizon seems to have receded in equal measure!

Leave a comment

You can use TWiki syntax in your comment