Share to: share facebook share twitter share wa share telegram print page

Real-time clock

Dallas Semiconductor DS1287 real-time clock manufactured in 1988
Types of hobbyist RTC modules commercially available from China

A real-time clock (RTC) is an electronic device (most often in the form of an integrated circuit) that measures the passage of time.

Although the term often refers to the devices in personal computers, servers and embedded systems, RTCs are present in almost any electronic device which needs to keep accurate time of day.

Terminology

The term real-time clock is used to avoid confusion with ordinary hardware clocks which are only signals that govern digital electronics, and do not count time in human units. RTC should not be confused with real-time computing, which shares its three-letter acronym but does not directly relate to time of day.

Purpose

Although keeping time can be done without an RTC,[1] using one has benefits:

  • Reliably maintains and provides current time through disruptive system states such as hangs, sleep, reboots, or if given sufficient backup power, full shutdown and hardware reassembly, without the need to have its time set again.
  • Low power consumption[2] (important when running from alternate power)
  • Frees the main system for time-critical tasks
  • Sometimes more accurate than other methods

A GPS receiver can shorten its startup time by comparing the current time, according to its RTC, with the time at which it last had a valid signal.[3] If it has been less than a few hours, then the previous ephemeris is still usable.

Some motherboards are made without RTCs. The RTC may be omitted out of desire to save money or reduce possible sources of hardware failure.

Power source

Lithium battery inside the real-time clock IC

RTCs often have an alternate source of power, so they can continue to keep time while the primary source of power is off or unavailable. This alternate source of power is normally a lithium battery in older systems, but some newer systems use a supercapacitor,[4][5] because they are rechargeable and can be soldered. The alternate power source can also supply power to battery backed RAM.[6]

Timing

Most RTCs use a crystal oscillator,[7][8] but some have the option of using the power line frequency.[9] The crystal frequency is usually 32.768 kHz,[7] the same frequency used in quartz clocks and watches. Being exactly 215 cycles per second, it is a convenient rate to use with simple binary counter circuits. The low frequency saves power, while remaining above human hearing range. The quartz tuning fork of these crystals does not change size much from temperature, so temperature does not change its frequency much.

Some RTCs use a micromechanical resonator on the silicon chip of the RTC. This reduces the size and cost of an RTC by reducing its parts count. Micromechanical resonators are much more sensitive to temperature than quartz resonators. So, these compensate for temperature changes using an electronic thermometer and electronic logic.[10]

Typical crystal RTC accuracy specifications are from ±100 to ±20 parts per million (8.6 to 1.7 seconds per day), but temperature-compensated RTC ICs are available accurate to less than 5 parts per million.[11][12] In practical terms, this is good enough to perform celestial navigation, the classic task of a chronometer. In 2011, chip-scale atomic clocks became available. Although vastly more expensive and power-hungry (120 mW vs. <1 μW), they keep time within 50 parts per trillion (5×10−11).[13]

Examples

Dallas Semiconductor (DS1387) real-time clock from an older PC. This version also contains a battery-backed SRAM.
Dallas DS1307 RTC chip in DIP-8 package

Many integrated circuit manufacturers make RTCs, including Epson, Intersil, IDT, Maxim, NXP Semiconductors, Texas Instruments, STMicroelectronics and Ricoh. A common RTC used in single-board computers is the Maxim Integrated DS1307.

The RTC was introduced to PC compatibles by the IBM PC/AT in 1984, which used a Motorola MC146818 RTC.[14][15] Later, Dallas Semiconductor made compatible RTCs, which were often used in older personal computers, and are easily found on motherboards because of their distinctive black battery cap and silkscreened logo. A standard CMOS interface is available for the PC RTC.[16]

In newer computer systems, the RTC is integrated into the southbridge chip.[17][18]

Some microcontrollers have a real-time clock built in, generally only the ones with many other features and peripherals.

Radio-based RTCs

Some modern computers receive clock information by digital radio and use it to promote time-standards. There are two common methods: Most cell phone protocols (e.g. LTE) directly provide the current local time. If an internet radio is available, a computer may use the network time protocol. Computers used as local time servers occasionally use GPS[19] or ultra-low frequency radio transmissions broadcast by a national standards organization (i.e. a radio clock[20]).

Software-based RTCs

The following system is well-known to embedded systems programmers, who sometimes must construct RTCs in systems that lack them. Most computers have one or more hardware timers that use timing signals from quartz crystals or ceramic resonators. These have inaccurate absolute timing (more than 100 parts per million) that is yet very repeatable (often less than 1 ppm). Software can do the math to make these into accurate RTCs. The hardware timer can produce a periodic interrupt, e.g. 50 Hz, to mimic a historic RTC (see below). However, it uses math to adjust the timing chain for accuracy:

