SUT_CKSEL decoding for ATMega6450

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, I'm getting ready to program an ATMega6450 for the first time and notice all these options for the clock source (below).  I'm using an external 32kHz oscillator (the application is an actual clock, so I'm using a precision time base).  I can tell I don't want an internal oscillator or an external xtal, but what's the difference between an EXTCLK and EXTXOSC?  And where did you find that info?  I can't find any of these prefixes in the datasheet, though I know the CKs and MSs refer to startup and wait times.  Thanks.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But surely you are not going to clock the entire AVR at just 32.768kHz?

The norm would be to put that crystal on the async clock input for timer 2 then run the AVR at 1/2/4/8MHz off the int RC, using T2 to calibrate it if required.

If battery operated then the AVR sleeps most of the time then wakes for a very quick burst of 1..8MHz activity every once in a while.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> But surely you are not going to clock the entire AVR at just 32.768kHz?

That was the plan. It will be mains powered, so power's not an issue, and time keeping and setting is all it will do. So I figured I don't need speed and it would simplify the design (slightly) if I just used the time base as the clock. What are the drawbacks?

And do you know the answers to my initial questions?

Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

lautman wrote:
it would simplify the design (slightly) if I just used the time base as the clock.

Yet you are using a '6450 for this?

 

Drawbacks?  You can't do anything useful at 32kHz.

 

If power draw is a concern, your approach draws more power than "going like heck" and then going to a deep sleep.

 

Except in a rare case, we'd run with the internal oscillator at a convenient speed, and go tp sleep until the next one second (or whatever) tick.

 

Have timer2 running in asynchronous mode with the watch crystal as its source.  Use for wakeup.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but what's the difference between an EXTCLK and EXTXOSC?

EXTXOSC - a crystal is connected between XTAL1 and XTAL2 pin.

 

EXTCLK - a complete square wave oscilator is connected to XTAL1 and GND.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just read your cross post. If you are still seeing the text EXTCLK and EXTXOSC then your copy of Studio is out of date. Atmel have finally fixed AS7 to use the same wording as Studio 4 and engbedded.com which is far less confusing.