Capacitors for TOSC pins on AT90USB1286 w/ 32.768kHz Crystal

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

Hi every one,it's me again asking questions.
I have built an RTC on AT90USB1286 with a 32.768kHz Crystal attached to the TOSC pins using Asynchronous Timer feature and I am trying to figure out what should be the values of the capacitors connected to the pins.
Firstly,do I need external capacitors?
I believe I do.Datasheet states "The device can operate its Timer/Counter2 from an external 32.768 kHz watch crystal or a external
clock source. See Figure 6-2 on page 42 for crystal connection". Figure 6-2 shows capacitors connected to pins,not the TOSC pins but the XTALs. So,to calculate the required external capacitors, I use this formula:

Ce = 2 * CL - Cs

where:
Ce - is the external capacitor
CL - is the load capacitance for a 32.768kHz crystal specified by the crystal vendor
Cs - is the total stray capacitance for one TOSC pin.

So,is this correct?I will assume Cs=3pF.
But if that is correct,should I be worried about "an internal load capacitance at each TOSC pin" as specified to the ATMega48PA family datasheet(p.32,doc8161.pdf)?
And it would be understandable if someone asked:"is he blind?that's an other mcu and has deferent specs".
But Atmel's tech support thinks deferent.
To Atmel tech support:
"I am currently developing a product that includes a Real time clock.I am using the AT90USB1286 device with a 32.768khz crystal attached to the TOSC1 and TOSC2 pins.I would like to know the total stray capacitance for each one of the TOSC pins because it's not clearly stated in the datasheet of this particular avr.I have found the corresponding values for the ATmega48PA/88PA/168PA family as described in the datasheet at page 32 Table8-8 (doc8161.pdf). Are these values similar to the mcu I use?"
Answer:
"The value is similar to that of the mega device ATmega48PA. Sorry for not having that mentioned in datasheet."

That changes Cs to 18pF+3pF for TOSC1 and 8pF+3pF for TOSC2.
So which is correct?

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

Yes you will definitely need some capacitance.....
If you want a really accurate RTC then it is common practice to make one of the caps a variable cap. If you just want nominal accuracy then start with something close to the specified Cl... 10pf?.
If your project is susceptible to large variations in temperature (say 5-30C) then you will never get a super accurate RTC. Watch crystals are designed to run at body temperature (WRT their accuracy v temp curve).

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

Quote:
Firstly,do I need external capacitors?

I have used TOSC pins with no caps on several models (including AT90USB1287).
I believe this is what Atmel recommend.
Have noticed though that AT90USB1287 seem less accurate than other models such as m32 or m644 to keep time.
There will always be some inaccuracy using TOSC pins for RTC.

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

Quote:

There will always be some inaccuracy using TOSC pins for RTC.

Won't there ALWAYS be "some inaccuracy" in any timekeeping device? :twisted:

Quote:

Yes you will definitely need some capacitance.....

Quote:

I have built an RTC on AT90USB1286 with a 32.768kHz Crystal attached to the TOSC pins using Asynchronous Timer feature and I am trying to figure out what should be the values of the capacitors connected to the pins.
Firstly,do I need external capacitors?

The datasheet for that AVR model seems sketchy in that area. (For example it refers to a diagram on the XTALn pins but you want the TOSCn pins.) Now, I'll make an assumption that AVR models of the same era have similar features, and thus the TOSC in your '1286 runs about the same as on a e.g. '164.

First I'd recommend looking at the datasheet for the Mega164PA, (Section 9.5 in one version) Low Frequency Crystal Oscillator. then in addition pull up a recent "Migrating ..." app note from Atmel that will have a discussion of 32kHz crystals.

My short answer is that we don't use external caps with our watch crystals on modern AVR models. But it depends on your selection of an appropriate crystal as described in the references I gave.

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

This general information ATMEL application note and software has some additional information.

AVR4100: Selecting and testing 32kHz crystal oscillators for AVR microcontrollers
http://www.atmel.com/Images/doc8...
http://www.atmel.com/Images/AVR4...