time = time + rate.

When the "time" variable exceeds a constant, usually a power of two, the nominal, calculated clock time (say, for 1/50 of a second) is subtracted from "time", and the clock's timing-chain software is invoked to count fractions of seconds, seconds, etc. With 32-bit variables for time and rate, the mathematical resolution of "rate" can exceed one part per billion. The clock remains accurate because it will occasionally skip a fraction of a second, or increment by two fractions. The tiny skip ("jitter") is imperceptible for almost all real uses of an RTC.

The complexity with this system is determining the instantaneous corrected value for the variable "rate". The simplest system tracks RTC time and reference time between two settings of the clock, and divides reference time by RTC time to find "rate". Internet time is often accurate to less than 20 milliseconds, so 8000 or more seconds (2.2 or more hours) of separation between settings can usually divide the forty milliseconds (or less) of error to less than 5 parts per million to get chronometer-like accuracy. The main complexity with this system is converting dates and times to counts of seconds, but methods are well known.[21]

If the RTC runs when a unit is off, usually the RTC will run at two rates, one when the unit is on and another when off. This is because the temperature and power-supply voltage in each state is consistent. To adjust for these states, the software calculates two rates. First, software records the RTC time, reference time, on seconds and off seconds for the two intervals between the last three times that the clock is set. Using this, it can measure the accuracy of the two intervals, with each interval having a different distribution of on and off seconds. The rate math solves two linear equations to calculate two rates, one for on and the other for off.

Another approach measures the temperature of the oscillator with an electronic thermometer, (e.g. a thermistor and analog-to-digital converter) and uses a polynomial to calculate "rate" about once per minute. These require a calibration that measures the frequency at several temperatures, and then a linear regression to find the equation of temperature. The most common quartz crystals in a system are SC-cut crystals, and their rates over temperature can be characterized with a 3rd-degree polynomial. So, to calibrate these, the frequency is measured at four temperatures. The common tuning-fork-style crystals used in watches and many RTC components have parabolic (2nd-degree) equations of temperature, and can be calibrated with only 3 measurements. MEMS oscillators vary, from 3rd degree to fifth degree polynomials, depending on their mechanical design, and so need from four to six calibration measurements. Something like this approach might be used in commercial RTC ICs, but the actual methods of efficient high-speed manufacturing are proprietary.

Historic RTCs

Some computer designs such as smaller IBM System/360s,[22] PDP-8s[23] and Novas used a real-time clock that was accurate, simple and low cost. In Europe, North America and some other grids, the frequency of the AC mains is adjusted to the long-term frequency accuracy of the national standards. In those grids, clocks using AC mains can keep perfect time without adjustment. Such clocks are not practical in portable computers or grids (e.g. in South Asia) that do not regulate the frequency of AC mains.

These computers' power supplies use a transformer or resistor divider to produce a sine wave at logic voltages. This signal is conditioned by a zero crossing detector, either using a linear amplifier, or a schmitt trigger. The result is a square wave with single, fast edges at the mains frequency. This logic signal triggers an interrupt. The interrupt handler software usually counts cycles, seconds, etc. In this way, it can provide an entire clock and calendar. In the IBM 360, the interrupt updates a 64-bit count of microseconds utilized by standardized systems software. The clock's jitter error is half if the clock interrupts for each zero crossing, instead of each cycle.

The clock also usually formed the basis of computers' software timing chains; e.g. it was usually the timer used to switch tasks in an operating system. Counting timers used in modern computers provide similar features at lower precision, and may trace their requirements to this type of clock. (e.g. in the PDP-8, the mains-based clock, model DK8EA, came first, and was later followed by a crystal-based clock, DK8EC.)

A software-based clock must be set each time its computer is turned on. Originally this was done by computer operators. When the Internet became commonplace, network time protocols were used to automatically set clocks of this type.

See also

