Atmega328 installation

Hi, I own an Arduino Duemilanove, with an Atmega168 chip. I just received my Atmega328 w/ Arduino bootloader from SparkFun. Shall I replace it with 168 one to program it?

Shall I replace it with 168 one to program it?

That's a little fractured sentence, but if you are asking if you can just replace the 168 processor with your 328 (with bootloader installed), then yes you can, no other changes required. Just be sure to select the correct board type on the Arduino IDE before uploading.


Sorry for my English :)

Could you please tell me:

correct board type on the Arduino IDE before uploading. Exactly what type should I choose in my case?

Thank you!

On version 18 it's the top board, " Arduino Duemilanove or Nano w/ ATmega328 "

Well by setting the right board for Atmega328, I could replace the chip with the Atmega168 on the Arduino board and successfully program the new chip.

On the next step I tried to implement what is under "Uploading Using an Arduino Board" section from here:

That is, to take out the Atmega328 chip out of the arduino board, and connect the serials and other components needed, then program it on the bread board using the Arduino board (having no chip on it).

When I try to program I get:

Binary sketch size: 990 bytes (of a 30720 byte maximum)

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I plugged the chip back to the board: every thing started to work again!

Edit: Also, when I program the chip inside the board with "LED Blink", and then set it up on bread board, it works ok without the board, but programming it gives error!

What could be the reason please?

You need a processor in the arduino board unless you are going for the last diagram on the page.

That last diagram has no reset control I don't see how you will ever get anything to down load to it.

But Mike under this section "Uploading Using an Arduino Board" it is written:

To do, you remove the microcontroller from the Arduino board so the FTDI chip can talk to the microcontroller on the breadboard instead.

Do you mean I have to: 1. keep one MCU on the Arudino board (Atmega168 in my case) 2. plug the other MCU in breadboard (328 in my case) 3. connect serially, and program the breadboard MCU Did I get you?

Could you please tell me what to do? I'm confused :D

There are 4 sketches in that tutorial. Sketch #2 and #4 are missing the reset line. It is not possible to load anything from the IDE without resetting the chip before.

In both sketches a wire from the RESET of the Arduino board to the reset pin (1) of the breadboard must be added!!