Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / Low-Frequency Timing and System Power

Checking One-Hot Versus Numeric Weekday Encoding After an RTC Replacement

After changing a logger's RTC, the display shows correct dates and seconds, but exported weekdays sometimes jump or turn into numbers. Verify raw weekday byte and displayed weekday for the same date before adjusting 32.768 kHz. Date and weekday may use different encodings.

One byte can mean different weekdays on two RTCs

Epson's RX-8035SA/LC uses three active bits and values zero through six. Its sample assignment starts Sunday at zero and Monday at one. Verify actual initialization. RX8900SA/CE uses a seven-bit one-hot field, with exactly one asserted bit. Starting from Sunday, the hexadecimal values are 01, 02, 04, 08, 10, 20, and 40, rather than 00, 01, 02, 03, 04, 05, and 06.

Hex 02 is Tuesday in a zero-based Sunday sequence but Monday in the one-hot map. Hex 04 can be misread as Thursday rather than Tuesday. If old code masks 08 down to three bits, it may become zero and display Sunday. Keep raw and interpreted values together.

These are examples of encodings, not drop-in compatibility. Also verify interface timing, condition registers, backup power, pins, and logic thresholds.

Three consecutive weekdays illustrate the difference

In 2026, November 30 is Monday, December 1 Tuesday, and December 2 Wednesday. Use synthetic after-midnight records with known inputs as shown, without assuming every device gives them.

DateNew raw valueOne-hot interpretationWrong ordinal interpretation without masking
2026-11-300x02MondayTuesday
2026-12-010x04TuesdayThursday
2026-12-020x08WednesdayInvalid

When errors follow values rather than elapsed seconds, clock adjustments do not fix decoding. One weekday may match by chance under different Monday-based conventions. Verify all seven days and Saturday-to-Sunday wrap. Document display, export, and aggregation conventions.

Zero or multibit values are invalid for this one-hot field. Do not select an arbitrary bit or rewrite dates. Retain raw value, date, and read point for diagnosis. Keep malformed examples offline and respect reserved bits.

Follow the value through the driver, display, and export

Begin with offline decoding. Record old and new fields, normalized value, and exported label. Cover all seven days, the week and month boundaries, and invalid cases. Check masks, decimal versus hexadecimal, and old starting-day assumptions.

Verify readings share one instant. On an approved isolated low-voltage board, retain time, date, and weekday through authorized read-only observation. Follow the device's snapshot rules around midnight or record the transaction for each field. An old date with a new weekday differs from misreading 02. If the error also occurs at midday, midnight cannot explain it all.

Define one internal representation. Normalize each device upstream and keep raw values. State whether Sunday is zero or seven. A Monday-start reporting layout must not redefine the raw field. Label a weekday calculated from the date as derived.

Distinguish initialization from runtime interpretation. A wrong initial weekday can stay consistently shifted even as the RTC advances normally. Larger jumps tied to expected one-hot values instead suggest decoding. Retain the characteristic pattern.

Specify interface compatibility as well as clock accuracy

Epson's RX8900CE is a candidate for designs needing an integrated crystal RTC. Verify exact order configuration, electrical and temperature limits, and application guidance. Specify weekday encoding, backup validity, alarm, and supply behavior in addition to 32.768 kHz and calendar functions. Each changed field needs review before reusing a driver.

For lot acceptance, keep one raw case and expected wording for each mapping. Verify display and export using the same fixtures and record cycle and initialization rules. Preserve pre- and post-change labels and lots, and test weekends and month boundaries as well as workdays.

Frequently asked questions

Can the display derive weekday from the date? It can under explicit calendar rules if that is the only purpose. Retain the RTC field for diagnostics. Other RTC weekday functions still need verification.

Can timekeeping drift and weekday decoding both fail? Verify drift against time and decoding against known fields. Neither result replaces the other.

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.