References

  1. ^ Ala-Paavola, Jaakko (2000-01-16). "Software interrupt based real time clock source code project for PIC microcontroller". Archived from the original on 2007-07-17. Retrieved 2007-08-23.
  2. ^ Enabling Timekeeping Function and Prolonging Battery Life in Low Power Systems, NXP Semiconductors, 2011
  3. ^ US 5893044  Real time clock apparatus for fast acquisition or GPS signals
  4. ^ New PCF2123 Real Time Clock Sets New Record in Power Efficiency, futurle
  5. ^ Application Note 3816, Maxim/Dallas Semiconductor, 2006
  6. ^ Torres, Gabriel (24 November 2004). "Introduction and Lithium Battery". Replacing the Motherboard Battery. hardwaresecrets.com. Archived from the original on 24 December 2013. Retrieved June 20, 2013.
  7. ^ a b Application Note 10337, ST Microelectronics, 2004, p. 2
  8. ^ Application Note U-502, Texas Instruments, 2004, p. 13
  9. ^ Application Note 1994, Maxim/Dallas Semiconductor, 2003
  10. ^ "Maxim DS3231m" (PDF). Maxim Inc. Retrieved 26 March 2019.
  11. ^ "Highly Accurate Real-Time Clocks". Maxim Semiconductors. Retrieved 20 October 2017.
  12. ^ Drown, Dan (3 February 2017). "RTC comparison".
  13. ^ "Chip Scale Atomic Clock". Microsemi. Retrieved 20 October 2017.
  14. ^ "Real-time Clock/Complementary Metal Oxide Semiconductor (RT/CMOS) RAM Information". IBM PC AT Technical Reference (PDF). International Business Machines Corporation. 1984. p. System Board 1–45.
  15. ^ MC146818A REAL-TIME CLOCK PLUS RAM (RTC) (PDF). Motorola Inc. 1984.
  16. ^ "CMOS RTC - Real Time Clock and Memory (ports 70h & 71h) :: HelpPC 2.10 - Quick Reference Utility :: NetCore2K.net". helppc.netcore2k.net.
  17. ^ "ULi M1573 Southbridge Specifications". AMDboard.com. Retrieved 2007-08-23.
  18. ^ 82430FX PCISET Data Set
  19. ^ "GPS Clock Synchronization". Safran (formerly Orolia). 9 December 2020. Retrieved 6 January 2021.
  20. ^ "Product: USB Radio Clock". Meinburg. Retrieved 20 October 2017.
  21. ^ "Calendrical Applications". U.S. Naval Observatory. U.S. Navy. Archived from the original on 2016-04-04. Retrieved 7 November 2019.
  22. ^ IBM (September 1968), IBM System/360 Principles of Operation (PDF), Eighth Edition, A22-6821-7 Revised by IBM (May 12, 1970), ibid., GN22-0354 and IBM (June 8, 1970), ibid., GN22-0361
  23. ^ Digital Equipment Corp. "PDP-8/E Small Computer Handbook, 19" (PDF). Gibson Research. pp. 7–25, the DK8EA. Retrieved 12 November 2016.

Read other articles:

County in North Carolina, United States County in North CarolinaMecklenburg CountyCountyUptown Charlotte skylineOld Mecklenburg County CourthouseGovernors Island at Lake NormanPresbyterian ChurchPineville Historic DistrictPresident James K. Polk Historic SiteCharlotte Research Institute campus at UNC Charlotte FlagSealNickname: Meck CountyLocation within the U.S. state of North CarolinaNorth Carolina's location within the U.S.Coordinates: 35°14′49″N 80°50′02″W / 35…

Dieser Artikel behandelt den Prähistoriker und Mittelalterarchäologen Paul Grimm, für den Künstler siehe Artikel Paul Grimm (Künstler). Paul Grimm im Nationalen Historischen Museum in Kiew, 1942.[1] Paul Grimm (* 18. August 1907 in Torgau; † 19. November 1993 in Berlin) war ein deutscher Prähistoriker, der auch Wegbereiter einer Archäologie des Mittelalters, vor allem der Wüstungs- und Burgenforschung, war. Grimm arbeitete vor allem in Mitteldeutschland über verschiedene Perio…

Pour les articles homonymes, voir Petty. Tom Petty Tom Petty en 2012.Informations générales Nom de naissance Thomas Earl Petty Naissance 20 octobre 1950Gainesville (Floride, États-Unis) Décès 2 octobre 2017 (à 66 ans)Malibu (Californie, États-Unis) Nationalité États-Unis Activité principale Chanteur, guitariste, compositeur, acteur Genre musical Rock Instruments Chant, guitare électrique Années actives 1976-2017 Site officiel www.tompetty.com modifier Thomas Earl Petty, dit Tom …

