Sponsored Links
-->

Senin, 14 Mei 2018

DS3231 Real Time Clock + Temperature Sensing using Arduino - YouTube
src: i.ytimg.com

A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current 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. A common RTC used in single-board computers is the DS1307.


Video Real-time clock



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.


Maps Real-time clock



Purpose

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

  • Low power consumption (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. If it has been less than a few hours, then the previous ephemeris is still usable.


Interfacing Real Time Clock to Arduino Mega Sensor Shield ...
src: www.hobbyist.co.nz


Power source

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, because they are rechargeable and can be soldered. The alternate power source can also supply power to battery backed RAM.


Buy Learn DS1307 RTC Module Real Time Clock Board 8051 Arduino AVR
src: i1.wp.com


Timing

Most RTCs use a crystal oscillator, but some use the power line frequency. In many cases, the oscillator's frequency is 32.768 kHz. This is the same frequency used in quartz clocks and watches, and for the same reasons, namely that the frequency is exactly 215 cycles per second, is a convenient rate to use with simple binary counter circuits.

Many commercial RTC ICs are accurate to less than 5 parts per million. In practical terms, this is good enough to perform celestial navigation, the classic task of a chronometer. In 2011, Chip-scale atomic clocks were invented. Although more expensive, they keep time within 100 nanoseconds.


Часы для Arduino RTC DS1302 Real Time Clock Module library
src: i.ytimg.com


Examples

Many integrated circuit manufacturers make RTCs, including Epson, Intersil, IDT, Maxim, NXP Semiconductors, Texas Instruments, STMicroelectronics and Ricoh.

The RTC was introduced to PC compatibles by the IBM PC/AT in 1984, which used a Motorola MC146818 RTC. 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.

In newer systems, the RTC is integrated into the southbridge chip.

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 or ultra-low frequency digital radio transmissions broadcast by a national standards organization (i.e. a radio clock).

Historic RTCs

Some older computer designs such as Novas and PDP-8s used a real-time clock that was notable for its high accuracy, simplicity, flexibility and low cost. The computer's power supply produces a pulse at logic voltages for either each half-wave or each zero crossing of AC mains. A wire carries the pulse to an interrupt. The interrupt handler software counts cycles, seconds, etc. In this way, it can provide an entire clock and calendar.

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.

In Europe, North America and some other grids, this RTC works because the frequency of the AC mains is adjusted to have a long-term frequency accuracy as good as the national standard clocks. That is, in those grids this RTC is superior to quartz clocks and less costly.

This design of RTC is not practical in portable computers or grids (e.g. in South Asia) that do not regulate the frequency of AC mains. Also it might be thought inconvenient without Internet access to set the clock.


RTC Pi Zero (AB Electronics UK) battery backed real-time clock ...
src: rlx.sk


Clockless CPUs

Some motherboards are made without real time clocks. The real time clock is omitted either out of the desire to save money (as in the Raspberry Pi system architecture) or because real time clocks may not be needed at all (as in the Arduino system architecture).


Archiduino - RTC - Real Time Clock DS1307+ and DS1337 - Archiduino
src: www.archiduino.com


See also

  • High Precision Event Timer
  • IRQ 8
  • Real-time clock alarm
  • System time
  • Timer
  • Wall-clock time
  • Time formatting and storage bugs

Real Time Clock RTC-DS1302 Module - RobotShop
src: www.robotshop.com


References


LE3U FX3U 24MR 6AD 2DA RS485 RTC (real time clock) 14 input 10 ...
src: ae01.alicdn.com


External links

  • Media related to Real-time clocks at Wikimedia Commons

Source of article : Wikipedia