High-Stability Time Adjustment with Real-Time Clock Module



Similar documents
DS1307ZN. 64 x 8 Serial Real-Time Clock

Precision Time Protocol (PTP/IEEE-1588)

Evaluating the Accuracy of Maxim Real-Time Clocks (RTCs)

Delivering NIST Time to Financial Markets Via Common-View GPS Measurements

RENESAS TECHNICAL UPDATE

WA Manager Alarming System Management Software Windows 98, NT, XP, 2000 User Guide

Securing GNSS with PTP & SyncE Adam Wertheimer Microsemi Adam.Wertheimer@microsemi.com. Power Matters

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

DS Real Time Clock FEATURES PIN ASSIGNMENT PIN DESCRIPTION

71M6521 Energy Meter IC. Real Time Clock Compensation. The Challenge. The RTC in the 71M6521D/F. Theory of Operation APPLICATION NOTE

CMG-RTM Real-time Clock/ GPS Emulator

A Lesson on Digital Clocks, One Shots and Counters

A Lesson on Digital Clocks, One Shots and Counters

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

Application Note 58 Crystal Considerations with Dallas Real Time Clocks

GPS NTP Time Server for Intranet Networks DIN RAIL Version

DS1621 Digital Thermometer and Thermostat

AN_6521_035 APRIL 2009

AN3371 Application note

Cascaded Counters. Page 1 BYU

Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol

The Model A032-ET of Riga Event Timers

GTS-4E Hardware User Manual. Version: V1.1.0 Date:

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

MicroMag3 3-Axis Magnetic Sensor Module

Controller Automation, Model II+

Programmer/Controller

Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:

Section 29. Real-Time Clock and Calendar (RTCC)

A High Resolution Performance Monitoring Software on the Pentium

EVAL-UFDC-1/UFDC-1M-16

Computer Time Synchronization

Real Time Clock USB Evaluation Board V3.0

RS - SPM. Serial parallel translator module

2.0 System Description

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

64 x 8, Serial, I 2 C Real-Time Clock

Old Company Name in Catalogs and Other Documents

Chapter 6: From Digital-to-Analog and Back Again

Location-Aware and Safer Cards: Enhancing RFID Security and Privacy

GPS NTP TIME SERVER Rack Version V2

Real Time Clock Module with I2C Bus

LC7218, 7218M, 7218JM

Application Note Synchronization and MIMO Capability with USRP Devices Ettus Research

Wireless Temperature

ASYNCHRONOUS COUNTERS

The Autolab control command is located in the Measurement General group of commands.

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

AN974 APPLICATION NOTE

4310/4320 Wireless Position Monitor Burst Configuration and Diagnostics

Data Sheet. Microprocessor compatible real time clock IC RS stock number

AN4646 Application note

Indoor / Outdoor Antenna

DP8570A DP8570A Timer Clock Peripheral (TCP)

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

HANDBOOK. Measuring System DESIGN EDITORS PETER H. SYDENHAM RICHARD THORN ARTICLE OFFPRINT

GPS NTP TIME SERVER Rack Version V2.2x

css Custom Silicon Solutions, Inc.

Application Note 58 Crystal Considerations for Dallas Real-Time Clocks

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

BINARY CODED DECIMAL: B.C.D.

Use of modern telephone network for time transfer: An innovation

APPLICATION NOTE. AT03155: Real-Time-Clock Calibration and Compensation. SAM3 / SAM4 Series. Scope

WS2812B Intelligent control LED integrated light source

DS1621 Digital Thermometer and Thermostat

CONCEPT1 RS232 COMMUNICATION

TONE/PULSE DIALER WITH REDIAL

Table 1 below is a complete list of MPTH commands with descriptions. Table 1 : MPTH Commands. Command Name Code Setting Value Description

HP03 BAROMETER MODULE Version: 1.1

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

INSTRUCTION. The smallest GPS watch locator in the country

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

HT1632C 32 8 &24 16 LED Driver

A Laser Scanner Chip Set for Accurate Perception Systems

TURBOtech srl. SED-635 Digital Excitation System. Industrial Electronics Sector FEATURES

