Why 16 Mhz clock???

Why does Arduino have 16 Mhz clock when all Atmegas and Attnyies have a 8 Mhz internal clock? Why is 16 Mhz clock good for?

My working area is: * LCD * 7-segments * LED-lamps * Buttonswitch * Stepper motor * Communicate between two ATmegas * Relay ON/OFF * Keypad * Pressure barometer * Hydrometer * Ultra wave range sensor * UV sensor * and mutch more

Do i realy need the 16 Mhz clock then???

Why is 16 Mhz clock good for?

So you can do twice the work in the same time.

persson121:
Do i realy need the 16 Mhz clock then???

8MHz may be perfectly adequate but you will probably have to do some experiments yourself to prove that.

…R

Robin2:

persson121:
Do i realy need the 16 Mhz clock then???

8MHz may be perfectly adequate but you will probably have to do some experiments yourself to prove that.

…R

If i want to build a wake up clock. Is it nessesary for me to use 16 Mhz or does it works the same with 8 Mhz?

AWOL:

Why is 16 Mhz clock good for?

So you can do twice the work in the same time.

Now i understand!
Everybody have told me that 16 Mhz is better if you working with time precision like a clock or a CNC-machine or something with calculation like a calculator.

It will therefore be more accurate if you use the 16 Mhz clock than the 8 MHz internal clock, according to them.

It will therefore be more accurate if you use the 16 Mhz clock than the 8 MHz internal clock, according to them.

Try and talk to people who know what they are talking about. Frequency has nothing to do with accuracy.

You just get the instructions done twice as fast, they are not timed more accurately.

persson121: Why does Arduino have 16 Mhz clock when all Atmegas and Attnyies have a 8 Mhz internal clock?

The Arduino also has an 8MHz internal clock.

The ATtiny85 can run at 16MHz on internal clock.

persson121: Everybody have told me that 16 Mhz is better if you working with time precision like a clock

That's not true.

fungus:

persson121: Everybody have told me that 16 Mhz is better if you working with time precision like a clock

That's not true.

I think both of you missed the point of why 16MHz is better than 8MHz for precision timing...

It has nothing to do with the frequency per-say, but what is generating it. 16MHz implies a 16MHz clock crystal which is nice and accurate (or to a lesser extent a resonator, which is a bit less accurate). 8MHz implies the internal oscillator (as stated in the original post), which is highly inaccurate unless tuned and even then it is very unstable when temperature and voltage fluctuations are added in.

Of course if you used an 8MHz crystal, then yes, the only real difference is that one allows you to do twice as much in the same time. Though if you are using timers, it lowers the maximum frequency of the timer.

8MHz implies the internal oscillator

No.

That is not what the OP said.

However if you want to make up a question and then answer it you are spot on.

Grumpy_Mike:

8MHz implies the internal oscillator

No.

That is not what the OP said.

However if you want to make up a question and then answer it you are spot on.

Sure about that one?

persson121: when all Atmegas and Attnyies have a 8 Mhz internal clock?

Thank you all!

I know now that 8 Mhz will work too, but cannot work as fast (or do things twice) as 16 Mhz.

But what do you mean about “The ATmega will be unstable” if the temperature increese and voltage increese?

“The ATmega will be unstable” if the temperature increese and voltage increese?

If you have a resonator or free running oscillator instead of a crystal controlling the clock then as the temperature increases so the clock frequency will change. Making things like serial communication possible not work.

Grumpy_Mike:

"The ATmega will be unstable" if the temperature increese and voltage increese?

If you have a resonator or free running oscillator instead of a crystal controlling the clock then as the temperature increases so the clock frequency will change. Making things like serial communication possible not work.

OK! I need to be sure that the ATmega is cool 8)

What is the maximum distance that an external oscillator can be away from the ATmega?

bitt of a moot point. I would say don't push it past 4cm

Grumpy_Mike: bitt of a moot point. I would say don't push it past 4cm

Ok! Close as possible is the best :)

I think we need to be a little more clear, if by external oscillator you mean a self contained oscillator that outputs a TTL square wave - A TCXO, for example - then you have more leeway as to how far the oscillator can be from the mpu. If you mean an external crystal for the mpu, it should be as close as possible.

KeithRB: I think we need to be a little more clear, if by external oscillator you mean a self contained oscillator that outputs a TTL square wave - A TCXO, for example - then you have more leeway as to how far the oscillator can be from the mpu. If you mean an external crystal for the mpu, it should be as close as possible.

Good point, many beginners think an external resonator (quartz or ceramic) and an external oscillator are the same thing, which as you say, they are most definitely not.

Guys,

I have a question regarding the use of external self contained oscillator. I am planning on using one in a future board so I can drive two chips at 16 MHz, one of them ATMega328p, from the same oscillator. I have tested it in a breadboard by loading the UNO bootloader to a bare chip and connecting the oscillator output to XTAL 1. I am testing all features and so far I have not had issues. My question is:

Do I have to change the fuse settings in order for me to use this set up?

I was under the impression that the UNO bootloader fuses are already set up for external oscillator but I read somewhere that it will need to be changed to external clock.

Let me know what you guys think.

Thanks,

Dro

The fuses are different for external clock source (i.e. an oscillator) vs external crystal, which the uC partially drives to make it oscillate. See 9.2 and 28.2/Table 28-9 of the 328P datasheet for the Low Fuse Byte. Make the changes in boards.txt and re-burn the bootloader using the IDE for them to take effect.

I also ask Why 16mhz clock however the reason I ask it is because the avrs are rated to run at up to 20mhz so why not clock it at that frequency?