A real time clock (english real - time clock RTC) or physical clock is a clock that measures the physical time. The term is mostly used in computer engineering or computer science in order to make a distinction on logical clocks. In this connection, hardware and software real-time clocks can be distinguished. In a more narrow sense are meant by real-time clock (hardware ) clocks, which (as in virtually all modern PCs ) also retain the time when power is turned off or constant over time.
A hardware clock is a chip, like a quartz watch contains a counter and a watch crystal as the clock source substantially. The counter is incremented at each clock frequency of the encoder. Thus, the clock does not stop when the unit is turned off, the unit includes a power storage is housed. In modern PCs this is usually a lithium cell ( 3V) on the motherboard. On older motherboards three nickel -cadmium batteries are used in series ( 3.6V ) for this purpose. In the usual Watches chips also a so-called NVRAM is housed, which is also powered by the battery or the battery ( " buffered" ) is. In PCs this NVRAM is used to store the BIOS settings. For a time, was also often a clock module installed with integrated battery ( "Dallas chip " ), which includes the exchange difficult or impossible.
In order to keep the counter, a frequency of the clock of 32,768 Hz is often chosen. Thus may be generated as a second cycle in a simple manner by repeatedly halving the frequency of 1 Hz. The quartz crystals required for certificates as " quartz watches " produced in very large numbers and therefore offered particularly good value. In addition, CMOS circuits are more power efficient at such low frequencies, which is important for the life of the battery or the battery charge.
In a software - only clock, the clock signal is on, an interrupt request ( interrupt request ) by the hardware, the counter is performed by the operating system (ie the software).
In some radio alarm clocks and microwave ovens is to save the quartz, as a time reference, the frequency of the mains voltage used. It is capacitively decoupled between the transformer and rectifier and shared on the second cycle ( / 50 or / 60 depending on the mains frequency). Power outages are bridged via an imprecise and drifting RC oscillator, provided that this sub-circuit is implemented.
Most operating systems perform in addition to most built-in hardware clock and a software clock that matches up at boot with the hardware clock.
The RTC time initially consists of a count (usually in seconds since the Unix epoch). The conversion to a human-perceivable form, and the inclusion of time zones and leap years will be taken from the operating system. However, many watches chips contain registers (seconds, minutes, hours, day, month, year ( often only two digits), day of week ) to update the time in the usual man- format. Simple microcontroller systems can work directly with these values. In more complex systems (such as operating systems), the read values are, however, usually converted into one seconds format (such as the Unix time), which is converted back into an understandable format only from people on the issue.
There are different approaches to synchronize the real time clock of a computer with the actual time. The most common method is to request the time from one or more time servers and to additionally compensate through clever conversions, the delay through the transmission time. See Cristian's algorithm, Berkeley algorithm, and the Network Time Protocol.
- Watch Type