Colin McRae Rally 2.0 Información generalDesarrollador CodemastersSpellbound Interactive (GBA)Distribuidor CodemastersUbi Soft (GBA)Datos del juegoGénero CarrerasObras derivadas Colin McRae Rally Modos de juego Un jugador, multijugadorClasificaciones ESRBPEGIUSKDatos del softwarePlataformas PlayStationPCGame Boy AdvanceDatos del hardwareFormato CD-ROMCartuchoDispositivos de entrada Ratón (PC), teclado (PC), Volante (PC y PS)Joystick, DualShockDesarrolloLanzamiento PlayStationNA 5 de diciembre…

This article is about the 1961 Broadway musical. For the 2009 Romanian film, see The Happiest Girl in the World (film). The Happiest Girl in the WorldOriginal RecordingMusicJacques OffenbachLyricsE.Y. HarburgBookFred Saidy Henry MayersBasisComedy Lysistrata by AristophanesProductions1961 Broadway The Happiest Girl in the World is a musical with a book by Fred Saidy and Henry Mayers, lyrics by E.Y. Harburg, and music taken from the works of Jacques Offenbach. Based on the comedy Lysistrata by Ari…

American novelist This article is about the historian and writer. For the painter and illustrator, see Edward Mason Eggleston. Edward EgglestonBorn(1837-12-10)December 10, 1837Vevay, Indiana, U.S.DiedSeptember 3, 1902(1902-09-03) (aged 64)Lake George, New York, U.S.OccupationHistorianNovelistNotable worksThe Hoosier Schoolmaster (1871)ChildrenElizabeth Eggleston Seelye Edward Eggleston (December 10, 1837 – September 3, 1902) was an American historian and novelist.[1] Biography Egg…

American basketball player Herbert Wilkinson redirects here. For the English footballer, see Bert Wilkinson. Herb WilkinsonWilkinson from the 1947 HawkeyePersonal informationBorn (1923-12-13) December 13, 1923 (age 99)Hurricane, UtahNationalityAmericanListed height6 ft 4 in (1.93 m)Career informationHigh schoolEast (Salt Lake City, Utah)College Utah (1943–1944) Iowa (1944–1947) PositionGuardNumber28Career highlights and awards NCAA champion (1944) Consensus second-team Al…

Yury Mikhailovich LuzhkovЮ́рий Миха́йлович Лужко́в Wali Kota Moskwa ke-2Masa jabatan6 Juni 1992 – 28 September 2010PendahuluGavriil PopovPenggantiVladimir Resin (penjabat) Sergey SobyaninWakil Ketua Komite Manajemen Operasional Ekonomi Uni SovietMasa jabatan24 Agustus 1991 – 14 November 1991Perdana MenteriIvan SilayevPendahuluArkady VolskyPenggantiGrigory Yavlinsky Informasi pribadiLahirYury Mikhaylovich Luzhkov(1936-09-21)21 September 1936Moskwa, RSF…