Counters and Decoders

(Refer Slide Time: 00:01:16 min)

PC Clock Accuracy. To pick a random (UK) time server use 0.uk.pool.ntp.org, 1.uk.pool.ntp.org, 2.uk.pool.ntp.org or 3.uk.pool.ntp.org.

How can I. Develop a time stamping application in PlantStruxure? Develop your project. Time Stamping solutions. System Technical Guide

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

DS1386/DS1386P RAMified Watchdog Timekeeper

Technical Manual. (TLT-2H GPS/GSM Vehicle Tracker) V1.5

AN LPC1700 RTC hardware auto calibration. Document information. RTC, Hardware Auto Calibration, LPC1700, Graphic LCD

RF Etch Monitor. Introduction

The components. E3: Digital electronics. Goals:

HD44780-Based LCD Modules. Introduction to the LM018L

ECP & ECP240-32EX

FEATURES DESCRIPTION APPLICATIONS BLOCK DIAGRAM. PT2272 Remote Control Decoder

Switch Actuator, 8-fold, 10 A, MDRC AT/S , GH Q R0111

CHAPTER 1 COMMANDS FOR DEVICE MANAGEMENT...

Expat kiss_fft gsoap smartgwt Linux Qt md5 zlig log 4cpp sqlite gcc/g++/libc/libc++ gwt

HD61202U. (Dot Matrix Liquid Crystal GraphicDisplay Column Driver)

Microtronics technologies Mobile:

INDUSTRIAL INSTRUMENTATION

Extended Resolution TOA Measurement in an IFM Receiver

AN2604 Application note

Accurate Measurement of the Mains Electricity Frequency

L16. Quectel GNSS Engine. EVB User Guide L16_EVB_UGD_V1.0

Transcription:

High-Stability Time Adjustment with Real-Time Clock Module An explanation of an Epson real-time clock module with sub-second time adjustment function [Preface] In recent years, it has become simple to check the time with a very high level of accuracy. Radio clocks are common and devices can get standard time data from NTP servers. In fact, system design now assumes the ability to use accurate time data. This is necessary in many applications: banking, traffic management, power control, crime prevention, sports, and more. These systems demand accurate timing in order to synchronize multiple terminals with incoming and outgoing data. Epson offers a family of real-time clock (RTC) modules to meet this need. Each module contains a crystal element that oscillates at a highly stable frequency. Every RTC module contains a crystal element and an IC with an oscillation circuit and calendar function. Epson has improved on this basic module with the addition of a DTCXO temperature compensation function. The real-time clock modules RX-4803SA/LC and RA4803SA (both with serial interface and referred to below as the 4803 series) and RX-8803SA/LC and RA8803SA (both with I 2 C interface and referred to below as the 8803 series) offer improved stability and flexibility. These products can maintain frequency output stability of ±3.4 x 10-6 (a monthly error of 9 seconds) over a temperature range of -40 to +85 C. This translates into a daily error of only ±0.3 seconds. While these are highly accurate products, customers in certain applications need adjustment of very fine (sub-second) errors. Timekeeping devices measure time by using a 32.768 khz crystal unit as the oscillator and dividing down to seconds. However, in applications that require synchronization of events across multiple devices, adjustment of sub-second errors is necessary (see Fig. 1). Products in the 4803 and 8803 series have a function that can adjust for sub-second errors to meet this need. Many Epson real-time clock modules have a RESET function, which uses software to adjust the time. This function can adjust for sub-second errors, as described above, but introduces its own small time delay due to the software s processing time. Even this error is a problem for users demanding high accuracy synchronization. The 4803 and 8803 series, therefore, have the ERST function to account for this delay through hardware. This White paper discusses the RESET and ERST functions, which are provided in the Epson real-time clock modules with built-in DTCXO (4803 and 8803 series) and support sub-second time adjustment. It also explains how the functions work, using figures such as timing charts with specific examples of time adjustment. RESET function * ERST function * 8:00:00.15 7:59:59.47 8:00:00.76 Event begins at the same time () on all systems! *Before using the functions, the user must first be sure to input time data synchronized with an external source. Fig 1: Sub-second time adjustment in a security camera system 1

