Installing the Software
As mentioned, there are many options when it comes to software. One standard program, which is available for many operating systems is avrdude. Unfortunately, it is a command line tool, which makes it less than ideal for beginners. But there are GUI frontends available. I decided to use AVRDUDESS for this tutorial. And it is quite easy to use.
But first, install the USBasp driver. I would suggest to use the version from the project website. Insert the programmer to your USB port, and wait for the installation window to appear. Point the driver installation routine to the directory where you extracted you driver archive to. Once this is done, your device manager should have an entry "USBasp" under the section libusb-win32 devices.
Now extract the AVRDUDESS to a directory of your choice and you are done.
As a last step, connect your programmer to the target board.
All Systems Go!
So now everything is ready for programming. Let us assume that you want to write the hex file from my project, the simple LED cube to an ATMega8L controller. Here is what you do:
- Start AVRDUDESS. Two windows will appear: The GUI and the terminal window, where avrdude will be executed. All output from avrdude will appear here as well.
- Select the programmer: USBasp
- Select an MCU: ATMEGA8
- Leave the Port entry empty (the USB output will be found by magic)
- Baudrate is only needed for programmers connected to the serial port
- Leave bit clock empty or set to a value like 10 (this is the SCK setting in microseconds; 1 µs = 1 MHz, 4 µs = 250 kHz, 10 µs = 100 kHz)
- In the files section, select the hex file that you want to write
- Set the Format option to Auto or Intel Hex
- Press the Write radio button in the Flash section
- Press the Start! button
In part 4 we look at setting fuses and at what can go wrong.