English
Language : 

MCP79400_16 Datasheet, PDF (29/62 Pages) Microchip Technology – Battery-Backed I2C Real-Time Clock/Calendar with SRAM and Protected EEPROM
MCP79400/MCP79401/MCP79402
5.6 Digital Trimming
The MCP7940X features digital trimming to correct for
inaccuracies of the external crystal or clock source, up
to roughly ±129 ppm when CRSTRIM = 0. In addition
to compensating for intrinsic inaccuracies in the clock,
this feature can also be used to correct for error due to
temperature variation. This can enable the user to
achieve high levels of accuracy across a wide
temperature operating range.
Digital trimming consists of the MCP7940X periodically
adding or subtracting clock cycles, resulting in small
adjustments in the internal timing.
The adjustment occurs once per minute when
CRSTRIM = 0. The SIGN bit specifies whether to add
cycles or to subtract them. The TRIMVAL<6:0> bits are
used to specify by how many clock cycles to adjust.
Each step in the TRIMVAL<6:0> value equates to
adding or subtracting two clock pulses to or from the
32.768 kHz clock signal. This results in a correction of
roughly 1.017 ppm per step when CRSTRIM = 0.
Setting TRIMVAL<6:0> to 0x00 disables digital
trimming.
Digital trimming also occurs while operating off the
backup supply.
REGISTER 5-15: OSCTRIM: OSCILLATOR DIGITAL TRIM REGISTER (ADDRESS 0x08)
R/W-0
SIGN
bit 7
R/W-0
TRIMVAL6
R/W-0
R/W-0
R/W-0
TRIMVAL5 TRIMVAL4 TRIMVAL3
R/W-0
TRIMVAL2
R/W-0
TRIMVAL1
R/W-0
TRIMVAL0
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is clear
x = Bit is unknown
bit 7
bit 6-0
SIGN: Trim Sign bit
1 = Add clocks to correct for slow time
0 = Subtract clocks to correct for fast time
TRIMVAL<6:0>: Oscillator Trim Value bits
When CRSTRIM = 0:
1111111 = Add or subtract 254 clock cycles every minute
1111110 = Add or subtract 252 clock cycles every minute
•
•
•
0000010 = Add or subtract 4 clock cycles every minute
0000001 = Add or subtract 2 clock cycles every minute
0000000 = Disable digital trimming
When CRSTRIM = 1:
1111111 = Add or subtract 254 clock cycles 128 times per second
1111110 = Add or subtract 252 clock cycles 128 times per second
•
•
•
0000010 = Add or subtract 4 clock cycles 128 times per second
0000001 = Add or subtract 2 clock cycles 128 times per second
0000000 = Disable digital trimming
 2011-2016 Microchip Technology Inc.
DS20005009F-page 29