And when i proceeded to burn my bootloader using, atmega board programmer sketch, i got the following message.
Atmega chip programmer.
Written by Nick Gammon.
Entered programming mode OK.
Signature = 0x1E 0x94 0x06
Unrecogized signature.
LFuse = 0xFF
HFuse = 0xDF
EFuse = 0xF8
Lock byte = 0xFC
Clock calibration = 0x90
Type 'C' when ready to continue with another chip ...
So maybe there are different 'flavors' of 168 chip. You might just try and edit nick's sketch for that line and see if will then attempt to load the bootloader:
grimreaper:
Thanks a lot retrolefty THe bootloading worked....
But the chip, still wouldn't let me upload new programs.
So what is your 168 based 'board', does it run the chip at the correct crystal speed? Does it support auto-reset that the IDE requires? Have you run a loopback test on your 168 based setup to see if your communication link works?
I didn't actually test that signature but added it for someone else.
The fact that you uploaded OK shows the chip is good. I can't remember right now which bootloader I used for that chip*, but the clock speed would need to match and you would need to select the correct bootloader in the IDE so that the protocol matches.
Did you modify the boards.txt file and select the appropriate board type so that the IDE knows about the new connection speed used for uploads (and also the new space available?)
The ATmega168PA vs ATmega168 is like the 328P vs 328; the chips are very close to identical, but have different signatures. (The difference is that Arduino supports the 168 and 328P without effort, while the 168PA and 328 require hacking.) The 168 and 168PA can use the same bootloader, and once that happens the Arduino IDE will treat the chips exactly the same.
Nick's program (and Optiloader) are especially useful for putting bootloaders into these "odd signature" chips, because they have their own idea about the translation of signature to "matching" bootloader code.
So what is your 168 based 'board', does it run the chip at the correct crystal speed? Does it support auto-reset that the IDE requires? Have you run a loopback test on your 168 based setup to see if your communication link works?
I actually have a duemilanove clone board, which i used to program both my atmega328P( selecting the 'arduino duemilanove w/ atmega328' board), and my Atmega168 (selecting the 'arduino diecimila or duemilanove w/ Atmega168). Both had bootloaders. And i haven't done the loopback test. Will it confirm if my chip is dead or working?
Some time back, my 168 stopped working( always failed while programming it). After i read Nick Gammon's page, i thought i'd try re-uploading the bootloader.
The fact that you uploaded OK shows the chip is good. I can't remember right now which bootloader I used for that chip*, but the clock speed would need to match and you would need to select the correct bootloader in the IDE so that the protocol matches.
Thanks for your reply. I actually burned the bootloader after making the changes Retrolefty told in the above comments. I'm sorry i didn't really get, what you meant by select the correct bootloader in the IDE?
Did you modify the boards.txt file and select the appropriate board type so that the IDE knows about the new connection speed used for uploads (and also the new space available?)
Thanks for you reply. I haven't modified the file. What board should i be selecting?
grimreaper:
I'm sorry i didn't really get, what you meant by select the correct bootloader in the IDE?
There are various uploading protocols, and also baud rates for uploading. When you select a board in the IDE it uses the relevant section of the boards.txt file to choose a protocol and baud rate. If you choose the wrong one, the wrong protocol/baud rate will be used and you will get some sort of error.
You don't literally have to have the selected board, but the chip being programmed has to:
Have the bootloader that the board is "configured" for (eg. 32 Kb Optiboot)
Be running at the clock speed that makes the baud rate correct
For example, I program a Duemilanove with "Uno" selected as the board type, because I uploaded the Uno "Optiboot" bootloader. What is written on the board doesn't count, it is the factors above. I also select Uno with "bare bones" (breadboard) chips once I put the Optiboot bootloader on them.
Sorry about that..I've added a screenshot, if that doesn't help could you pm me your id. I'll mail it to you. There seems to be some problem while opening the boards.txt attachment. Not quite sure, why.
A screenshot does't really cut it, especially with the line breaks where they are. Try uploading it again as a text file. Maybe the forum software will work this time.