Loading...
Pages: [1]   Go Down
Author Topic: Clock Choices  (Read 490 times)
0 Members and 1 Guest are viewing this topic.
Be Excellent To Each Other
Offline Offline
God Member
*****
Karma: 8
Posts: 857
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for moving this, I guess it deserved its own thread.

This question concerns the Atmel programmer's fuse options and the fuse choices as listed on the fuse calculator at http://www.engbedded.com/fusecalc/

One thing I have never understood well is the clock choices.  I always use a 16mhz crystal with 2 22pf caps and select the last on the list and it works.  What do the clock selections mean?

Ext. Clock; - true square wave signal?  Applied to which pin?
Int. RC Osc. 8 MHz - OK, I know what this means.
Ext. Low-Freq. Crystal - no idea how this varies from the bottom one.
Ext. Full-swing Crystal - no idea how this varies from the bottom one.
Ext. Crystal Osc. - OK, I get this, but have never seen anyone suggest one other than the 16 mhz crystals.  Some of the chips are rated for 20mhz, do you just use a 20mhz crystal to achieve that?

What do the other values mean, e.g. "Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms;"  Total confusion there.

Would love a quick schooling on these matters if anyone wants to chime in.

Quote
Ext. Clock; Start-up time PWRDWN/RESET: 6 CK/14 CK + 0 ms;  
Ext. Clock; Start-up time PWRDWN/RESET: 6 CK/14 CK + 4.1 ms;
Ext. Clock; Start-up time PWRDWN/RESET: 6 CK/14 CK + 65 ms;  
Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 0 ms;  
Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 4.1 ms;
Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 65 ms;  
Int. RC Osc. 128kHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 0 ms;  
Int. RC Osc. 128kHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 4.1 ms;
Int. RC Osc. 128kHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 65 ms;  
Ext. Low-Freq. Crystal; Start-up time PWRDWN/RESET: 1K CK/14 CK + 0 ms;  
Ext. Low-Freq. Crystal; Start-up time PWRDWN/RESET: 1K CK/14 CK + 4.1 ms;
Ext. Low-Freq. Crystal; Start-up time PWRDWN/RESET: 1K CK/14 CK + 65 ms;  
Ext. Low-Freq. Crystal; Start-up time PWRDWN/RESET: 32K CK/14 CK + 0 ms;  
Ext. Low-Freq. Crystal; Start-up time PWRDWN/RESET: 32K CK/14 CK + 4.1 ms;
Ext. Low-Freq. Crystal; Start-up time PWRDWN/RESET: 32K CK/14 CK + 65 ms;  
Ext. Full-swing Crystal; Start-up time PWRDWN/RESET: 258 CK/14 CK + 4.1 ms;
Ext. Full-swing Crystal; Start-up time PWRDWN/RESET: 258 CK/14 CK + 65 ms;  
Ext. Full-swing Crystal; Start-up time PWRDWN/RESET: 1K CK /14 CK + 0 ms;  
Ext. Full-swing Crystal; Start-up time PWRDWN/RESET: 1K CK /14 CK + 4.1 ms;
Ext. Full-swing Crystal; Start-up time PWRDWN/RESET: 1K CK /14 CK + 65 ms;
Ext. Full-swing Crystal; Start-up time PWRDWN/RESET: 16K CK/14 CK + 0 ms;  
Ext. Full-swing Crystal; Start-up time PWRDWN/RESET: 16K CK/14 CK + 4.1 ms;
Ext. Full-swing Crystal; Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms;
Ext. Crystal Osc.; Frequency 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 258 CK/14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 258 CK/14 CK + 65 ms;  
Ext. Crystal Osc.; Frequency 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 0 ms;  
Ext. Crystal Osc.; Frequency 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 65 ms;
Ext. Crystal Osc.; Frequency 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 0 ms;  
Ext. Crystal Osc.; Frequency 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 0.4-0.9 MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms;
Ext. Crystal Osc.; Frequency 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 258 CK/14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 258 CK/14 CK + 65 ms;  
Ext. Crystal Osc.; Frequency 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 0 ms;  
Ext. Crystal Osc.; Frequency 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 65 ms;  
Ext. Crystal Osc.; Frequency 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 0 ms;  
Ext. Crystal Osc.; Frequency 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 0.9-3.0 MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms;  
Ext. Crystal Osc.; Frequency 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 258 CK/14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 258 CK/14 CK + 65 ms;  
Ext. Crystal Osc.; Frequency 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 0 ms;  
Ext. Crystal Osc.; Frequency 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 65 ms;  
Ext. Crystal Osc.; Frequency 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 0 ms;  
Ext. Crystal Osc.; Frequency 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 3.0-8.0 MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms;  
Ext. Crystal Osc.; Frequency 8.0-    MHz; Start-up time PWRDWN/RESET: 258 CK/14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 8.0-    MHz; Start-up time PWRDWN/RESET: 258 CK/14 CK + 65 ms;  
Ext. Crystal Osc.; Frequency 8.0-    MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 0 ms;  
Ext. Crystal Osc.; Frequency 8.0-    MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 8.0-    MHz; Start-up time PWRDWN/RESET: 1K CK /14 CK + 65 ms;  
Ext. Crystal Osc.; Frequency 8.0-    MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 0 ms;  
Ext. Crystal Osc.; Frequency 8.0-    MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 4.1 ms;
Ext. Crystal Osc.; Frequency 8.0-    MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms;  
« Last Edit: November 06, 2012, 01:12:43 am by JoeN » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 270
Posts: 17051
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Best schooling is to read the data sheet.  Section 9 is clock and start up cycles section.
Then come back & ask again.

