Using TOSC (RTC) with 32K clock (not XTAL)

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

Hello all,

We are designing a board, and a 32K clock source is already available on the board (it is needed elsewhere).

I would like to connect this clock source to the RTC, probably via TOSC1, although there is no explicit support for an external clock on this pin (as opposed to an external crystal). Target device is the ATxmega32A4 (only the 16-bit RTC, not the 32-bit, if that helps)

I'm guessing I will have to turn on the 32K xtal oscillator, but leave TOSC2 unconnected.

Has anyone used this strategy before?

-- Damien

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

It is supposed to work if your input 32K signal on TOSC1 pin will not be too high (probably below 500mV p-p).

I have done something similar before, not with Atmel devices though.

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

I too am looking at options for doing this. I am a bit reluctant to ship a product with an oscillator attached to TOSC1 instead of a crystal, but there might be other ways of doing this.

I was thinking of attaching the 32.768KHz oscillator to the XTAL1 pin so it can drive a timer. That time would then be used to calibrate the 32.768KHz watch crystal on the TOSC pins by varying the RTC period. It might be possible to do this during manufacturing at room temperature to avoid having to put a TCXO on the board, or it could be done say once an hour in the field.

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

I am experimenting with temperature compensating a normal 20PPM watch crystal. The temperature curve is easy to do with a lookup table based on the datasheet, but to get the initial offset I need to calibrate against an accurate 20MHz clock.

My aim is to get down to 10PPM, which should give an error of about 30 minutes over a five year lifespan.

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

Use one of the Dallas-Maxim temperature compensated RTCs and you could have 2ppm

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

Our application is very cost sensitive so we don't want to drop a few pounds on a TCXO. They are not magic, they just use a lookup table and factory calibration the same as I am doing, the real difficulty is in getting the calibration stage right.

There is a Microchip app note about it (AN1155 IIRC).

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

I have been experimenting with this and am finding that I get a fairly consistent amount of drift from the watch crystal. I am doing the calibration at ~25C which is the peek of the temperature/frequency error curve for most xtals. Therefore I am measuring the divergence from an accurate 32KHz before compensating for temperature.

At the moment I am using the crystals on two Xplained boards, so I don't have datasheets for them. They look like fairly standard +/-20PPM SMT parts.

Over 1 minute I see an error of 54 clocks consistently. 1PPM is a little under in 30 seconds, so 54/min is around the 20PPM claimed by most xtals.