Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / Digital Interfaces and Clock Division

Diodes PT7C43390 Crystal RTC Calibration: Why Does Correction Value 106 Not Encode as D4h?

The PT7C43390 manufacturer's worked example writes decimal 106 as seven-bit binary 1101010, reverses those seven bits, and places them into B7 through B1. B0 is zero in this example, so the eight-bit register value is 01010110, or 56h. Simply left-shifting 106 yields D4h, without the required seven-bit reversal. Validate this in the encoder and its offline tests rather than changing bus transmission order. The example establishes an encoding vector, not a calibration setting for other errors or another board.

Separate the Calculated Number, Field Order and Register Value

StagePublished example or derivationCode check
Calculated resultDecimal 106Not a complete register value
Seven-bit representation1101010Seven positions, not an already packed byte
Reversed field0101011 from B7 through B1Match exact position ordering
Example with B0=001010110, or 56hUse as an offline test vector

Page 28, Calculation Example 1, begins with measured and target frequency, obtains 106, and then lists the final bits. The clearest software test uses that direct mapping. Seven-bit 106 is 1, 1, 0, 1, 0, 1, 0 from left to right. Reversal gives 0, 1, 0, 1, 0, 1, 1. Assign that sequence to B7 through B1 and add the independent B0. The leading zero matters even if a hexadecimal display hides its role in the field width and direction.

Distinguish decimal and hexadecimal labels. Decimal 106 is 6Ah, not the complete register byte. Shifting 6Ah left once produces D4h and leaves the seven field bits in their original order. The example specifies their reversal. Logging 106, 6Ah and 56h under one “correction value” caption invites a service engineer to write an intermediate number. Label the computed number, logical bit field and packed byte separately, retaining the base and width.

Bit Reversal Is Not a Change to Byte Endianness or the Bus

Byte endianness usually describes groups of bytes; the evidence here concerns seven positions within one byte. It does not authorize reconfiguring the I²C controller's general ordering or reversing other registers. The protocol and a field's encoding are distinct and should be checked against applicable documentation. Generate the expected byte offline before using any approved device communication procedure.

Reversing a complete eight-bit value is also not the same as reversing seven positions first. An eight-bit reversal can move the independent B0. Instead, map the lowest bit of the seven-bit value to B7, then the next lowest to B6, continuing until the highest maps to B1. Retain B0 separately. Reproducing 56h checks the field ordering for this exact vector. It does not establish the legal range or sign convention for arbitrary corrections; those are separate calibration-algorithm checks.

Verify the Readback Decoder Independently

To recover the calculated number, extract and reverse B7 through B1. For 56h the extracted sequence is 0101011. Reversing it gives 1101010, or 106, and B0 remains zero. This helps service teams reconcile raw readback with calculation logs. But round-trip consistency is not independent evidence. An encoder and decoder with matching mistakes can cancel each other. Use an independently obtained expected vector from the published bits.

Use three offline cases: encoding 106 and B0=0 gives 56h; decoding 56h yields 106 and its separate B0; and a byte built from the incorrect shift, D4h, does not match the example's expected word. The last is a negative assertion for this case, not a claim that D4h is invalid in every other configuration. Check that the UI retains both the raw readback and calculated number. If they disagree with the source, review width, bit placement and presentation before blaming the crystal.

Do Not Merge Two Separate Datasheet Examples

Page 29 contains a separate check of calibration results showing B0=0 and 66h, with measured-frequency figures. It is not the input used on page 28 to demonstrate encoding 106. Record each example's name, page and distinct input. The page 28 bit diagram is the source for this software encoding test. Do not use a separate set of frequency observations to claim general measured performance.

Release evidence also distinguishes what the calibration algorithm computed, what the driver packed into the register, and what performance verification actually demonstrated. The first two alone do not specify remaining time error. Retain the document edition, approved setup and measured evidence. If an actual board's approved setting is unknown, do not write 56h as a recommendation. The example tests an encoder; it does not set the same correction on arbitrary crystals. Handoff should allow the next engineer to repeat the encoding analysis before opening a separate measurement investigation.

An offline interface should also reject ambiguous input. A handoff value of “106” could be a decimal result, hexadecimal capture or identifier. Do not guess. A diagram without labeled directions is also insufficient to assign register positions. Retain seven positions so the leading zero is not accidentally dropped by export. A compact display can accompany a separately labeled bit trace. Two teams can then reproduce the mapping despite different display formats.

To prevent an encoder and decoder from making the same mistake, keep an independently transcribed vector from the datasheet and check it with a separate implementation. Acceptance should show the computed 106, raw byte, field width and independent B0. When the source changes, review the mapped positions, not just whether the final hex matches. A pattern that looks the same in both directions is a poor sole test.

When diagnosing a real capture, distinguish raw bytes from the interface's interpretation. If only the displayed decode is wrong, inspect the parser before changing the board. If the raw result differs, confirm that the example inputs apply and that the evidence belongs to the intended device and configuration.

Frequently Asked Questions

If I capture 56h, should I reverse my analyzer or I²C controller's bit order?

Not on this basis. 56h is the documented register encoding for the example. Verify the logical field offline and check bus transport separately under its actual convention.

Why not use the 66h shown on page 29 as the answer for 106?

Page 29 is a separate result-confirmation example. Page 28 explicitly shows the reversal and all eight register positions for 106. Keep the two examples separate.

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.