I am confusing which crystal I need to use forATmega8L.
I had set the HighFuse: F9, LowFuse: F8;
When I try to get the Fusebit setting again, it return Chip enable error.
Then I add 2x22pF and 8MHz. But the error still occur.
What I need to do to fix the problem?
But according to data sheet, the max speed is 8MHz. Am still can put 12MHz/16MHz with 22pf / 36pf ???
The ATmega8L is the low-speed ATmega8 and can only run up to 8 MHz. I expect the fuse settings will be the same as for the ATmega8 but with the different processor and lower clock speed.
This is the current entry for the Arduino NG and earlier models which could have an ATmega8
##############################################################
atmegang.name=Arduino NG or older
atmegang.upload.tool=avrdude
atmegang.upload.protocol=arduino
atmegang.upload.speed=19200
atmegang.bootloader.tool=avrdude
atmegang.bootloader.unlock_bits=0x3F
atmegang.bootloader.lock_bits=0x0F
atmegang.build.mcu=atmegang
atmegang.build.f_cpu=16000000L
atmegang.build.board=AVR_NG
atmegang.build.core=arduino
atmegang.build.variant=standard
## Arduino NG or older w/ ATmega168
## --------------------------------
atmegang.menu.cpu.atmega168=ATmega168
atmegang.menu.cpu.atmega168.upload.maximum_size=14336
atmegang.menu.cpu.atmega168.upload.maximum_data_size=1024
atmegang.menu.cpu.atmega168.bootloader.low_fuses=0xff
atmegang.menu.cpu.atmega168.bootloader.high_fuses=0xdd
atmegang.menu.cpu.atmega168.bootloader.extended_fuses=0xF8
atmegang.menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_ng.hex
atmegang.menu.cpu.atmega168.build.mcu=atmega168
## Arduino NG or older w/ ATmega8
## ------------------------------
atmegang.menu.cpu.atmega8=ATmega8
atmegang.menu.cpu.atmega8.upload.maximum_size=7168
atmegang.menu.cpu.atmega8.upload.maximum_data_size=1024
atmegang.menu.cpu.atmega8.bootloader.low_fuses=0xdf
atmegang.menu.cpu.atmega8.bootloader.high_fuses=0xca
atmegang.menu.cpu.atmega8.bootloader.extended_fuses=
atmegang.menu.cpu.atmega8.bootloader.file=atmega8/ATmegaBOOT-prod-firmware-2009-11-07.hex
atmegang.menu.cpu.atmega8.build.mcu=atmega8
##############################################################
I would guess that this might work for the ATmega8L.
I changed ".build.f_cpu=16000000L" to ".build.f_cpu=8000000L".
I changed ".upload.speed=19200" to ".upload.speed=9600" because the bootloader will be running at half speed.
I changed ".build.mcu=atmega8" to ".build.mcu=atmega8l" so avrdude will expect the 8L signature.
Note: I don't know if the avrdude that comes with the Arduino IDE knows about the ATmega8L processor.
pylon:
HighFuse to F9 disables ICSP programming. If you don't have a high voltage programmer, get a new chip.
Thanks for your reply, I find this post, and wire the beard board version.
Now my ATmega8L was come back.
Some comment for anyone who hit my issue.
There are 2 version of AVR HV RESCUE SHIELD on provided website, both of them are ok. I follow the simple one (v1)
Reset the Fuse to default; LFuse: 0xE1, HFuse: 0xD9;
Update config (LFuse and HFuse, F_CPU, etc) in arduino boards.txt
After reset Fuse successfully, using ArduinoISP to upload the BootLoader
Upload you sketch to ATmega8L via ArduinoISP
PS: pylon, just add Karma to you.
PS2: hopefully if I have time, I may try to design the Arduino Nano / Pro Mini version which replace the AVR HV RESCUE SHIELD.
For AVR devices that have the "low power / full swing" crystal drive option (low fuse, bit 0 (CKSEL0)) the low fuse, bit 0 should be programmed (that is LFUSE should be 0xF7 instead of 0xFF) - this sets the crystal oscillator to full swing which makes the board a lot more stable (runs fine at lower voltages, doesn't flake out if you hold the board and accidentally touch near the crystal, etc..).
Why the Arduino default is 0xFF (low power oscillator) is beyond me. The Icc difference is only a milliamp or so......
pylon:
HighFuse to F9 disables ICSP programming. If you don't have a high voltage programmer, get a new chip.
I added a small hack to my AVRDUDE. Before programming a chip, it checks if HFUSE, bit 5 (SPIEN) is going to be un-programmed and if so it prints a warning saying that this will disable further programming and can only be recovered by using a high voltage programmer and do you REALLY REALLY want to do this?
It's saved me a few times from doing something stupid when I've been up all night programming and my brain has since turned to mush...
krupski:
For AVR devices that have the "low power / full swing" crystal drive option (low fuse, bit 0 (CKSEL0)) the low fuse, bit 0 should be programmed (that is LFUSE should be 0xF7 instead of 0xFF) - this sets the crystal oscillator to full swing which makes the board a lot more stable (runs fine at lower voltages, doesn't flake out if you hold the board and accidentally touch near the crystal, etc..).
Why the Arduino default is 0xFF (low power oscillator) is beyond me. The Icc difference is only a milliamp or so......
Thankyou for your reply, Is it simple to said, using LFuse: F7 better than FF, but both of them are work fine for external 8MHz.