[Method of high-accurate (sub-second) time adjustment with Epson real-time clock modules] Epson real-time clock modules (4803 and 8803 series) perform high-accuracy (sub-second) time adjustment with the two methods shown below. 1. Time adjustment with RESET bit: software-based time adjustment 2. Time adjustment with ERST bit: hardware-based time adjustment Below is a detailed explanation of the relevant registers and examples of reset actions and settings for each method. Before performing the above methods, the user must first be sure to input time data synchronized with an external source. 1. Example of time adjustment with RESET bit Time adjustment with a RESET bit is a software-based method. The time can be adjusted by manipulating the real-time clock module s register. This method is used in many Epson real-time clock modules, not just the 4803 and 8803 series. Relevant register 4803 series (banks 1, 2) F Control register CSEL1 CSEL0 UIE TIE AIE EIE RESET 8803 series (banks 1, 2) 0F, 1F Control register CSEL1 CSEL0 UIE TIE AIE RESET Explanation of RESET bit and its action (including timing chart example) If the RESET bit is set to 1, the sub-second counter of the clock circuit is reset when the command ends. To ensure that clock action begins correctly at a certain time, set the desired time, then reset it. Subsequently, the seconds counter will be updated every second. Reset and clear carrying data Reset pending Command input period (CE= H or between S-P) Reset occurs when command ends Command sec min hour week RESET Sub-second division counter (inc. 0.01 seconds) n+1 n+2 n+3 n+4 n+5 0 +1 +2 +21 +22 +23 +24 +25 +26 +27 +28 +29 0 +1 +2 +3 +4 +5 +6 Set seconds register, then put RESET in effect in less than 1 second. If time is 1 second or greater, the value will carry to the seconds counter. (Because carrying data is not cleared when RESET is in effect) Cautions when using RESET bit The RESET bit action assumes the following conditions: When the RESET bit becomes 1, that alone does not cause the counter to stop (it will continue to count). The RESET action occurs independently from other commands. If data is written in the RESET bit, the sub-second counter will be reset when the command input period ends. In this regard, Set the seconds register, and then reset the sub-second counter in less than 1 second, since carrying data will not be cleared when the RESET bit is in effect. 2

2. Example of time adjustment with ERST bit Time adjustment with an ERST bit is a hardware-based method. The time can be adjusted by first setting the register, then inputting an event signal. Unlike time adjustment with a RESET bit as explained earlier, there is no time lag resulting from software processing time. As a result, time can be synchronized more accurately. Relevant register 4803 series (bank 3) F Event control ECP EHL ET1 ET0 ERST 8803 series (bank 3) 2F Event control ECP EHL ET1 ET0 ERST Explanation of ERST bit and its action (including timing chart example) If the ERST bit is set to 1, the sub-second counter of the clock circuit is reset in synchronization with the detection of an external event input to the EVIN terminal. To ensure that clock action begins correctly at a certain time, set the time, then input an event to the EVIN terminal. Subsequently, the seconds counter will be updated every second. Event detection resulting from signal input to the EVIN terminal will be L level detection if the EHL bit is 0 and H level detection if the EHL bit is 1. (*a) The following example shows the action that occurs when the EHL bit is set to 1 (H level detection). Reset and clear carrying data Reset pending Command input period (CE= H or between S-P) Command Event signal input to EVIN terminal sec min hour week ERST Reset occurs when event occurs H level signal input Sub-second division counter (inc. 0.01 seconds) n+1 n+2 n+3 n+4 n+5 0 +1 +2 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 0 +1 +2 +3 Set seconds register, then put ERST in effect in less than 1 second. If time is 1 second or greater, data will carry to the seconds counter. (Because carrying data is not cleared when ERST is in effect) Cautions when using ERST bit The ERST bit action assumes the following conditions: When the ERST bit becomes 1, that alone does not cause the counter to stop (it will continue to count). The ERST action occurs independently from other commands. If data is written in the ERST bit, the sub-second counter will be reset when there is event input. In this regard, Set the seconds register, and then reset the sub-second counter in less than 1 second, since carrying data will not be cleared when the ERST bit is in effect. After writing 1 in the ERST bit, if 0 is then written in the ERST bit before the event occurs, the ERST function will no longer be effective. (*a) During high-accurate time adjustment, signal detection proceeds without removing input chatter. However, because the internal clock synchronizes clock action and EVIN terminal input, it is necessary to sustain the pulse width for a minimum time of 367 µs. 3

