Loading a Bootloader

Hello, I am still kind of a noob to this whole Arduino thing so if this is not the right place to post this or it's just a stupid question i apologize in advance. I recently purchased 3 ATmega168-20PU chips on ebay ( Item number: 150512868708 ), and I can not get them to accept any sketches I keep getting these error messages,

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

I have tried everything I could find on the net to fix this and nothing, I was thinking that they might not have bootloaders preloaded. If this is the case where do I find the correct bootloader and using my Duemilanove board how do I load the bootloader onto these chips? Any help would be greatly appreciated, Thank you

I have tried everything I could find on the net to fix this and nothing, I was thinking that they might not have bootloaders preloaded.

That is most likely the case. Chips don’t come preburned with a bootloader unless the seller performs that step. As the ad doesn’t say they did, I would never assume they did.

If this is the case where do I find the correct bootloader

It’s avalible as part of the Arduino IDE download package. On my windows PC all the bootloader hex files are located:

C:\Documents and Settings\Primary Windows User\My Documents\My Programs\Arduino\arduino-0021\hardware\arduino\bootloaders\atmega

and using my Duemilanove board how do I load the bootloader onto these chips?

Check out this from the Arduino playground site:

Any help would be greatly appreciated, Thank you

Your welcome, good luck.
Lefty

Thanks retrolefty, I just got your reply and am beginning work on the solution. I figure it will take me a while to complete but i will let you know the outcome when i have finished

Well lefty i have been trying all the instructions i could find and still i get those same two messages, i even moved from my windows vista machine to my windows 7 machine and still the same results, i have tried turning off the virus protection software, tomorrow i will update to arduino 0021, right now i have version 0018 and am getting tired of all this disappointment, again thanks for your help

No problem. I've about exhausted my knowledge to help further anyway. I needed to burn bootloaders over a year ago, well before that new sketch was available. I purchased a hardware programmer that the Arduino IDE supports, the USBtiny that uses the 6 pin ICSP connector to program the chip http://www.adafruit.com/index.php?main_page=product_info&cPath=16&products_id=46 .

That was after I tried several versions of DIY parallel programmers that wouldn't work for me. The USBtiny works great for me, but if I was where you are now I would probably save the money and get this newest way to work. I'm sure if you continue to have trouble someone here with more experience with that sketch and setup can help you.

Lefty

When you try to burn the bootloader, where is the new / blank processor? Is it plugged into the socket on your Arduino or is it on a breadboard?

Yet another way to burn a bootloader... http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html

You put the blank one on the breadboard since the arduino is running a sketch to do the programming.

I have tried it with the processor on the breadboard, on the Arduino Duemilanove, I am using the same cable i have always used, the same computer , the same Arduino 0018 program, nothing has changed except these new Atmega168 chips. Normally when i transfer a sketch to a processor i get the TX and RX lights on the arduino flashing all over the place but i dont believe the arduino is even running the sketch because these lights do not flash i only get these two messages no matter what i try, avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

How do you have the breadboard and the connections between the arduino and breadboard configured ?.

http://arduino.cc/en/Tutorial/ArduinoISP

go to the bottom of the page , the diagram on the left.

Just a little while ago I installed a working atmega168 chip and had no problem reprogramming it

But the EBay chips can't be reprogrammed using the same circuit and steps?

No i have tried several times and the arduino wont accept the programs

Just a little while ago I installed a working atmega168 chip and had no problem reprogramming it

By "reprogramming it" do you mean uploading a Sketch or reburning the bootloader?

Have you successfully burned a bootloader to any chips (not just the EBay ones)?

Yes by reprogramming i meant uploading a sketch
no i have never tried to burn a bootloader before these ebay chips, this is my first experiance doing this and i dont find it any fun at all i mught just stick to buying them with the bootloaders already installed, they are a little more expensive but i feel its worth it

Do you want to continue trying?

Its possible the fuses have been set on the chips so they can't be programmed with a low voltage programmer (all the low cost ones).

If you're feeling handy with a soldering iron : http://mightyohm.com/blog/2008/09/arduino-based-avr-high-voltage-programmer/

oh yes, i hate getting beaten, i love a good challenge. it's just i have some things i need to get made before Christmas and i can't devote all my time to something that i might not get working in time. So i will continue working on this problem but i am also going to buy some to get these projects done.

Hey Pluggy, This looks like an interesting way to kill an afternoon, will this work and will it work with a Duemilanove

Its possible the fuses have been set on the chips so they can't be programmed with a low voltage programmer (all the low cost ones).

There are a couple of fuse settings that can prevent ICSP from working. One is disabling of the reset pin and only a high voltage hardware programmer can recover that situation. Another is if the chip has fuse settings enabling the use of a external crystal instead of the using the chips internal clock. If that is the case then using a breadboard mounted chip with no crystal then ICSP will not work. Solution is to wire a resonator or crystal (with caps) on the breadboard, or use a arduino board to program the chip as it has a crystal on board.

Lefty

Hey pluggy, I am going to go with your suggestion but right now I am sitting here waiting for my ebay resistors to arrive so I can build it. I have read alot about it and believe it should work, hopefully. thanks