Forum: µC & Digital Electronics MCP7940N: MFP frequency out and calibratio

von Hartl192 (Guest)

Rate this post
0 useful
not useful
I'm not sure how the MFP pin works if I set the SQWE to '1' and the RS2 
bit to '1'.
Which output frequencies can I select with <RS1:RS0>? Is the frequency 
64Hz regardless of what I do with R0 and R1?
My aim is to calibrate the oscillator. I made myself a counter with a 
GPS modem as reference and a gating time of 60 seconds.
Is it possible to output the 32.768Hz (RS<2:0> = 011) signal and count 
the pulses for 60s and then calculate the calibration factor? After 
writing the calibration factor in the calibration register I'll output a 
calibrated wave by setting RS2 to '1' and measure if the calibration is 
Is this a good way to do the calibration? Or can you recommend me 
another way? My best device to measure time/frequency is the 
GPS-frequency counter.

Thank you in advance for your help.


von Hartl192 (Guest)

Rate this post
0 useful
not useful
I measured the frequency of the MPF output and it is 32767.166666Hz and 
this produces an error of about 2 second every day. Now I want to use 
the calibration function but I’m not sure if calculated the calibration 
factor right.

I measured 1966030 pulses in one minute, but it should be 

1966080-1966030=50, so I have to add 50 pulse per minute. Does it means 
that I have to write 25 (0b00011001) in the calibration register?


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.