To use Arduino to program AVR Microcontroller chip

Hi, I'm a newbie to microcontroller programming. I have an arduino duemilanove with me and an atmega168. As needed for a senior project, I'll have to program this atmega168 microcontroller, which I'll put and solder together with other MEMS sensors on a PCB. The main purpose of the microcontroller is to process the analog reading of those sensors, and digitize them (DSP).

My question:

  1. is there a way to program that AVR atmega168 in C programming with the arduino duemilanove as a programmer? But I do not necessarily want the AVR microcontroller to have the arduino bootloader thing. I have been googled alot and couldn't find those match exactly what i want cuz most of them teaching you ISP and make the AVR microcontroller working with the Arduino hardware, which is a little different from what i want to do (the atmega168 will be loaded with a program in flash memory that controls the signal from the sensors, doing the same thing again after reset, and so on.)

  2. I found many USB AVR programmers online that say they can program a AVR microcontroller chip. But I couldn't find useful programming guide for it with C programming. I know you need IDE like WinAVR, AVR studio, AtmanAvr C/C++ IDE, etc. particularly for the programmer. But how are they supposed to work and give me what i want to do with my MCU design? I'm simply asking for any useful guides of AVR C programming under some IDEs.

Thank you very much.
Your replies will be helpful for me to understand "quickly" what detailed part i need to accomplish.
Thank you again.

For programming the other atmega168 look at Arduino Playground - MegaISP and http://arduino.cc/en/Tutorial/ArduinoISP

I'm surprised the ArduinoISP wiki page has nothing on using avrdude with the arduinoisp sketch -dprog might be stk500 or stk500v2

Thx KyleK, i hv looked at those tutorial before actually, but it was about burning arduino bootloader to another AVR chip like atmega168. I want just simply program the avr chip thru the arduino board i hv and it may not be used on other arduino board. Or, let me ask this way, what is the function of burning arduino bootloader onto this avr chip? Does it mean this avr chip can be reprogrammed using arduino IDE later and work just like arduino on any non-arduino board?

Hi Daniel,

I agree, it can be a bit difficult to find information about using the ArduinoISP to load non-Arduino firmware. I solved this exactly same problem just a few days ago though. avrdude is the application you use to actually burn the firmware, here's a tutorial:
http://www.ladyada.net/learn/avr/avrdude.html

For avrdude's arguments, the ArduinoISP uses the avrisp protocol so use -p avrisp ; the port -P is the same as in Arduino app to talk to your Arduino board. You also have to add -b 19200 or you get a 'device not responding' error.

hth
d