cancel
Showing results for 
Search instead for 
Did you mean: 

How to calibrate M41T00

mailtoarup
Associate II
Posted on May 11, 2007 at 03:58

How to calibrate M41T00

8 REPLIES 8
mailtoarup
Associate II
Posted on January 06, 2007 at 02:01

Dear Sir,

I would like to calibrate my M41t00 rtc which is running slow.It's running with 32.768kHz crystal.I am going by instructions provided in page no 15 & 16 in M41T00 datasheet under section clock calibration.

I have set the 'FT' bit(i.e D6 of control register) to 1.

I checked the frequency at FT/OUT pin(pin 7) of m41t00.It is found to be 511.967 Hz.Which is 0.033 short of 512Hz. so it's indicating -64.45 ppm osc frequency error.

So i have to do +ve calibration.i.e bit D5=1

Now please tell me what should be written in bits D0 ... D4.

Please could any one explain me how to calculate the calibration bits(D4..D0) value ?

Thanks & Regards,

Arup

sisto
Associate II
Posted on January 06, 2007 at 05:43

This attached Excel file may help You. If You have other MT41T00 questions don'e exitate to ask.

Sixtus

________________

Attachments :

MT41T00_Calibration_Calc.xls.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0F8&d=%2Fa%2F0X0000000bVy%2FV0UZKoWvIp_KcYcSZJTxSUs2Y2k8Rz4XIwJ7QUPVRuE&asPdf=false
mailtoarup
Associate II
Posted on January 06, 2007 at 06:30

Dear Mr. sixtus,

Thanks for your reply.Received your attached file.Yes,it calculates the desired calibration.

But i need to know how to calculate the calibration bytes from calculated osc error in ppm as i mentioned in my previous mail.

I will be thankful if you could explain me the method to achieve this.

As per your xl sheet My calibration bytes calculated is 48.it is said that this value is inclusive of sign bit.

First Q.: How to find the above value ?

2nd Q.: is the value is in hex?

in that case it is : 01001000 in binary .

i.e FT bit is '1'. But Sign bit is '0' i.e means it is doing -ve calibration.But it should be +ve calibration as per my case.isn't it?

so calibration byte(D4...D0) -> 8 it's ok?How ?

Hope to get a reply.

regards,

Arup

sisto
Associate II
Posted on January 06, 2007 at 14:04

Hi Mr Arup,

I will be thankful if you could explain me the method to achieve this.

Definitions :

ppm = (delta_freq/512)*10^6

delta_freq = freq - 512

pls click and look the formula at E2 cell (calibration Value)

We can have two conditions :

A) ppm < 0 means frequency out (FT) < 512Hz so you need to add some pulses to compensate.

The calibration formula is : ((|ppm|*32*2,592)/337)+32 [the ''S'' bit = 1 (D5)]

For example :

FT freq = 511,968

ppm = -62,5

Corr Value = 48 --> 0b00110000 ; bit D5 = 1

B) ppm > 0 means frequency out (FT) > 512Hz so you need to subtract some pulses to compensate.

The calibration formula is : ((ppm*32*2,592)/169) [the ''S'' bit = 0 (D5)]

Example :

FT freq = 512,029876

ppm = 58,35

Corr Value = 28 --> 0b00011100 ; bit D5 = 0

Sixtus

sisto
Associate II
Posted on January 06, 2007 at 14:23

Hi Arul,

I tell You some informations concerning the calibration mechanism.

The calibration byte occupies the five lower order bits in the MT41T00 Control Register.

These bits represent the binary value between 0 and 31.

Each bit represents in real time for the TIMEKEEPER® product line. The sixth bit is a sign bit. A binary “1� indicates a positive calibration (added pulses), and a binary “0� indicates a negative calibration (blanked pulses).

Calibration occurs within a 64-minute cycle. The first 62 minutes in the cycle may, once per

minute, have one second either shortened by 128 or lengthened by 256 oscillator cycles. If a binary “1� is loaded into the register, only the first 2 minutes in the 64-minute cycle are modified; if a binary “6� is loaded, the first 12 are affected, and so on.

Therefore, each calibration step has the effect of adding 512 or subtracting 256 oscillator cycles for every 125,829,120 actual oscillator cycles (64 minutes x 60 seconds/minute x 32,768 cycles/second).

That is, +4.068 or –2.034 ppm of adjustment per calibration step in the calibration register. Assuming that the oscillator is running exactly at 32.768 kHz, each of the 31 increments in the calibration byte represent +10.7 or –5.35 seconds per day, which corresponds to a total range of +5.5 or –2.75 minutes per month.

I hope to be helpful.

Sixtus

mailtoarup
Associate II
Posted on January 10, 2007 at 01:55

Thanks Mr. sixtus ,

Thanks very much for your kind reply. Can you give few comments on how did you formulate the concept of adding or subtracting few pulses ??

And the resulted value is inclusive of sign bit.

Can you give your comments on the formulae ?

Thanks for sharing your ideas.

Regards,

Arup

sisto
Associate II
Posted on January 10, 2007 at 17:11

Hi Arup,

The calibration mechanism is a patented ST TIMEKEEPER solution.

See attached file

Sixtus

________________

Attachments :

TimeKeeper.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzmR&d=%2Fa%2F0X0000000bVx%2F2896zwI7ckvpKWMZWjjVGDEh22RmiVUc6rwlS4.4bIM&asPdf=false
mailtoarup
Associate II
Posted on May 11, 2007 at 03:58

Dear Mr. sixtus,

Hope you are doing fine.Once again i have few query regarding M41t00 timekeeper.As of now i do the folllowing:

1)set the 'FT' bit(i.e D6 of control register) to 1.

2)Check the frequency at FT/OUT pin(pin 7) of m41t00 in CRO.

3)Find out the ppm error.and calculate calibration value as per excel sheet.

4)Update the Calibration bit D4....D0.

But i find the calibration procedure is bit time consuming from production point of view.

Can you suggest me any calibration procedure(including hardware modification) faster than above i.e auto calibration.

How about building a firmware using ST7 which can sense FT/OUT pin frequency and calibrate accordingly?

Any suggestion will be appreciated.

Regards,

Arup