Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Design Application]
Solving The Year 2000 Real-Time Clock Dilemma
Failure Of Any Part Of A System To Provide, Recognize, Or Process Dates Into The Next Century Can Cause Catastrophes.

Contributing Author  |   ED Online ID #7565  |   October 1, 1998


Ever since the development of the electronic computer, we have shot up the development curve. Instead of a single, large computer tied to a teletype machine for input and output, we now use interdependent systems, connected over networks, capable of sending, receiving, and processing data from around the world. In essence, the mainframe computer serves as the brain for these complex networks, with PCs acting as gateways between the mainframe and the embedded systems generating data. While microprocessors lie at the heart of the computers that handle most of the communications and control functions, microcontrollers dominate the embedded applications.

Open And Closed Systems
Microprocessor-driven computers fall into the category of open systems, while microcontrollers pervade the low-end, closed systems. An open system is loosely defined as a system that can be programmed by the end user, with full access to the hardware. The best example of an open system is the personal computer. The supplier can't control the compliance of applications developed by the end user. However, the liability of the supplier is greatly diminished when it provides a fully year-2000-compliant platform along with the hardware specifications and a year-2000 (Y2K) impact statement.

In fact, the open PC-AT architecture has become a major force in the embedded-systems arena. PC motherboards are used in applications ranging from ATM machines to monitoring and control systems in electric power plants. Systems range in size from the ruggedized rack-mount, highly visible industrial chassis to the single-board computers in small black boxes. The flexibility of open systems makes them attractive for embedded-systems applications.

The closed system denies the end user direct access to the hardware. The manufacturer installs the operating system (OS) or hardware interface, and end-user applications can only access the underlying hardware through the OS. The system is supplied with the OS interface specifications only. Information covering direct access to the hardware is not provided.

Y2K Failure Points
All of the layers of a computer system must process date-related information before, during, and after the century date change. If any part of a system fails to provide, recognize, or process dates into the next century, complete system failure may occur.

When viewed from a data-processing perspective, applications programs occupy the top level of the system hierarchy. While the OS lies between the program and the hardware.

The applications program handles the manual and automatic database entries, and manipulates the data. Date entry should require a four-digit year with valid date checking. Invalid dates such as February 30, 1999, must not be allowed. If the two-digit-year method is used, the application program should use a windowing technique to expand the year to four-digits prior to entry into a database. Database sorts will fail if it is not compliant. An applications program requiring the current date will either access the system clock through the OS or bypass the OS and go directly to the hardware clock.

Most OSs will maintain a system clock. The OS, of course, gets the time for the system clock from the Real-Time Clock (RTC). Some OSs do not maintain a system clock, and depend on direct access to the RTC for the date and time information.

Some closed systems do not have a true OS. The applications program handles all of the OS functions. This type of program consists of a compiled, higher-level language intermixed with assembly language. The assembly language routines take the place of the compiler run-time routines that make OS calls to access the hardware.

The Software Clock
The system clock maintained by the OS is actually a software clock. Software clocks exist in a umber of systems, even those with a hardware RTC. The software clock is synchronized with a time tick derived from a crystal oscillator, and provides a periodic interrupt to the processor. It's usually maintained by the OS in the form of a binary counter, which is incremented by the processor with each time-tick interrupt.

The system clock usually provides the OS higher time resolution than the 1-s resolution provided by most hardware RTCs. The resolution appears normally in fractional seconds based on the period of the time-tick interrupt of the processor. The count in the system clock usually represents the passage of time since the beginning of a reference year. The reference year, or epoch, is usually the year that a particular system or OS was developed, and is different for each system.

Battery-backed CMOS RTCs did not exist in the early days of computing. The current time was entered manually every time the system was powered-up. Modern systems have a battery-backed RTC built-in to remove the requirement for manual time entry.

The current time, whether entered manually or read from the RTC when the system is powered up, has to be converted to the correct format needed to initialize the system clock. The conversion process involves subtracting the epoch from the current year. The remainder is the elapsed time since the epoch that needs to be converted to seconds. The elapsed time is used to initialize the software clock, which will count from that value at the period of the time tick.


<-- prev. page     [1] 2 3     next page -->

Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?


  • Network-On-Chip Tools Arrive for The Masses
  • Tackling System Design Challenges Through Early Verification
  • ESL Tools Take Center Stage As Designers Move Up
  • Parasitic Extraction Tool Targets Next-Generation Custom ICs
  • Synopsys Jumps Into ESL-Synthesis Pool
  • Verify Control Systems Before Committing To Hardware
  • You're Using How Many FPGAs?
  • Tool Up For The FPGA Blitz
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (181 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (168 views today)
    3) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (88 views today)
    4) GPS-Derived Grandmaster Clock Delivers Ultra-Precise Time And Frequency Sync
    (75 views today)
    5) Downconverting Mixers Lower Power Consumption While Improving Performance
    (61 views today)
    ALL TOP 20



    POST YOUR COMMENTS HERE
    Name:

    Email:
    Your Comments:

    Enter the text from the image below


    Please refresh the page if you have trouble reading this text.

    Search Electronic Design
         
      
     
    Web Seminar
    Sponsored By:
    Title: Read Pacing: A Performance Enhancing Feature of PCI Express Gen 2 Switch Devices
    Speakers: 
    Date: 07/01/08
    Register: 

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources