Setting Up Your Desktop for Programming the AT90USB646
1. Install Flip 3.4.1 for Windows.
2. Install AVR Studio 4.18.
3. Install WinAVR-20100110.
4. Plug your board into one of your machine's USB ports. Then go to Control Panel and verify that the microcontroller is properly recognized.
- If your board is not properly recognized you will need to point the Device Manager to the folder containing the USB drivers. To do this click the update driver button. Go to the Atmel\Flip3.4.1\usb\ directory and click open. After Windows finishes installing the drivers, the Device Manager should now show that the AT90USB646 is properly installed.
5. Open AVR Studio and create a new project. Check the create folder and initial file options, and give your project a meaningful name, such as tutorial.c.
6. In the editor window create a main function as follows:
int main(void)
{
return 0;
}
The main function acts as the entry point for your program. The first line between the curly braces is the first line executed by the processor.
7. You can now try compiling your code by clicking the build icon, or finding build in the drop-down menus. If in the message window in the bottom panel you see that the build succeeded, then your code was compiled into a hex-file and saved to your project folder.
8. Open flip, and select the AT90USB646 microcontroller as the target. Make sure that your boards switch is in the program position, and then push reset. Now push the connect button.
9. Click the load .hex file icon, and browse for the hex-file generated in 7. It should be named something like tutorial.hex.
10. Move your board's switch away from the program position and push reset. Your program will now run on the microcontroller.

