AN632 MAXIM | Alldatasheet

Document overview

  • Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
  • PDF pages: 8

Technical content

www.max im - ic.com/an632 Page 1 of 8 Evaluating the Accuracy of Maxim Real-Time Clocks (RTCs) This app note describes methods for measuring the accuracy of the Maxim Real-Time Clocks (RTCs) using available accurate time sources and the Maxim evaluation kits. Evaluating the accuracy of Maxim real - time clocks (RTCs) can be simplified using the modern personal computer (PC), an Internet connection, and RTC evaluation softwa re. Whether you use a Maxim evaluation kit and its associated software to evaluate the accuracy of a Maxim real - time clock, or use your own software and hardware configuration, you can take advantage of the easy methods presented here for long - term accurac y testing of RTCs. RTC Evaluation Software Figure 1 shows the main screen of typical Maxim RTC evaluation software. The "offset 1 sec" in the current - time display section of the screen is computed as offset = RTC time - PC time. This is now an easy and con venient way to keep track of the difference between the RTC time and PC time and thus allows for long - term accuracy testing of the RTC. When reading the RTC, the timekeeping registers are latched during a burst read. Even though the RTC evaluation softwar e reads the timekeeping registers approximately four times per second, the best guaranteed resolution is 1 second, as all four reads could happen inside of a 1 - second update. Therefore, an initial offset calculation of ±1 second is within the resolution of the setup when testing for long - term RTC accuracy. The only issue now is the accuracy of the standard that the RTC time is being compared against, the PC clock.

www.max im - ic.com/an632 Page 2 of 8 Figure 1: The main screen of typical Maxim RTC evaluation software PC Time Accuracy As most of us know, PC clocks are not particularly good at keeping accurate time. Simple clocks like a wristwatch and most of the clocks in your home keep better time than a st andard PC clock. Each PC contains two clocks. Although they are known by several different names, we will call them the "hardware clock" and the "software clock." The software clock runs when the PC is turned on and stops when the PC is turned off. The har dware clock uses a backup battery and continues to run even when the PC is turned off. An Intel 8254 timer - counter (or functionally equivalent device) generates the software clock. This timer - counter generates an interrupt every 54.936 milliseconds, or abo ut 18.2 times per second. The PC BIOS (basic input output system) contains a software routine that counts the interrupt requests and generates a time - of - day clock that can be read or set by other software programs. For example, the operating system might u se the time - of - day information from the software clock to date and stamp files. The software clock is a poor timekeeper. Any change in the interrupt - request rates causes the clock to gain or lose time. If the PC is left on for long periods of time, the sof tware clock can be off by large amounts. A minute or more per day that the PC was left on is not an uncommon error rate. It is also possible for an ill - behaved software program to use the timer - counter for another purpose and change the interrupt rate. Thi s could cause the software clock to rapidly gain or lose time. When the PC is turned off, the software clock stops running and loses all of its time - of - day information. For this reason, a hardware clock is also necessary. The hardware clock is either a sep arate real - time clock or a RTC function integrated into the PC's chipset. The hardware clock

www.max im - ic.com/an632 Page 3 of 8 is updated once per second and does not resolve to fractions of a second. Its timing accuracy is determined by the quality of the crystal oscillator it uses as its time base. A typical crystal usually is less than $1 in single quantities, with an initial frequency error of greater than ±20ppm, which will translate to greater than ±1.7 seconds per day. In actual operation, with temperature effects included, most hard ware clocks gain or lose 5 to 15 seconds per day. When the PC is turned off, the hardware clock runs from a battery. When the computer is turned back on, the software clock starts running again and sets itself (within 1 second) to the hardware clock. Alth ough the hardware and software clocks are synchronized at power - up, they run at different rates and will gain or lose time relative to each other while the computer is running. As you can see, neither the software nor the hardware PC clock is suitable as an accurate timekeeping reference. Fortunately, there are easy ways to solve this PC timekeeping accuracy problem. One of the easiest is to synchronize the PC clock to an Internet service. Internet Time-Setting Services If your PC is connected to the Inter net, you can synchronize its clock to an Internet time server. The process requires an active Internet connection and client software. Internet time servers use several standard timing protocols. The major three are Time Protocol, Daytime Protocol, and Net work Time Protocol (NTP). The time servers are continually listening for timing requests sent using any of these protocols. When the server receives a request, it sends time to your computer in the appropriate format. The protocol depends upon the type of client software used. Most client software requests that the time be sent using either the Daytime Protocol or NTP. Client software that uses the Simple Network Time Protocol (SNTP) makes the same timing request as an NTP client, but does less processing a nd provides less accuracy. Table 1 summarizes the protocols and their port assignments.

Table 1. Internet Time Protocols in UTC secon ds since January 1, 1900. processing and provides less accuracy. distribute time using the Time, Daytime, and NTP formats. Coordinated Universal Time (UTC) is a stable reference frequency used for counting seconds. possible with other national and internationa l standards (typically within a few nanoseconds).

uncertainty of less than 10 milliseconds. minute thereafter). NIST time can be accessed over the voice phone line at (303) 499 - 7111. Figure 2. NISTIME 32 main screen

www.max im - ic.com/an632 Page 7 of 8

  • Accuracy of reading is calculated to be ±0.418PPM Lab Ambient: 76°F to 78°F Initial Conditions The MAX6901 evaluation board was run usi ng the default of V CC = +5V. The initial frequency measurement was taken using the CMC251. The measured time period of the MAX6901 timekeeping oscillator was 30.51748µs. Calculate how long it takes to reach a 1 - second error due to initial crystal tolerance (assume temperature effects are negligible): finitial = 32768 - (1/T initial ) finiti al = 32768 - (1/30.51748µs) = - 0.105361Hz tinitial = {[1/[(f + finitial )/32768]] - 1 s}/1s t1sec_erro r = 1/ tinitial t1sec_error = 1/3.215µs = 311041.99s = 86.4hr = 3.6days Therefore, th e RTC will take about 3.6 days to reach an error of +1 second. Because the RTC software measures RTC error against the PC clock's error, and the PC clock is usually wrong, the PC clock must be corrected using an Internet time - setting service before compari ng the RTC against the PC clock. The procedure is outlined below. Procedure 1. Install MAX6901 evaluation software. 2. Install NISTIME 32 software. 3. Connect the MAX6901EVKIT to a +12V supply; leave supply off. 4. Connect a parallel PC cable to the MAXSMBUS board. 5. Plug the MAX6901EVKIT into the MAXSMBUS board. 6. Turn on the +12V supply. 7. Start the MAX6901 evaluation software, and stop cyclic burst reads. 8. Start NISTIME 32 software, and update the PC clock until the error between the PC clock and NIST time is less t han 0.4 seconds. This may take more than one iteration to accomplish.
  1. In the MAX6901 evaluation software main window, click on "Set from computer's
  2. Confirm that the offset is no more than 1 second.
  3. Each and every time the accuracy of the RTC is to be checked, you must repeat Step 8.
  4. Note: When checking the RTC time accuracy, it is recommended that all other

Windows programs be exited so as to minimize errors in the PC clock after calibration. conducted on real - time clocks. Table 2. MAX6901 RTC Accuracy Data