Just a checklist for programming the microncontroller Ralf gave me yesterday ((Also check out this useful article))
* you need a functional eclipse installation
* Install WinAVR and be sure that it is in the
PATH
by executing avr-gcc
from a command prompt
* Install the AVR-Interface into eclipse via Help
→ Install New Software
→ Add
. Then paste the following link in the URL Box:
http://avr-eclipse.sourceforge.net/updatesite/
* When I create a new project, I need to adjust the following settings in the project properties:
* AVR
→ AVRDude
Programmer
click on New
, Name: USBASP
, Programmer Hardware (-c
) USBasp, http://www.fischl.de/usbasp/
* AVR
→ AVRDude
, Advance
be sure the check Disable device signature check
* AVR
→ Target Hardware MCU Type
select ATmega168
and set the MCU Clock Frequency
to 12000000
(that's $12\cdot10^6$)
* C/C++-Build
→ Settings unter Tool Settings
check Generate HEX file for Flash memory
* C/C++-Build
→ Settings unter Tool Settings
, AVR Compiler
→ Optimization
set the Optimization Level
to Size Optimizations (-Os)
.