Example of setting high-accuracy time adjustment with ERST bit In this example, the time and calendar are being set. [Set value: Friday, April 18, 2014, 15:30:00] 4803 series 8803 series - Set SEC register (clear carrying data) Reg (0) h (00) h Write [second] - Set SEC register (clear carrying data) Reg (00) h (00) h Write [second] - Sub-second counter reset standby [Bank 3] Reg (F) h (41) h Write (ECP=0, EHL=1, ET1=0, ET0=0, ERST=1) *1 - Sub-second counter reset standby [Extension register (2)] Reg (2F) h (41) h Write (ECP=0, EHL=1, ET1=0, ET0=0, ERST=1) *1 - Set year/month/day Reg (6) h (14) h Write [year] Reg (5) h (04) h Write [month] Reg (4) h (18) h Write [day] *2 - Set year/month/day Reg (06) h (14) h Write [year] Reg (05) h (04) h Write [month] Reg (04) h (18) h Write [day] *2 - Set day of week Reg (3) h (20) h Write [day of week] - Set day of week Reg (03) h (20) h Write [day of week] - Set hour/minute/second Reg (2) h (15) h Write [hour] Reg (1) h (30) h Write [minute] Reg (0) h (00) h Write [second] *3 - Set hour/minute/second Reg (02) h (15) h Write [hour] Reg (01) h (30) h Write [minute] Reg (00) h (00) h Write [second] *3 Settings check OK? *4 No Settings check OK? *4 No Yes Yes Reset sub-second counter If EVIN terminal is switched from L to H, reset occurs and clock is restarted *5 Reset sub-second counter If EVIN terminal is switched from L to H, reset occurs and clock is restarted *5 *1) Set ERST bit to 1 to put sub-second counter in reset standby mode. Then put in external event input waiting mode. *2), *3) Data is BCD (binary coded decimal) code. *4) Read written data to see if desired data is written. (Can be omitted) *5) If the desired external event occurs at the EVIN terminal, the sub-second clock counter is reset. The clock counter is instantly reset, regardless of the chatter removal setting for EVIN terminal input as specified in the ET0 and ET1 bits. (However, there will be a delay of tens of ns because of internal element delay.) 4

High-accuracy time adjustment setting synchronized with 1PPS signal Hardware-based time adjustment with the ERST bit inputs the 1PPS signal (Pulse per second_1hz output signal) that comes with the GPS module, etc., as the external event. This makes it possible to receive an accurate GPS time signal to make high-accuracy time adjustment. Below is an example of a timing chart of a 1PPS signal from a GPS module and time data output. 1PPS (from GPS) (input to EVIN of RTC) Timing of 1PPS signal from GPS module and time data output EVIN received EVIN received Time Time t-1 serial data Time t serial data Time t+1 serial data TD (from GPS) (start-stop synchronization serial output data) t-1 t t+1 Time RTC settings data Event waiting mode Set event waiting mode Set time to t Clock subsequently runs free, using RTC RTC clock data (0.01 second column) n n t t t+1 (00) (00) (00) Users of this function should be aware that it may not be possible to adjust the time correctly in environments where the GPS module cannot correctly receive information from a satellite. Epson provides products that, in addition to the above-discussed high accuracy (clock accuracy) of the real-time clock modules themselves, have other functions to meet customer needs to support the building of high-accuracy time synchronization systems. Additionally, the frequency stability of all Epson real-time clock module products is adjusted and ensured upon shipping from the factory. This eliminates the need to tune the frequency during module use and helps enhance the efficiency and quality of customers design processes. 5