ATMega168 without bootloader inside the IDE

Hi!

I got a bunch of cheap ATMega168 and would like to programm them without
the need of a bootloader. Ive got a USBasp programmer.

  1. Is it possbile to programm them from the Arduino IDE with nice Arduino code?
  2. If "Yes" what do I have to do to get the ATMega168 in the boards menue? What kind of
    settings do I have to add to the boards.txt? I would like to programm them with my USBasp.

Regards and thanks in advance!

If you provide the chip with a 16 MHz crystal:

Tools->Board->"Arduino Diecimila or Duemilanove w/ATmega168"
Tools->Programmer->"USBasp"
Tools->Burn Bootloader (to set the fuses)
File->Upload Using Programmer

If you don't have a 16 MHz clock (using the 8 MHz internal RC clock)

Add "ATmega16 with internal clock" to boards.txt. Google for the appropriate settings.
Tools->Board->"ATmega16 with internal clock"
Tools->Programmer->"USBasp"
Tools->Burn Bootloader (to set the fuses)
File->Upload Using Programmer