http://www.atmel.com/Images/doc8271.pdf
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17

Offline Offline
Full Member
***
Karma: 6
Posts: 145
Knowledge is proportional to the number of parts destroyed.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What do the other values mean, e.g. "Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms;"  Total confusion there.

 

What they're saying is, when the processor is started it will not start running its program until after it has determined the clock is stable and (hopefully) on frequency. In the example I just quoted, they don't guarantee that will happen until after 16000 (16K) clock cycles have passed from a fully powered-down state (PWRDWN) or 14 clock cycles plus an extra 65 milliseconds after a RESET. You'll note that it's much faster after a RESET because the crystal is already oscillating. (If you are using a 16 MHz crystal, 16K cycles would be 1 mS.)

Quote
Ext. Clock; - true square wave signal?  Applied to which pin?
Yes, XTAL1

Quote
Ext. Low-Freq. Crystal - no idea how this varies from the bottom one.
It's used with low frequency crystals, typically around 32 KHz.

Quote
Ext. Full-swing Crystal - no idea how this varies from the bottom one.
There are two modes, low power and full-swing. Low power uses the least power but occasionally you'll run across a crystal that doesn't like it. Also, you cannot use XTAL2 as an external clock to drive other devices. Full-Swing mode uses more power and is capable of driving several other devices from XTAL2.

Quote
Some of the chips are rated for 20mhz, do you just use a 20mhz crystal to achieve that?

Yes, you can use a 20 MHz crystal. You may even be able to get it to oscillate at an even higher frequency (I've seen some chips work up to 24 MHz @ 5V.) But Atmel only guarantees operation to 20.




 
Logged

Be Excellent To Each Other
Offline Offline
God Member
*****
Karma: 8
Posts: 857
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That was all I was asking for and it was extremely informative.  I didn't know that if you used the internal clock you automatically got those GPIO ports freed and got one freed with an external clock.  There were good definitions of why when when to use the different clocking options and what those delays are for.  It answered all my questions.  Thanks again.

Telecommando, thank you too.  I didn't really grasp the difference between full swing and low power crystals and now I am going to do some more research on that topic.
« Last Edit: November 06, 2012, 02:04:22 pm by JoeN » Logged

Offline Offline
Edison Member
*
Karma: 114
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

All of those can be found in the datasheet.

Quote
Ext. Clock; - true square wave signal?  Applied to which pin?

Doesn't matter. Applied to XTAL1.

Quote
Ext. Low-Freq. Crystal - no idea how this varies from the bottom one.

32Khz. Those other frequencies (typically less than 1Mhz) also work.

Quote
Full-swing Crystal - no idea how this varies from the bottom one.

High drive power. Typically for high frequency crystals or noisy environment. More current / power consumption.

Quote
Ext. Crystal Osc. - OK, I get this, but have never seen anyone suggest one other than the 16 mhz crystals.  Some of the chips are rated for 20mhz, do you just use a 20mhz crystal to achieve that?

Yes, you can use other frequencies as well - from DC to whatever specified. Overclocking is also possible - I have ran them at 32Mhz no problem.
Logged

Pages: [1]   Go Up
Print
 
Jump to: