Clock Signal TOSC1 TOSC2

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

Hello everybody. 

 

i have use microcontrollers like the atmega328 and atmega2560 that have two pins called XTAL1 and XTAL2, the classic oscillator circuit. BUT in microcontroller like atmega1284p i have seen two aditional pins called TOSC1 and TOSC2, reading about the topic its says that are for a clock signal.

 

my two question are:

 

1.in wich kind of apllication do you need that for?

or better say.

When and why have you aplied this instead of just use the oscillator XTAL1 and XTAL2?

 

2. if i dont need to use a clock signal of 32768 hz to no thing. do i need to add one crystal or oscillator in those pins(TOSC1 and TOSC2) or can just ignore it?

 

thanks and sorry if im not being clear this is really new for me

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

CPU runs on main clock e.g. RC, HF crystal
Timer can run on TOSC e.g. LF crystal to implement a Real Time Clock
.
Mega328 does not have enough pins for HF crystal on XTAL and LF crystal on TOSC pins.
If you want to use TOSC on a mega328 you must use internal RC. Which is fine i.e. accurate TOSC to keep time when mega328 sleeps. When awake the mega328 works fast on the RC
.
Bigger chips can have separate pins and use HF crystal as well as LF crystal for TOSC.
.
Incidentally most AVRs can use a LF crystal as main clock. Excellent for a paint drying application. Or for crippling your project.
I have never seen a good reason to run an AVR very SLOW. Much better to run fast when awake and sleep often.

Last Edited: Wed. Oct 2, 2019 - 06:41 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1) The use of a 32.768k on TOSC is often in battery apps that sleep a lot and that want to wake from sleep quite quickly but that also need an accurate clock. So you run the async timer from the crystal. From time to time you use it to calibrate the internal RC. The AVR itself runs from intRC. But it is as accurate as the crystal. When it wakes from sleep there is not the usual crystal resonance start up delay but an almost "instant on".

 

2) it's up to you whether you want to use it - mist projects don't. If they need an accurate clock they just put a crystal on XTAL1/XTAL2 

 

So it all comes down to the function of your application and what its clock requirements are.