I kept hearing the term "fuse" and I had no reason to find out what it meant until you mentioned that it was probably my problem. I recommend that anyone who is curious check out this page:
I took a gamble and used the fuse settings you suggested and, happily, my Atmega168 is flashed with a proper Arduino bootloader! Thanks so much!
For those who need to properly set their Atmgea168 fuses in the future, the AVRdude command line is (depending on your programmer/serial port, I'm using the AVR-PG1 serial dongle on COM1):
paypal me $15 at bigfunATverizon.net and send me your snail mail address and i'll make you one.
$10 each for each additional atmega168 in the package. if lots of people take advantage of this, you might have to wait for me to resupply.
Well, interestingly, if you look at its source there appears to be support in the Arduino bootloader code (the version I use for the Atmega168) for the Atmega32 (and other AVR processors not often discussed). The problem is that there is no actual support in the Arduino IDE for Atmega32. It's crucial that the IDE know about the Atmega32 or it won't be able to do anything. If I was a little more adventurous I would have waded into the IDE source code to see what had changed to add Atmgea168 support and see if those changes, geared to the specifics of the Atmega32, could then added again. But I'd want one of the Arduino old school kids here to point me in the right direction first.
... At this point, the microcontroller chip on the Arduino board had been replaced with the 16 KByte ATmega168 and everything but the ICSP port had been disconnected. The Arduino board itself was powered by a 7.5V 500mA power supply and the AVRISP-mkII connected the board with the Mac's USB port.
On the software side, avrdude 5.2 was installed into /usr/local/bin and the ATmega168 boot-loader was made available here /AT168.hex
Burning and Fuses
Burning a new boot loader is a three-step process: unlocking the boot loader segment, uploading the new boot loader, and looking boot loader segment again.
I've tried this and got it the boot loader burned and everything appears to be working, except for one thing.
Does anybody else observe that the orange light blinks slower on boot/reset than on the atmega8? I also have motors that take servo commands to set the speed and they appear to be going slower. Though this could be all in my head.
Anybody else notice anything like this? Is there a way to measure if the atmega168 is running at the right speed? I've gone round and round with the fuses (causing me to burn out my mega8 so i can't compare it) and i haven't been able to get light to blink faster on boot. This could of course just be in the code for the 168 boot loader though. Anybody have an insight?
I can assure you that you are imagining the speed difference. I have used Atmega8s and Atmega168s in the same socket with the same circuitry and have never seen speed differences when executing identical programs, some of which do nothing but record the time, iterate through thousands of loops, and then record the time again.
Of course, if you have the fuse settings set wrong, it's possible to, say, have the Atmega168 cranking along at only 1MHz, but in those cases its serial port will not work with the default settings for the Arduino IDE and you'd have an objective sense of the problem instead of the subjective one you describe.
I can't tell if I've had this issue the entire time I've been using a 168 or not, but at the moment, in order for the programs i download to the chip to run, I need to briefly plug in the usb cable. I can then unplug it, and after the bootloaders wait time, the program will run. It does this even with the led_blink program, so it has to do with either the bootloader or whatever happens before the bootloader. Both pressing the reset button, or reseting the power will cause it to have this problem. I've tried two different chips, tried all the bootloaders i can find. Tried uisp and avrdude. Anybody have an insight to why this is happening? I'm using the arduino on a robot that is only connected to usb to download, so it's very annoying to have to plug it in every time i want to start it. Fuse settings i'm using are: hfuse 0xDF lfuse 0xFF efuse 0xF8 lock 0xCF