I've been having a hard time figuring what I need to do to make an Atmega8A-PU work with a 16Mhz crystal. I have a timer project that does not keep time right. 5-10 seconds are displayed as 1 second. Every time interval I measure is way off.
I am using AVRISP MkII to upload the sketch and everything is fine. I get no errors. If I upload the bootloader and burn the sketch, the Atmega8A-PU is keeping time as it should. If I upload the sketch without the bootloader, I get that problem. So the fix to my problem is somewhere in the bootloader but I can't find it (don't really know what to look for). I don't want to use the bootloader because of the delay it has.
I got an Atmeg8 16-PU with the fuses set from this fuse calculator http://www.engbedded.com/fusecalc/ and it works great! I can't find the right fuses for the Atmega8A-PU.
Does anybody know how to fix this for the Atmega8A-PU?
did you try using the atmega8A entry ? also you could try the optiboot bootloader made by WestfW its much faster and uses less space than the original bootloader
If you are referring to the fuse calculator, yes, I did. I've done the Atmega8 16-PU with the fuse calculator and it works as it should. No luck with the Atmega8A-PU, though.
I got an Atmeg8 16-PU with the fuses set from this fuse calculator AVR® Fuse Calculator – The Engbedded Blog and it works great! I can't find the right fuses for the Atmega8A-PU.
The ATmega8 and ATmega8A should have identical fuse settings.
Note that the "burn bootloader" command in the Arduino IDE will burn fuses as well as the bootloader, while using AVDUDE by hand to load a program will only change exactly what you've told it to (and probably resets the fuses to the default via the initial "erase chip" command.)