العلاقات الأوزبكستانية الوسط أفريقية أوزبكستان جمهورية أفريقيا الوسطى   أوزبكستان   جمهورية أفريقيا الوسطى تعديل مصدري - تعديل   العلاقات الأوزبكستانية الوسط أفريقية هي العلاقات الثنائية التي تجمع بين أوزبكستان وجمهورية أفريقيا الوسطى.[1][2][3][4 …

Siklus sel Siklus sel adalah fungsi sel yang paling mendasar berupa duplikasi akurat sejumlah besar DNA di dalam kromosom, dan kemudian memisahkan hasil duplikasi tersebut hingga terjadi dua sel baru yang identik.[1] Siklus sel yang berlangsung kontinu dan berulang (siklik), disebut proliferasi. Keberhasilan sebuah proliferasi membutuhkan transisi unidireksional dan teratur dari satu fase siklus sel menuju fase berikutnya. Jenjang reaksi kimia organik yang terjadi seyogianya diselesaikan…

2019 video gameJump KingDeveloper(s)NexilePublisher(s)Nexile, Ukiyo Publishing[1]EngineMonoGame[2]Platform(s)Microsoft WindowsNintendo SwitchPlayStation 4Xbox OneReleaseMicrosoft WindowsMay 3, 2019Switch, PS4, Xbox OneJune 9, 2020Genre(s)Action, platform Jump King is a 2019 platforming video game developed by Nexile. Jump King was released on Steam for Microsoft Windows on May 3, 2019. It was released for PlayStation 4, Nintendo Switch, and Xbox One on June 9, 2020.[1] In…

Wang GuoweiWang Guowei sebelum tahun 1927Lahir(1877-12-02)2 Desember 1877Haining, Zhejiang, Dinasti QingMeninggal2 Juni 1927(1927-06-02) (umur 49)Danau Kunming, Yihe Yuan, Beijing, Republik TiongkokSebab meninggalBunuh diri dengan cara tenggelamPekerjaanSejarawan, penyair Dalam artikel ini, nama keluarganya adalah Wang. Wang Guowei Hanzi tradisional: 王國維 Hanzi sederhana: 王国维 Alih aksara Mandarin - Hanyu Pinyin: Wáng Guówéi - Wade-Giles: Wang2 Kuo2-wei2 - Gwoyeu Romatzyh:…

Love & LiveAlbum mini karya LOOΠΔDirilis21 September 2017Durasi11:21BahasaKoreaLabelBlockberry CreativeCJ E&MKronologi LOOΠΔ Choerry (2017)String Module Error: Match not found2017 Mix & Match(2017) Singel dalam album Mix & Match Girl FrontDirilis: 21 September 2017 Video musikGirl Front di YouTube Mix & Match adalah album mini kedua oleh girl grup Korea Selatan LOOΠΔ Odd Eye Circle, sub-unit dari LOOΠΔ. Album ini dirilis pada 21 September 2017 oleh Blockberry Crea…

Smaller culture within a larger culture For other uses, see Subculture (disambiguation). Part of a series onSociology History Outline Index Key themes Society Globalization Human behavior Human environmental impact Identity Industrial revolutions 3 / 4 / 5 Social complexity Social construct Social environment Social equality Social equity Social power Social stratification Social structure Perspectives Conflict theory Critical theory Structural functionalism Positivism Social constructionism Sym…

特例都道 東京都道414号 四谷角筈線 地図 四谷見附外苑橋西新宿 主な経由地 路線延長 7.3 km 制定年 未調査 開通年 未調査 道路の方角 東西 起点 新宿区四谷見附交差点 主な経由都市 渋谷区外苑橋交差点 終点 新宿区新宿大ガード西交差点 接続する主な道路(記法) 国道20号国道246号 ■テンプレート(■ノート ■使い方) ■PJ道路 新宿区西新宿付近 東京都道414号四谷角筈…

Liga Pertama MontenegroNegara MontenegroKonfederasiUEFADibentuk2006Jumlah tim12Tingkat pada piramida1Degradasi keLiga Kedua MontenegroPiala domestikPiala MontenegroPiala internasionalLiga ChampionsLiga EropaJuara bertahan ligaSutjeska (2012–13)Klub tersuksesFK Mogren, Budućnost (2 gelar)Televisi penyiarRTCGSitus webhttp://fscg.co.me Liga Pertama Montenegro 2013–14 Liga Pertama Montenegro (Bahasa Montenegro: Prva crnogorska fudbalska liga) juga dikenal sebagai T.Com 1. CFL untuk alasan …

Archives Archive 1 ArbCom 2017 election voter message Hello, Thi. Voting in the 2017 Arbitration Committee elections is now open until 23.59 on Sunday, 10 December. All users who registered an account before Saturday, 28 October 2017, made at least 150 mainspace edits before Wednesday, 1 November 2017 and are not currently blocked are eligible to vote. Users with alternate accounts may only vote once. The Arbitration Committee is the panel of editors responsible for conducting the Wikipedia arbi…

Japanese light novel series This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) The topic of this article may not meet Wikipedia's notability guideline for books. Please help to demonstrate the notability of the topic by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the arti…

Pertempuran Teluk ManilaBagian dari Perang Spanyol-AmerikaCetak berwarna kontemporer, menunjukkan USS Olympia di latar depan kiri, memimpin Skuadron Asiatik Amerika Serikat melawan armada kapal Spanyol dekat Cavite. Sebuah potret sketsa dari Laksamana George Dewey ditampilkan di bagian kiri bawah.Tanggal1 Mei 1898LokasiDekat Manila, FilipinaHasil Kemenangan mutlak Amerika SerikatPihak terlibat  Amerika Serikat Kerajaan SpanyolTokoh dan pemimpin George Dewey Patricio MontojoKekuatan Kek…

2012 single by Amy MacdonaldPrideSingle by Amy Macdonaldfrom the album Life in a Beautiful Light Released13 August 2012Recorded2011GenreIndie pop, folkLength3:22LabelMercury RecordsSongwriter(s)Amy MacdonaldProducer(s)Pete WilkinsonAmy Macdonald singles chronology Slow It Down (2012) Pride (2012) 4th of July (2012) Music videosPride on YouTube Pride is a single release by Scottish recording artist Amy Macdonald; it was released as the second single from her third studio album, Life in a Beautifu…

Kembali kehalaman sebelumnya

Lokasi Pengunjung: 3.144.233.89