how to copy a atmega168 with Arduino Duemilanove

Quick background, I bought a MPGUINO (tells you mpg based on some sensors in your car) and it uses an atmega168.

Well they've updated the software but won't program my chip without buying a whole new unit. So I have the .cpp file for the new software, and I own a willem programmer, but i'm assuming I need to buy an arduino duemilanove to be able to

  1. make a copy of the original atmega168 chip, and
  2. program the new software to another atmega168 chip

I'm wondering how do I read the existing info off my atmel168 chip with the arduino ide program?

And do I need anything special for the bootloader, or can I program the chip with the arduino duemilanove?

  1. make a copy of the original atmega168 chip, and

It is possible to copy the software from the original atmega168 chip. check out avrdude for this. It would hard and time consuming to modify the copied software. I made backups of software that came on the chip using an duemilanove.

  1. program the new software to another atmega168 chip[/quote
    You would have to compile the new software first. Did you get the header files and any libraries with the cpp file. A duemilanove could do this also.

bootloader: the atmega168 chip does not require a bootloader. A bootloader make it programmable without using external hardware. The bootloader uses about 2k of flash memory. If you don't use a bootloader you can use this flash memory for something else.

willem programmer: never used one.

Okay, it turns out the guy who made the mpguino didn't use a bootloader, so I guess I don't need to worry about that.

All i have is the .cpp file. I just ordered a duemilanove. So as I understand it (correct me if i'm wrong) I just need to download the arduino IDE software, plug in the duemilanove and install the driver file, then i should be able to load the .cpp code into a new sketch, and then upload that to the chip right?