Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Clock, Timer, Xtal, Serial andTOSCI confusion

2006-01-14 by Thomas Keller

Ted Smith wrote:

>Hi, I want to build a simple ATmega16 device with no xtals if possible
>and I am confused after reading the ATMega16 data sheet.
>
>1. Do the timer intervals rely on the frequency of the main xtal or do
>they somehow automatically change if you change the main xtal.
>2. If you have no xtal does this affect the timers much?
>3. Will the Timers work if you have no Xtal connected to the TOSCI pins?
>4. Does the Xtal frequency affect the serial input baud rate?
>  
>
1)  of the main (or system) clock, yes.  Though on almost all AVRs, and 
IIRC, the ATMEGA16 is onme of them,  you can disable the external clock 
connections )e.g., no crystal or resonastor) and run on the internal 
"calibrated RC clock." typically at 8 Mhz.

2)  Yes.  Because the RC oscillator on board has a much hiugher 
temperature coefficient than a crystal or a ceramic resonator would.  So 
as temperature changes, so will your sytem clock freqyency.

3)  Yes.  So long as you select the correct mode for thre system clock, 
utilizing the calibrated intenral RC oscillastor, as described above.

4)  Yes.  The baud rate generator is driven by the system clock, and you 
must select the correct settings for the baud rate generator divider, to 
generate the correct baud rate clock for the desired serial 
vcommunicaitons speed. 

  All of this is very clearly documented in the ATMEGA16 data sheet.

tom

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.