Fuses (proceed with caution!)
Clicking on the
Fuses
tab automatically causes the programmer to read the fuse settings of
the target AVR. If the programmer is not connected to the target AVR when you select this
tab, AVR Studio displays an error message. Fuses allow you to configure certain persistent,
fundamental aspects of your AVR such as boot flash size, brown-out detection level, and the
clock off of which it should run (e.g. external crystal or internal oscillator). To learn more
about the fuses and what they do, see the datasheet for your specific AVR.
Warning:
You can permanently disable your AVR by setting the fuses
incorrectly. Only advanced users who know precisely what they are doing
should change the fuse settings!
Lock Bits
Clicking on the
Lock Bits
tab automatically causes the programmer to read the lock bits
of the target AVR. If the programmer is not connected to the target AVR when you select
this tab, AVR Studio displays an error message. Lock bits allow you to secure your AVR by
preventing further flash writing or reading. The lock bits can be reset to a fully unlocked
state by performing a chip erase (i.e. by clicking the
Erase Device
button in the
Main
tab).
Lock bits are usually only important if you wish to release a product to other people without
giving them access to the program it is running, or if you wish to make it slightly more
difficult to overwrite a programmed chip.
3.c. Programming AVRs Using AVRDUDE
It is possible to program AVRs in Windows using
. AVRDUDE is free and included in the
[http://winavr.sourceforge.net/]
package. To program a hex file on to your AVR, you would type something similar to the
following into a command prompt:
cd C:\BlinkLED\default
avrdude -p m168 -P COM2 -c avrispv2 -e -U flash:w:BlinkLED.hex
• The argument following the
-p
is the part number of the AVR. For an Orangutan or
3pi Robot, the part number should be
m328p
,
m168
, or
m48
.
• The argument following the
-P
is the port name. You can determine your
programmer’s port name by looking in the “Ports (COM & LPT)” list of your Device
Manager for “Pololu USB AVR Programmer Programming Port”.
• The argument following the
-c
is the programmer protocol and should be
avrispv2
.
• The
-e
option requests an initial chip erase.
• The
-U
option is used for writing, reading, or verifying flash, EEPROM, fuses, or lock
bits. In this example we are using -U to write BlinkLED.hex to flash.
Please
see
the
[http://www.nongnu.org/avrdude/user-manual/
for more detailed information.
3.d. Configuring the Programmer
The Pololu USB AVR programmer can be configured using the Pololu USB AVR Programmer
Configuration Utility for Windows. The utility comes with the Windows drivers (
) and can be run by double clicking on the executable
pgm03a_config.exe
. This section
describes all the available settings and what they do.
Pololu USB AVR Programmer User's Guide
© 2001–2010 Pololu Corporation
3. Getting Started in Windows
Page 17 of 36