Currently I am trying to figure out what the correct fuse settings for my ATmega8 are, when I want to use an external crystal oscillator with a frequency greater then 8 MHz.
I have found the following table in the Atmel ATmega8 datasheet (p. 27):
CKOPT has to be programmed (set to 0). But what about CKSEL3..1?
For a 16 MHz oscillator I would probably set them to 111, because it is the highest possible value (compared with 8 MHz, if CKOPT is unprogrammed (set to 1) ).
How would you choose CKSEL3..1 for example a 10 MHz, 12 Mhz or 14 Mhz oscillator?
Simply comparing with the ranges as depicted for CKOPT = 1 seems wierd. (my calculation: e.g.: (.4/8*16)MHz=.8MHz, etc.):
- CKSEL3..1 = 101 for .8 - 1.8 MHz
- CKSEL3..1 = 110 for 1.8 - 6 MHz
- CKSEL3..1 = 111 for 6 - 16 MHz
So do I always choose 111? If I should, in which case would the others be more appropriate?